[update]
流程定义绑定分类修改为使用分类id
This commit is contained in:
parent
cba39fca44
commit
6fd3850f7c
@ -150,9 +150,9 @@
|
|||||||
<el-tree-select
|
<el-tree-select
|
||||||
v-model="selectCategory"
|
v-model="selectCategory"
|
||||||
:data="categoryOptions"
|
:data="categoryOptions"
|
||||||
:props="{ value: 'categoryCode', label: 'categoryName', children: 'children' }"
|
:props="{ value: 'id', label: 'categoryName', children: 'children' }"
|
||||||
filterable
|
filterable
|
||||||
value-key="categoryCode"
|
value-key="id"
|
||||||
:render-after-expand="false"
|
:render-after-expand="false"
|
||||||
check-strictly
|
check-strictly
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
@ -269,9 +269,9 @@
|
|||||||
<el-tree-select
|
<el-tree-select
|
||||||
v-model="form.category"
|
v-model="form.category"
|
||||||
:data="categoryOptions"
|
:data="categoryOptions"
|
||||||
:props="{ value: 'categoryCode', label: 'categoryName', children: 'children' }"
|
:props="{ value: 'id', label: 'categoryName', children: 'children' }"
|
||||||
filterable
|
filterable
|
||||||
value-key="categoryCode"
|
value-key="id"
|
||||||
:render-after-expand="false"
|
:render-after-expand="false"
|
||||||
check-strictly
|
check-strictly
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@ -357,7 +357,7 @@ const queryParams = ref<FlowDefinitionQuery>({
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
flowName: undefined,
|
flowName: undefined,
|
||||||
flowCode: undefined,
|
flowCode: undefined,
|
||||||
categoryCode: undefined
|
category: undefined
|
||||||
});
|
});
|
||||||
const rules = {
|
const rules = {
|
||||||
category: [{ required: true, message: '分类名称不能为空', trigger: 'blur' }],
|
category: [{ required: true, message: '分类名称不能为空', trigger: 'blur' }],
|
||||||
@ -377,9 +377,9 @@ onMounted(() => {
|
|||||||
|
|
||||||
/** 节点单击事件 */
|
/** 节点单击事件 */
|
||||||
const handleNodeClick = (data: CategoryVO) => {
|
const handleNodeClick = (data: CategoryVO) => {
|
||||||
queryParams.value.categoryCode = data.categoryCode;
|
queryParams.value.category = data.id;
|
||||||
if (data.categoryCode === 'ALL') {
|
if (data.id === 'ALL') {
|
||||||
queryParams.value.categoryCode = '';
|
queryParams.value.category = '';
|
||||||
}
|
}
|
||||||
handleQuery();
|
handleQuery();
|
||||||
};
|
};
|
||||||
@ -402,7 +402,7 @@ watchEffect(
|
|||||||
const getTreeselect = async () => {
|
const getTreeselect = async () => {
|
||||||
const res = await listCategory();
|
const res = await listCategory();
|
||||||
categoryOptions.value = [];
|
categoryOptions.value = [];
|
||||||
const data: CategoryOption = { categoryCode: 'ALL', categoryName: '顶级节点', children: [] };
|
const data: CategoryOption = { id: 'ALL', categoryName: '顶级节点', children: [] };
|
||||||
data.children = proxy?.handleTree<CategoryOption>(res.data, 'id', 'parentId');
|
data.children = proxy?.handleTree<CategoryOption>(res.data, 'id', 'parentId');
|
||||||
categoryOptions.value.push(data);
|
categoryOptions.value.push(data);
|
||||||
};
|
};
|
||||||
@ -415,7 +415,7 @@ const handleQuery = () => {
|
|||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
const resetQuery = () => {
|
const resetQuery = () => {
|
||||||
queryFormRef.value?.resetFields();
|
queryFormRef.value?.resetFields();
|
||||||
queryParams.value.categoryCode = '';
|
queryParams.value.category = '';
|
||||||
queryParams.value.pageNum = 1;
|
queryParams.value.pageNum = 1;
|
||||||
queryParams.value.pageSize = 10;
|
queryParams.value.pageSize = 10;
|
||||||
handleQuery();
|
handleQuery();
|
||||||
@ -500,7 +500,7 @@ const handlerImportDefinition = (data: UploadRequestOptions): XMLHttpRequest =>
|
|||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
uploadDialogLoading.value = true;
|
uploadDialogLoading.value = true;
|
||||||
formData.append('file', data.file);
|
formData.append('file', data.file);
|
||||||
formData.append('categoryCode', selectCategory.value);
|
formData.append('categoryId', selectCategory.value);
|
||||||
importDef(formData)
|
importDef(formData)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
uploadDialog.visible = false;
|
uploadDialog.visible = false;
|
||||||
@ -585,6 +585,7 @@ const designView = async (row: FlowDefinitionVo) => {
|
|||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
const handleAdd = async () => {
|
const handleAdd = async () => {
|
||||||
|
defFormRef.value?.resetFields();
|
||||||
modelDialog.visible = true;
|
modelDialog.visible = true;
|
||||||
};
|
};
|
||||||
//保存
|
//保存
|
||||||
|
Loading…
x
Reference in New Issue
Block a user