7/4新增公安备案底部链接
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
import { ref } from 'vue';
|
||||
import PageHeader from '@/components/Pageheader/index.vue';
|
||||
import { addRepairProject, getRepairProject, listRepairProject, updateRepairProject } from '@/api/system/RepairProject';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_repair_project_types } = toRefs<any>(proxy?.useDict('com_repair_project_types'));
|
||||
const { com_repair_project_status } = toRefs<any>(proxy?.useDict('com_repair_project_status'));
|
||||
@@ -87,14 +88,14 @@ const rules = ref({
|
||||
const userid = ref(null);
|
||||
const options = ref([]);
|
||||
|
||||
function handleChange(val) {
|
||||
function handleChange(val: string) {
|
||||
if (!val) return;
|
||||
const find = options.value.find((item) => item.id === val);
|
||||
if (find) {
|
||||
form.value.projectType = find.projectType;
|
||||
}
|
||||
}
|
||||
// != ==========================================
|
||||
// != ==========================================8╬
|
||||
|
||||
async function init() {
|
||||
form.value = {
|
||||
@@ -106,8 +107,8 @@ async function init() {
|
||||
status: '0' //状态
|
||||
};
|
||||
const res = await listRepairProject();
|
||||
const arr = res.rows.filter((ite) => ite.projectLevel === 0);
|
||||
options.value = arr;
|
||||
|
||||
options.value = res.rows.filter((ite) => ite.projectLevel === 0);
|
||||
|
||||
if (route.query.id) {
|
||||
userid.value = route.query.id;
|
||||
@@ -115,11 +116,7 @@ async function init() {
|
||||
form.value = res.data;
|
||||
form.value.status = res.data.status ?? '0' + '';
|
||||
options.value = options.value.map((ite) => {
|
||||
if (ite.id === res.data.id) {
|
||||
ite.disabled = true;
|
||||
} else {
|
||||
ite.disabled = false;
|
||||
}
|
||||
ite.disabled = ite.id === res.data.id;
|
||||
return ite;
|
||||
});
|
||||
handleChange(res.data.parentId);
|
||||
|
||||
Reference in New Issue
Block a user