From 6b9c331b4499f463717c0ec64a8090d9a96ca7d7 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期二, 28 十一月 2023 10:26:40 +0800 Subject: [PATCH] 主数据申请-修订 主题库测试按钮 --- Source/UBCS-WEB/src/components/FormTemplate/index.vue | 17 +++++ Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue | 6 - Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | 42 ++++++++++---- Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue | 66 +++++++++++++++++++-- Source/UBCS-WEB/src/api/template/templateAttr.js | 10 +++ 5 files changed, 118 insertions(+), 23 deletions(-) diff --git a/Source/UBCS-WEB/src/api/template/templateAttr.js b/Source/UBCS-WEB/src/api/template/templateAttr.js index f293380..113e4f8 100644 --- a/Source/UBCS-WEB/src/api/template/templateAttr.js +++ b/Source/UBCS-WEB/src/api/template/templateAttr.js @@ -112,6 +112,16 @@ data:data }) } +//11-28 flowingDependencyGen 鎺ュ彛娴嬭瘯 +export const flowingDependencyGen = (classifyOid) =>{ + return request({ + url:'/api/ubcs-code/codeClassify/flowingDependencyGen', + method: 'get', + params:{ + classifyOid + } + }) +} //鍩烘湰淇℃伅琛ㄥ崟鏁版嵁 export const getObjectByOid = (oid) =>{ return request({ diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue index 1c49669..b633a29 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue @@ -98,10 +98,17 @@ }, eventList: { type: Array - } + }, + status: { + type: String, + default: "", + }, }, data() { return { + filteredObject: {}, + filteredArray: [], + isSeriesType: {}, attrList: [], add: '', codeattrsecValue: '', @@ -132,6 +139,7 @@ // 琛ㄥ崟灞炴�� attributes: [], slotColumnList: [], + isShow:null, }; }, mounted() { @@ -162,15 +170,29 @@ immediate: true, handler(newV) { this.$emit("getFormData", newV); + // console.log("filteredObject",this.filteredObject) + if (this.filteredObject.label === "绯诲垪鍙�") { + if (newV.isSeries === "false") { + this.filteredObject.disabled = true; + } + } }, }, - attrList: { deep: true, immediate: true, handler(newVal, oldVal) { if (newVal) { this.$emit("attrList", newVal) + } + } + }, + isSeriesType: { + deep: true, + immediate: true, + handler(newVal, oldVal) { + if (newVal) { + this.$emit("isSeriesType", newVal) } } }, @@ -187,6 +209,7 @@ methods: { // 娓叉煋琛ㄥ崟妯℃澘 templateRender(formItemList, TreeValue) { + // debugger if (this.eventList) { this.eventFlag = this.eventList.some(item => { if (item.classifyInvokeEditFlag === 'true') { @@ -201,10 +224,22 @@ let dictKeys = []; let slotColumnList = []; formItemList.forEach((formItem) => { - console.log('formItem',formItem) + console.log('formItem',formItem); formItem = this.resetFormConfig(formItem); + //灞炴�х爜娈佃鍒� if (formItem.secType === "codeattrsec") { this.attrList.push(formItem); + } + //绯诲垪鍙疯鍒� + if (formItem.label === "绯诲垪鍙�") { + this.isSeriesType = formItem; + // console.log("绯诲垪鍙�",formItem) + } + //鏇存敼鏂瑰紡瑙勫垯 + if (formItem.field === "codeStandardEditType") { + if (this.status === "amend") { + formItem.readOnly = true; + } } if (formItem.type === "line") { group.push({ @@ -249,10 +284,20 @@ let columnItem = { change: (val) => { + // console.log(val) if (val.column.field === "drawingno") { this.codeattrsecValue = val.value; + return; } - // console.log(this.codeattrsecValue) + ; + if (val.column.field === "isSeries") { + if (val.value === "false") { + this.isShow = true; + }else { + this.isShow = false; + } + } + }, dataKey: formItem.dataKey || formItem.field, label: formItem.text, @@ -263,7 +308,8 @@ field: formItem.field, type: this.columnType[formItem.type], dicData: this.getDataList(formItem.type, formItem.data), - disabled: this.type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ? true : false), + disabled: this.type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ? true : false) || + (this.isShow && formItem.label === "绯诲垪鍙�" ? true : false), prepend: this.preOrSufFixShow("text", formItem.prefix), append: this.preOrSufFixShow("text", formItem.suffix), prefixIcon: this.preOrSufFixShow("icon", formItem.prefix), @@ -273,7 +319,8 @@ keyAttr: formItem.keyAttr, value: (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) || (formItem.secType == "codedatesec" ? formItem.codeDateValue : null) || (TreeValue && formItem.secType == "codelevelsec" ? TreeValue : null) || - (formItem.secType == "codeattrsec" ? this.add : null), + (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null) || + (formItem.field === "isSeries" ? "true" : null), placeholder: formItem.inputTip, comboxKey: formItem.comboxKey, tip: formItem.tooltips, @@ -316,6 +363,8 @@ value: "key", }, }; + this.filteredObject = columnItem + // console.log("columnItem", columnItem) slotColumnList.push(columnItem); if (group.length === 0) { column.push(columnItem); @@ -323,7 +372,10 @@ group[group.length - 1]["column"].push(columnItem); } }); + + // this.filteredArray = column.filter(obj => obj.label === "绯诲垪鍙�"); this.slotColumnList = slotColumnList; + // console.log(slotColumnList) this.$set(this.option, "column", column); this.$set(this.option, "group", group); this.updateIndex++; @@ -361,7 +413,7 @@ } let columnItem = { change: (val) => { - console.log('1', val) + // console.log('1', val) }, label: formItem.text, labelslot: true, diff --git a/Source/UBCS-WEB/src/components/FormTemplate/index.vue b/Source/UBCS-WEB/src/components/FormTemplate/index.vue index fb3a61b..dd94ab2 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/index.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/index.vue @@ -12,6 +12,7 @@ > <FormTemplate key="masterForm" data-key="masterForm" + :status="status" v-bind="$attrs" :type="type" :TreeValue="TreeValue" @@ -42,6 +43,7 @@ ref="CodeApply" @getFormData="getCodeApplyFormData" @attrList="attrListForm" + @isSeriesType="isSeriesTypeString" @referConfigDataUpdate="referConfigDataUpdate" ></FormTemplate> </el-tab-pane> @@ -92,6 +94,10 @@ name: "FormTemplateDialog", components: { ResembleQuery, FormTemplate }, props: { + status:{ + type: String, + default: "", + }, visible: { type: Boolean, default: false, @@ -132,6 +138,7 @@ }, data() { return { + isSeriesType:{}, attrList:[], eventList:[], //鐮佸�肩殑绗簩绉嶅彧璇婚殣钘忔儏鍐� @@ -319,7 +326,12 @@ }); }, getFormData(form) { + // if (this.status === "apply"){ + // form.codeStandardEditType = "鍒跺畾"; + // return; + // } this.form = form; + // console.log("form",form) //灞炴�х爜娈佃祴鍊� if (this.attrList) { this.attrList.forEach(item => { @@ -328,12 +340,17 @@ } }) } + + }, + isSeriesTypeString(val){ + this.isSeriesType = val; }, //灞炴�х爜娈佃祴鍊� attrListForm(attrListForm){ this.attrList=attrListForm; }, getCodeApplyFormData(codeApplyForm) { + // console.log("codeApplyForm",codeApplyForm) this.codeApplyForm = codeApplyForm; }, // 鍙傜収缁勪欢鏁版嵁鍙樻洿 diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue index 396b601..a8121e9 100644 --- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue +++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue @@ -90,14 +90,14 @@ <!-- 鐢宠--> <FormTemplateDialog :TreeValue="TreeValue" :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid" :disabledProp="disabledProp" :templateOid="templateOid" - :visible.sync="applyvisible" + :visible.sync="applyvisible" status="apply" type="add" @submit="applySumbit"> </FormTemplateDialog> <!-- 淇--> <FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid" :disabledProp="disabledProp" :rowOid="rowOid" :templateOid="templateOid" :title="'淇敼缂栫爜淇℃伅'" - :visible.sync="amendvisible" + :visible.sync="amendvisible" status="amend" type="edit" @submit="amendSumbit"></FormTemplateDialog> <!-- 鏂板--> <FormTemplateDialog :TreeValue="TreeValue" :codeClassifyOid="this.codeClassifyOid" @@ -455,8 +455,6 @@ } } this.isReferPushed = true; - console.log('new', this.referArray) - console.log('ss', newval.find(item => Object.keys(item.referConfig).length > 0)) this.WupinFindValue = '' }, }, diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue index 5854b1a..306e91f 100644 --- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue +++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue @@ -7,27 +7,32 @@ <div> <div> <div style="display: flex; flex-direction: column;"> - <div style="display: flex;"> - <el-button v-if="permissionList.TreeAddStatus" plain size="small" type="primary" @click="TreeAdd">娣诲姞 + <div style="display: flex;justify-content: space-around"> + <el-button v-if="permissionList.TreeAddStatus" plain size="mini" type="primary" @click="TreeAdd">娣诲姞 </el-button> - <el-button v-if="permissionList.TreeEditStatus" plain size="small" type="primary" @click="TreeEdit">淇敼 + <el-button v-if="permissionList.TreeEditStatus" plain size="mini" type="primary" @click="TreeEdit">淇敼 </el-button> - <el-button v-if="permissionList.TreeDelStatus" plain size="small" type="primary" @click="TreeDel">鍒犻櫎 - </el-button> - <el-button v-if="permissionList.flushedStatus" plain size="small" type="primary" @click="flushed">鍒锋柊 + <el-button v-if="permissionList.TreeDelStatus" plain size="mini" type="primary" @click="TreeDel">鍒犻櫎 </el-button> </div> - <div style="display: flex; margin-top: 10px"> - <el-button v-if="permissionList.EnableStatus" plain size="small" type="primary" @click="Enable">鍚敤 + <div style="display: flex; margin-top: 10px;justify-content: space-around"> + <el-button v-if="permissionList.flushedStatus" plain size="mini" type="primary" @click="flushed">鍒锋柊 </el-button> - <el-button v-if="permissionList.DeactivateStatus" plain size="small" type="primary" @click="Deactivate"> + <el-button v-if="permissionList.EnableStatus" plain size="mini" type="primary" @click="Enable">鍚敤 + </el-button> + <el-button v-if="permissionList.DeactivateStatus" plain size="mini" type="primary" @click="Deactivate"> 鍋滅敤 </el-button> - <el-button v-if="permissionList.ImportExcelStatus" plain size="small" type="primary" + </div> + <div style="display: flex; margin-top: 10px;justify-content: space-around"> + <el-button v-if="permissionList.ImportExcelStatus" plain size="mini" type="primary" @click.native="ImportExcel">瀵煎叆 </el-button> - <el-button v-if="permissionList.ExportExcelStatus" plain size="small" type="primary" + <el-button v-if="permissionList.ExportExcelStatus" plain size="mini" type="primary" @click="ExportExcel">瀵煎嚭 + </el-button> + <el-button v-if="permissionList.ExportExcelStatus" plain size="mini" type="primary" + @click="testHandler">娴嬭瘯 </el-button> </div> </div> @@ -423,7 +428,8 @@ upVersion, stopLose, startRelease, - exportClassify + exportClassify, + flowingDependencyGen } from "@/api/template/templateAttr"; import {defaultReferDataGrid, referDataGrid} from '@/api/MasterData/master' import func from "@/util/func"; @@ -879,6 +885,18 @@ created() { }, methods: { + testHandler(){ + if(this.nodeClickList.length <=0 ){ + this.$message.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒') + return; + } + console.log(this.nodeClickList.oid) + flowingDependencyGen(this.nodeClickList.oid).then(res => { + this.$message.success('鎿嶄綔鎴愬姛') + }).catch(res => { + this.$message.error(res) + }) + }, // switch switchChange() { this.TreeAddform.isParticipateCheck = this.TreeAddform.codeKeyAttrValue === true ? 1 : 0; -- Gitblit v1.9.3