0e184ae7 by xukangle

fiix

1 parent 2c28a99b
......@@ -164,8 +164,14 @@ export const deleteCostAssess = (params) => request({
});
/** 通过价值评估审批 */
// export const costAssessAllow = (params) => request({
// url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/allow`,
// method: 'post',
// data: params
// });
/** 质量评价审批通过 */
export const costAssessAllow = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/allow`,
url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/submit-flow`,
method: 'post',
data: params
});
......
......@@ -72,7 +72,7 @@ const textareVal = ref("");
const headerSearchInputValue = ref("");
const dialogVisible = computed(() => {
return props.dialogInfo.visible;
return props.dialogInfo?.visible;
});
const showClose = computed(() => {
return props.dialogInfo.showClose ?? true;
......@@ -99,10 +99,10 @@ const dialogHeight = computed(() => {
return props.dialogInfo.height ?? "auto";
});
const dialogTitle = computed(() => {
return props.dialogInfo.header.title;
return props.dialogInfo.header?.title;
});
const headerSearchInputVisible = computed(() => {
return props.dialogInfo.header.headerSearchInputVisible ?? false;
return props.dialogInfo.header?.headerSearchInputVisible ?? false;
});
const headerSearchInputPlaceholder = computed(() => {
return (
......@@ -579,7 +579,7 @@ defineExpose({
<span>{{ bar.label }}</span>
</span>
<template v-else>
<el-popover v-if="bar.popover" :visible="bar.popover.visible" :title="bar.popover.title"
<el-popover v-if="bar.popover" :visible="bar.popover?.visible" :title="bar.popover.title"
:content="bar.popover.content" placement="bottom-start" :width="bar.popover.width ?? 200"
trigger="click">
<template #reference>
......@@ -692,7 +692,7 @@ defineExpose({
</div>
</div>
</div>
<template #footer v-if="footer.visible ?? true">
<template #footer v-if="footer?.visible ?? true">
<div class="dialog-footer" :class="{ between: footer.textBtns }">
<div v-if="footer.textBtns">
<span class="text_btn" v-for="btn in footer.textBtns" :disabled="btn.disabled ?? false"
......@@ -700,7 +700,7 @@ defineExpose({
</div>
<div>
<template v-for="btn in footer.btns">
<el-button v-if="btn.visible ?? true" :type="btn.type" :disabled="btn.disabled ?? false"
<el-button v-if="btn?.visible ?? true" :type="btn.type" :disabled="btn.disabled ?? false"
:loading="btn.loading ?? btnLoading" @click="btnClick(btn, null)" v-preReClick>{{ btn.label }}</el-button>
</template>
</div>
......
......@@ -197,6 +197,19 @@ const inputChange = (val, row) => {
formInline.value[row.field] = val = parseFloat(val || 0).toFixed(2);
}
}
if (row.inputType == 'scoreNumber' && parseFloat(val) > 100) {
// 先去除非数字和小数点字符
val = val.replace(/[^\d.]/g, "");
// 限制最多保留两位小数
val = val.replace(/\.{2,}/g, ".");
val = val.replace(/^(\d+)\.(\d{2}).*$/, "$1.$2");
let num = parseFloat(val);
if (num > 100) {
num = 100; // 超过100时将其设置为100
val = num.toFixed(2); // 保证显示为两位小数
}
formInline.value[row.field] = val;
}
// 新增的 inputType 处理逻辑:integerWithComma
if (row.inputType == "integerWithComma") {
val = val.replace(/[^\d]/g, ""); // 移除非数字字符
......@@ -981,8 +994,7 @@ const panelChange = (scope, row) => {
</div>
</div>
<div v-if="item.example" class="panel_header-expample">{{ item.example }}</div>
<el-input ref="exampleTextareaRef" :id="item.field"
:class="[item.col, { is_block: item.block }]"
<el-input ref="exampleTextareaRef" :id="item.field" :class="[item.col, { is_block: item.block }]"
v-model="formInline[item.field]" :rows="item.rows ?? 4" type="textarea" :placeholder="item.placeholder"
:disabled="item.disabled || readonly" :readonly="item.readonly" resize="none"
:maxlength="item.maxlength ?? 500" show-word-limit @focus="(event) => inputFocus(event, item)"
......
......@@ -223,6 +223,7 @@ const tableBtnClick = (scope, btn) => {
const type = btn.value;
const row = scope.row;
currTableData.value = row;
console.log(row, '-------');
if (type == "redit") {
dialogInfo.value.visible = true;
dialogInfo.value.type = 'reSubmit';
......
......@@ -21,7 +21,7 @@ import {
} from "@/api/modules/queryService";
import useUserStore from "@/store/modules/user";
import useDataAssetStore from "@/store/modules/dataAsset";
import { passFlowData, rejectFlowData, revokeFlowData } from '@/api/modules/workFlowService';
import { getCamundaDeploymentId, getProcessNodesPromise, passFlowData, rejectFlowData, revokeFlowData } from '@/api/modules/workFlowService';
const assetStore = useDataAssetStore();
......@@ -80,6 +80,7 @@ const tableFields = ref([
},
]);
const deploymentId = ref('');
onBeforeMount(() => {
if (isCompanyPlatform.value) {
tableInfo.value.fields = tableFields.value;
......@@ -87,12 +88,19 @@ onBeforeMount(() => {
tableFields.value.splice(3, 0, { label: "企业名称", field: "tenantName", width: 250, align: "left" })
tableInfo.value.fields = tableFields.value;
}
getTenantAttach(userData.tenantGuid).then((res: any) => {
if (res?.code == proxy.$passCode) {
attachDataInfo.value = res.data || {};
formItems.value[1].templateUrl = attachDataInfo.value.quality_evaluation_file;
// getTenantAttach(userData.tenantGuid).then((res: any) => {
// if (res?.code == proxy.$passCode) {
// attachDataInfo.value = res.data || {};
// formItems.value[1].templateUrl = attachDataInfo.value.quality_evaluation_file;
// } else {
// ElMessage.error(res.msg);
// }
// })
getCamundaDeploymentId('10019', userData.tenantGuid, userData.staffGuid).then((res: any) => {
if (res.code == proxy.$passCode) {
deploymentId.value = res.data;
} else {
ElMessage.error(res.msg);
proxy.$ElMessage.error(res.msg);
}
})
});
......@@ -252,14 +260,14 @@ const tableInfo = ref({
// }
// return btnsArr;
// }
const getTableBtns = (row, includeDetail = true) => {
const getTableBtns = (row) => {
let btnsArr: any[] = [];
const approveVO = row.approveVO;
const approveVO = row.approveVO || {};
const approveState = row.approveState || null;
const approveStaffGuids = approveVO.approveStaffGuids || [];
const staffGuid = approveVO.staffGuid || '';
const bizApproveState = row.bizApproveState;
const currentStaffGuid = userData.staffGuid
const bizApproveState = row.approveState;
const approveState = approveVO?.approveState || 'N';
const approveStaffGuids = approveVO?.approveStaffGuids || [];
const staffGuid = approveVO?.staffGuid || '';
let isShowCancel = false;
let flowState;
if (approveState == 'N') {
......@@ -274,24 +282,25 @@ const getTableBtns = (row, includeDetail = true) => {
if (approveVO && approveVO.approveState == 'A' && staffGuid == currentStaffGuid) {
isShowCancel = true;
}
if (flowState === 1) {
btnsArr = [{ label: "编辑", value: "edit" }, { label: "删除", value: "delete" }]
} else {
btnsArr.push({ label: "详情", value: "detail" })
if (flowState === 2) {
btnsArr.push(...[{ label: "通过", value: "pass" }, { label: "驳回", value: "reject" }])
if (isShowCancel) {
btnsArr.push({ label: "撤销", value: "revoke" })
btnsArr = [{ label: "删除", value: "delete" }]
}
} else if (flowState === 3) {
if (bizApproveState != 'D') {
btnsArr.push({ label: "重新提交", value: "edit" })
if (flowState === 2) {
btnsArr = [{ label: "通过", value: "pass" }, { label: "驳回", value: "reject" }]
}
if (flowState === 3) {
btnsArr.push({ label: "删除", value: "delete" })
}
if (flowState === 3 && bizApproveState != 'D') {
btnsArr.push({ label: "重新提交", value: "redit" })
}
if (isShowCancel) {
btnsArr.push({ label: "撤销", value: "revoke" })
}
if (flowState !== 1) {
btnsArr.push({ label: "详情", value: "detail" })
}
return btnsArr
return btnsArr;
}
......@@ -300,12 +309,34 @@ const currTableData: any = ref({});
const tableBtnClick = (scope, btn) => {
const type = btn.value;
const row = scope.row;
console.log('row', row);
currTableData.value = row;
if (type == "edit") {
if (type == "redit") {
if (!row.registerGuid) {
formItems.value[2].visible = false;
formItems.value[3].visible = false;
formItems.value[4].visible = false;
formItems.value[5].visible = false;
formItems.value[0].visible = false;
formItems.value[0].default = row.damGuid;
formItems.value[1].default = row.costAssessmentFile || [];
dialogInfo.value.type = 'reSubmit';
dialogInfo.value.visible = true;
} else {
formItems.value[2].visible = true;
formItems.value[3].visible = true;
formItems.value[4].visible = true;
formItems.value[5].visible = true;
formItems.value[0].visible = false;
formItems.value[0].default = row.damGuid;
formItems.value[1].default = row.costAssessmentFile || [];
formItems.value[2].default = row.qualityScore;
formItems.value[3].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
formItems.value[4].default = row.evaluationNote;
formItems.value[5].default = row.evaluationFile || [];
dialogInfo.value.type = 'reSubmit';
dialogInfo.value.visible = true;
}
} else if (type == "delete") {
delTableOpen("此操作将永久删除该资产价值评估,是否继续?", "warning");
} else if (type === 'backup') {
......@@ -314,29 +345,23 @@ const tableBtnClick = (scope, btn) => {
passDialogInfo.value.visible = true;
passFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。';
} else if (type === 'revoke') { // 撤销,状态为审批中时可以撤销。
ElMessageBox.confirm('确定撤销该资产价值评估吗?', "提示", {
ElMessageBox.confirm(`撤销后,该流程将不再进行审核,确定这样操作吗?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: 'warning',
}).then(() => {
let params = {
bizGuid: row.guid,
funcCode: row.funcCode
}
tableInfo.value.loading = true;
registerApproveCancel(params).then((res: any) => {
tableInfo.value.loading = false;
if (res?.code == proxy.$passCode) {
if (res.data) {
ElMessage.success('该资产价值评估流程撤销成功!');
revokeFlowData({
guid: row.approveVO.approveGuid,
flowType: row.approveVO.flowType,
approveStaffGuid: userData.staffGuid,
}).then((res: any) => {
if (res.code == '00000') {
ElMessage.success('撤销成功!')
getTableData();
} else {
ElMessage.error('该资产价值评估流程撤销失败!');
}
} else {
ElMessage.error(res.msg);
ElMessage.error(res.msg)
}
});
})
}).catch(() => {
ElMessage({
type: 'info',
......@@ -348,6 +373,23 @@ const tableBtnClick = (scope, btn) => {
name: 'registerValueDetail',
query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid }
});
} else if (type === 'detail') { // 详情
if (row.registerApproveState == 'Y') {
router.push({
name: 'registerDetail',
query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid }
});
} else {
router.push({
name: 'evaCatalogDetail',
query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess' }
});
}
} else if (type == 'productDetail') {
router.push({
name: 'registerCatalogDetail',
query: { guid: row.damGuid }
});
}
else if (type === 'pass') {
passDialogInfo.value.visible = true;
......@@ -458,7 +500,7 @@ const tablePageChange = (info) => {
getTableData();
};
const formItems = ref([
const formItems = ref<any>([
{
label: '资产名称',
type: 'select',
......@@ -479,6 +521,9 @@ const formItems = ref([
tip: '支持格式:xls .xlsx .doc .docx .rar .zip',
type: 'upload-file',
accept: '.xls, .xlsx, .doc, .docx, .rar, .zip',
field: 'costAssessmentFile',
default: [],
required: true,
templateUrl: 'auto',
templateClick: () => {
const link = document.createElement('a');
......@@ -488,11 +533,8 @@ const formItems = ref([
link.click();
link.remove();
},
required: true,
block: true,
visible: true,
default: [],
field: 'costAssessmentFile',
},
// 质量评分 type: input
{
......@@ -528,7 +570,6 @@ const formItems = ref([
default: '',
maxlength: 250,
block: true,
focusValue: true,
clearable: true,
required: true,
visible: false
......@@ -614,19 +655,24 @@ const handleSelectChange = (val, row, info) => {
}
const passDialogInputChange = (val, item, inlineValue) => {
console.log('val', val, item, inlineValue);
if (item.field == 'assessmentMoney') {
let M = "";
let D = "";
let assessmentDate = inlineValue.assessmentDate;
if (assessmentDate) {
M = (assessmentDate.getMonth() + 1 < 10 ? '0' + (assessmentDate.getMonth() + 1) : assessmentDate.getMonth() + 1);
D = (assessmentDate.getDate() + 1 < 10 ? '0' + assessmentDate.getDate() : assessmentDate.getDate());
M = (assessmentDate?.getMonth() + 1 < 10 ? '0' + (assessmentDate?.getMonth() + 1) : assessmentDate?.getMonth() + 1);
D = (assessmentDate?.getDate() + 1 < 10 ? '0' + assessmentDate?.getDate() : assessmentDate?.getDate());
}
passFormItems.value[2].placeholder = `按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币${val}元。本次评估结论在评估基准日后一年内有效,即自${inlineValue.assessmentDate ? `${inlineValue.assessmentDate.getFullYear()}${M}${D}日至${inlineValue.assessmentDate.getFullYear() + 1}${M}${D}日` : '20*年*月*日至20*年*月*日'}止。超过一年,需重新举行资产评估。`;
passFormItems.value[2].placeholder = `按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币${val}元。本次评估结论在评估基准日后一年内有效,即自${inlineValue.assessmentDate ? `${inlineValue.assessmentDate?.getFullYear()}${M}${D}日至${inlineValue.assessmentDate?.getFullYear() + 1}${M}${D}` : '20*年*月*日至20*年*月*日'}止。超过一年,需重新举行资产评估。`;
} else if (item.field == 'assessmentDate') {
let M = (val.getMonth() + 1 < 10 ? '0' + (val.getMonth() + 1) : val.getMonth() + 1);
let D = (val.getDate() + 1 < 10 ? '0' + val.getDate() : val.getDate());
passFormItems.value[2].placeholder = `按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币${inlineValue.assessmentMoney ? inlineValue.assessmentMoney : '***'}元。本次评估结论在评估基准日后一年内有效,即自${val ? `${val.getFullYear()}${M}${D}日至${val.getFullYear() + 1}${M}${D}日` : '20*年*月*日至20*年*月*日'}止。超过一年,需重新举行资产评估。`;
if (val && !(val instanceof Date)) {
// 如果 val 不是 Date 类型,尝试将其转换为 Date 对象
val = new Date(val);
}
let M = (val?.getMonth() + 1 < 10 ? '0' + (val?.getMonth() + 1) : val?.getMonth() + 1);
let D = (val?.getDate() + 1 < 10 ? '0' + val?.getDate() : val?.getDate());
passFormItems.value[2].placeholder = `按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币${inlineValue.assessmentMoney ? inlineValue.assessmentMoney : '***'}元。本次评估结论在评估基准日后一年内有效,即自${val ? `${val?.getFullYear()}${M}${D}日至${val?.getFullYear() + 1}${M}${D}` : '20*年*月*日至20*年*月*日'}止。超过一年,需重新举行资产评估。`;
}
}
......@@ -635,19 +681,40 @@ const reSubmitPromise: any = ref(null);
/** 编辑质量评估发起资产申请按钮处理。 */
const dialogBtnClick = (btn, info) => {
console.log('btn', btn, info);
if (btn.value == 'submit') {
getProcessNodesPromise({
deploymentId: deploymentId.value,
processInstanceId: null,
}).then((res: any) => {
console.log('res', res);
if (dialogInfo.value.type == 'reSubmit') {
if (reSubmitPromise.value) {
return;
}
reSubmitPromise.value = updateCostAssess({
guid: currTableData.value.guid,
immediateApprove: true,
tenantGuid: userData.tenantGuid,
registerGuid: currTableData.value.registerGuid,
daName: currTableData.value.daName,
registerTime: currTableData.value.registerTime,
issuingEntityGuid: currTableData.value.issuingEntityGuid,
costAssessmentFile: info.costAssessmentFile?.map(f => f.url) || []
damGuid: currTableData.value.damGuid,
costAssessmentFile: info.costAssessmentFile?.map(file => {
return {
name: file.name,
url: file.url
}
}) || [],
evaluationFile: info.evaluationFile?.map(file => {
return {
name: file.name,
url: file.url
}
}) || [],
qualityScore: info.qualityScore || null,
evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null,
evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
evaluationNote: info.evaluationNote || null,
evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
}).then((res: any) => {
reSubmitPromise.value = null;
if (res?.code == proxy.$passCode) {
......@@ -663,32 +730,47 @@ const dialogBtnClick = (btn, info) => {
if (savePromise.value) {
return;
}
let daInfo = assetListData.value.find(a => a.guid == info.registerGuid);
let params: any = {};
let daInfo = assetListData.value.find(a => a.guid == info.registerGuid);
if (daInfo.qualityEvaluationGuid) {
//通过质量评估
//通过质量评估发起资产申请
params = {
immediateApprove: true,
tenantGuid: userData.tenantGuid,
registerGuid: info.registerGuid,
daName: daInfo.damName,
damGuid: daInfo.guid,
costAssessmentFile: info.costAssessmentFile?.map(f => f.url) || [],
evaluationFile: info.evaluationFile?.map(f => f.url) || [],
qualityScore: info.qualityScore,
evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null,
evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
evaluationNote: info.evaluationNote,
costAssessmentFile: info.costAssessmentFile?.map(file => {
return {
name: file.name,
url: file.url
}
}) || [],
evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
}
} else {
//未通过质量评估
//未通过质量评估发起资产申请
params = {
immediateApprove: true,
tenantGuid: userData.tenantGuid,
registerGuid: info.registerGuid,
daName: daInfo.damName,
damGuid: daInfo.guid,
costAssessmentFile: info.costAssessmentFile?.map(f => f.url) || [],
costAssessmentFile: info.costAssessmentFile?.map(file => {
return {
name: file.name,
url: file.url
}
}) || [],
evaluationFile: info.evaluationFile?.map(file => {
return {
name: file.name,
url: file.url
}
}) || [],
qualityScore: info.qualityScore,
evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null,
evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
evaluationNote: info.evaluationNote,
evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
}
}
console.log('daInfo', daInfo, info);
......@@ -704,6 +786,7 @@ const dialogBtnClick = (btn, info) => {
}
})
}
})
} else if (btn.value == 'cancel') {
dialogInfo.value.visible = false;
}
......@@ -833,42 +916,26 @@ const passDialogInfo = ref({
},
});
// const passDialogBtnClick = (btn, info) => {
// if (btn.value == 'submit') {
// costAssessAllow({
// guid: currTableData.value.guid,
// assessmentMoney: info.assessmentMoney,
// assessmentDate: info.assessmentDate,
// assessmentNote: info.assessmentNote,
// assessmentFile: info.assessmentFile.map(f => f.url),
// }).then((res: any) => {
// if (res?.code == proxy.$passCode) {
// if (res.data) {
// ElMessage.success('审批成功');
// passDialogInfo.value.visible = false;
// getTableData();
// } else {
// ElMessage.error('审批失败');
// }
// } else {
// ElMessage.error(res.msg);
// }
// })
// } else if (btn.value == 'cancel') {
// passDialogInfo.value.visible = false;
// }
// };
const passDialogBtnClick = (btn, info) => {
let params: any = {}
console.log('btn', btn, info, currTableData.value);
if (btn.value == 'submit') {
tableInfo.value.loading = true;
let params = {
costAssessAllow({
guid: currTableData.value.approveVO.approveGuid,
bizGuid: currTableData.value.guid,
flowType: currTableData.value.approveVO.flowType,
approveSuggest: info.approveSuggest,
approveStaffGuid: userData.staffGuid,
assessmentMoney: info.assessmentMoney,
assessmentDate: info.assessmentDate,
assessmentNote: info.assessmentNote,
assessmentFile: info.assessmentFile.map(file => {
return {
name: file.name,
url: file.url
}
passFlowData(params).then((res: any) => {
tableInfo.value.loading = false;
}) || [],
}).then((res: any) => {
if (res?.code == proxy.$passCode) {
if (res.data) {
ElMessage.success('审批成功');
......@@ -880,9 +947,7 @@ const passDialogBtnClick = (btn, info) => {
} else {
ElMessage.error(res.msg);
}
}).catch(() => {
tableInfo.value.loading = false;
});
})
} else if (btn.value == 'cancel') {
passDialogInfo.value.visible = false;
}
......
......@@ -76,117 +76,90 @@ const tableInfo = ref({
/**弹窗配置 */
const newCreateGradeFormItems = ref<any>([{
label: '标签名',
type: 'input',
placeholder: '请选择',
field: 'label',
default: '',
const formItems = ref([
{
label: '附件上传',
tip: '支持格式:pdf,单个文件不能超过10MB ',
type: 'upload-file',
accept: '.pdf',
field: 'costAssessmentFile',
templateUrl: '',
required: true,
filterable: true,
clearable: true,
visible: true,
block: true,
},
{
label: '分类',
type: 'tree-select',
placeholder: '请选择',
field: 'classifyDetailGuid',
default: '',
options: [],
props: {
label: "classifyName",
value: "guid",
visible: true,
default: [],
},
{
label: '附件上传',
tip: '支持格式:pdf,单个文件不能超过10MB ',
type: 'upload-file',
accept: '.pdf',
field: 'costAssessmentFile1',
templateUrl: '',
required: true,
checkStricty: true,
lazy: false,
filterable: true,
clearable: true,
visible: true,
block: true,
},
{
label: '分级',
type: 'select',
maxlength: 19,
placeholder: '请输入',
field: 'gradeDetailGuid',
default: '',
options: [],
props: {
label: 'name',
value: 'guid',
visible: true,
default: [],
},
clearable: true,
{
label: '附件上传',
tip: '支持格式:pdf,单个文件不能超过10MB ',
type: 'upload-file',
accept: '.pdf',
field: 'costAssessmentFile2',
templateUrl: '',
required: true,
block: true,
},
// {
// label: ' ',
// type: 'label',
// default: '规则配置',
// block: true,
// col: 'title-label'
// },
// {
// label: '精确匹配',
// type: 'textarea',
// maxlength: 200,
// placeholder: '请输入字段中文,中间用英文“,”分号隔开',
// field: 'matchChValue',
// default: '',
// clearable: true,
// required: false,
// },
// {
// label: '',
// type: 'textarea',
// maxlength: 200,
// placeholder: '请输入字段中文,中间用英文“,”分号隔开',
// field: 'matchEnValue',
// default: '',
// clearable: true,
// required: false,
// }
visible: true,
default: [],
},
]);
const newCreateGradeFormRules = ref({
label: [
{ required: true, message: '请输入标签名', trigger: 'change' }
],
detailGuid: [
{ required: true, message: '请选择分类', trigger: 'change' }
],
gradeDetailGuid: [
{ required: true, message: '请选择分级', trigger: 'change' }
const formRules = ref({
registerGuid: [
{ required: true, trigger: 'change', message: "请填写资产名称" }
],
costAssessmentFile: [{
validator: (rule: any, value: any, callback: any) => {
if (!value?.length) {
callback(new Error('请上传数据价值评估附件'))
} else {
callback();
}
}, trigger: 'change'
}]
});
const newCreateGradeStandardDialogInfo = ref({
const dialogInfo = ref({
visible: false,
size: 600,
title: "添加标签",
type: "",
formInfo: {
id: "grade-form",
items: newCreateGradeFormItems.value,
rules: newCreateGradeFormRules.value,
},
submitBtnLoading: false,
btns: {
cancel: () => {
newCreateGradeStandardDialogInfo.value.visible = false;
newCreateGradeStandardDialogInfo.value.submitBtnLoading = false;
size: 510,
direction: "column",
header: {
title: "价值评估发起",
},
submit: async (btn, info) => {
type: '',//标识是否是重新提交
contents: [
{
type: 'form',
title: '',
formInfo: {
id: 'quality-coss-level',
items: formItems.value,
rules: formRules.value
}
}
})
],
footer: {
btns: [
{ type: "default", label: "取消", value: "cancel" },
{ type: "primary", label: "确定", value: "submit" },
],
},
});
const dialogBtnClick = () => {
console.log('handleSelectChange');
};
const classSearchItemList = ref<any>([
......@@ -244,13 +217,7 @@ const searchClass = async (val: any, clear: boolean = false) => {
};
const addNewLabel = () => {
newCreateGradeStandardDialogInfo.value.visible = true;
newCreateGradeStandardDialogInfo.value.title = '新增标签';
newCreateGradeFormItems.value.forEach(item => {
item.default = '';
item.disabled = false;
});
newCreateGradeStandardDialogInfo.value.submitBtnLoading = false;
dialogInfo.value.visible = true;
}
......@@ -276,8 +243,7 @@ const addNewLabel = () => {
</div>
</div>
</div>
<Dialog_form ref="dialogLabelFormRef" :dialogConfigInfo="newCreateGradeStandardDialogInfo" class="v-dialog-form">
</Dialog_form>
<Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" />
</div>
</template>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!