|
|
@ -216,6 +216,17 @@ |
|
|
|
>删除</el-button |
|
|
|
> |
|
|
|
</el-col> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="success" |
|
|
|
plain |
|
|
|
icon="Edit" |
|
|
|
:disabled="multiple" |
|
|
|
@click="treeVisible=true" |
|
|
|
v-hasPermi="['meta:metaSecurityCol:remove']" |
|
|
|
>标准分类</el-button |
|
|
|
> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<!-- 表格展示 --> |
|
|
|
<el-table |
|
|
@ -311,6 +322,39 @@ |
|
|
|
|
|
|
|
<code-item-common ref="showCodeDialog" v-if="codeVisible" :codeId="codeId"/> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog width="600px" append-to-body title="标准分类" v-model="treeVisible"> |
|
|
|
<el-form label-width="100px" ref="formRef" > |
|
|
|
|
|
|
|
<el-form-item label="标准分类"> |
|
|
|
<el-tree-select |
|
|
|
check-strictly |
|
|
|
value-key="contentOnum" |
|
|
|
placeholder="请选择标准分类" |
|
|
|
:default-expand-all="true" |
|
|
|
:clearable="true" |
|
|
|
:data="directoryTree" |
|
|
|
@node-click="handleTargetCatalogNodeClick" |
|
|
|
:check-strictly="false" |
|
|
|
:props="{ |
|
|
|
value: 'contentOnum', |
|
|
|
label: 'contentName', |
|
|
|
children: 'children', |
|
|
|
disabled: (data) => data.children && data.children.length > 0, // 有子节点就禁用 |
|
|
|
}" |
|
|
|
v-model="chooseOnum" |
|
|
|
> |
|
|
|
</el-tree-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<template #footer> |
|
|
|
<div class="dialog-footer"> |
|
|
|
<el-button @click="treeVisible=false">取消</el-button> |
|
|
|
<el-button type="primary" @click="submitTree" |
|
|
|
>确定</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -322,6 +366,7 @@ import { |
|
|
|
delDirectoryAsset, |
|
|
|
addDirectoryCollection, |
|
|
|
cancelDirectoryCollection, |
|
|
|
|
|
|
|
} from '@/api/datastd/directory' |
|
|
|
import auth from '@/plugins/auth' |
|
|
|
import FormDialog from './components/FormDialog.vue' |
|
|
@ -333,6 +378,7 @@ import { |
|
|
|
listStdMain, |
|
|
|
getStdMain, |
|
|
|
deleteStdMain, |
|
|
|
changeStdMainOum |
|
|
|
} from "@/api/datastd/std"; // 更新为新的接口 |
|
|
|
import useUserStore from '@/store/modules/user' |
|
|
|
import { nextTick } from 'vue' |
|
|
@ -343,12 +389,16 @@ const { proxy } = getCurrentInstance() |
|
|
|
const { hasPermiOr } = auth |
|
|
|
const userStore = useUserStore() |
|
|
|
const codeVisible = ref(false); |
|
|
|
const treeVisible = ref(false); |
|
|
|
const defaultProps = { |
|
|
|
children: 'children', |
|
|
|
label: 'contentName', |
|
|
|
} |
|
|
|
const directoryTree = ref([]) |
|
|
|
const currentNode = ref({}) |
|
|
|
const handleTargetCatalogNodeClick = (data) => { |
|
|
|
chooseOnumNum.value=data.contentOnum |
|
|
|
} |
|
|
|
|
|
|
|
const directoryTableData = ref([]) |
|
|
|
const queryParams = ref({ |
|
|
@ -362,6 +412,8 @@ const single = ref(true); |
|
|
|
const multiple = ref(true); |
|
|
|
const dialogVisible = ref(false); |
|
|
|
const selectedRow = ref(null); |
|
|
|
const chooseOnum = ref(null); |
|
|
|
const chooseOnumNum = ref(null); |
|
|
|
const codeId = ref(null); |
|
|
|
const isEdit = ref(false); |
|
|
|
const tableData = ref([]); |
|
|
@ -389,6 +441,20 @@ const handleQuery = () => { |
|
|
|
queryParams.value.pageNum = 1; |
|
|
|
getList(); |
|
|
|
}; |
|
|
|
|
|
|
|
const submitTree = async () => { |
|
|
|
const response = await changeStdMainOum({id:ids.value.toString(),sysId:chooseOnumNum.value}); |
|
|
|
if (response.success){ |
|
|
|
treeVisible.value=false |
|
|
|
getList(); |
|
|
|
proxy.$modal.msgSuccess(response.msg); |
|
|
|
|
|
|
|
}else{ |
|
|
|
proxy.$modal.msgWarning(response.msg); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
const handleSelectionChange = (selection) => { |
|
|
|
single.value = selection.length !== 1; |
|
|
|
multiple.value = !selection.length; |
|
|
@ -435,7 +501,6 @@ const handleRemove = (row) => { |
|
|
|
const dbResourceOldList = ref([]); |
|
|
|
|
|
|
|
const handleAdd = () => { |
|
|
|
console.log("update:visible", 111); |
|
|
|
isEdit.value = false; |
|
|
|
selectedRow.value = { |
|
|
|
stdType: "", |
|
|
@ -481,7 +546,9 @@ const treeRef = ref(null) |
|
|
|
watch(filterText, (val) => { |
|
|
|
treeRef.value.filter(val) |
|
|
|
}) |
|
|
|
|
|
|
|
watch(treeVisible, (val) => { |
|
|
|
if(val){ chooseOnum.value=null} |
|
|
|
}) |
|
|
|
const filterNode = (value, data) => { |
|
|
|
if (!value) { |
|
|
|
return true |
|
|
|