From 2ad5ca0811c67728b8958174fbeb8f0010ee0e6a Mon Sep 17 00:00:00 2001 From: lihang <lihang@vci-tech.com> Date: 星期四, 15 六月 2023 16:43:35 +0800 Subject: [PATCH] 对象建模相关的bug修正 --- Source/UBCS-WEB/src/views/modeling/original.vue | 41 ++++- Source/UBCS-WEB/src/views/modeling/LinkType.vue | 1 Source/UBCS-WEB/src/views/modeling/status.vue | 35 ++++ Source/UBCS-WEB/src/api/omd/OmdAttribute.js | 4 Source/UBCS-WEB/src/views/modeling/Version.vue | 57 ++++++- Source/UBCS-WEB/src/views/modeling/Business.vue | 94 +++++++----- Source/UBCS-WEB/src/views/modeling/originalAdd.vue | 167 ++++++++++++----------- 7 files changed, 253 insertions(+), 146 deletions(-) diff --git a/Source/UBCS-WEB/src/api/omd/OmdAttribute.js b/Source/UBCS-WEB/src/api/omd/OmdAttribute.js index 0573ad8..6e23b4e 100644 --- a/Source/UBCS-WEB/src/api/omd/OmdAttribute.js +++ b/Source/UBCS-WEB/src/api/omd/OmdAttribute.js @@ -24,12 +24,12 @@ }) } -export const remove = (ids) => { +export const remove = (oid) => { return request({ url: '/api/ubcs-omd/attribute/remove', method: 'post', params: { - ids, + oid, } }) } diff --git a/Source/UBCS-WEB/src/views/modeling/Business.vue b/Source/UBCS-WEB/src/views/modeling/Business.vue index 807155a..35923fd 100644 --- a/Source/UBCS-WEB/src/views/modeling/Business.vue +++ b/Source/UBCS-WEB/src/views/modeling/Business.vue @@ -4,7 +4,8 @@ <el-button-group> <el-button type="primary" @click="businessAdd" size="small"> <i class="el-icon-plus"></i> 鏂板</el-button> <el-button type="primary" @click="businessEdit" size="small"><i class="el-icon-edit"></i> 淇敼</el-button> - <el-button type="primary" @click="selectFromTable" size="small"><i class="el-icon-thumb"></i> 浠庡凡鏈変腑鑾峰彇</el-button> + <el-button type="primary" @click="selectFromTable" size="small"><i class="el-icon-thumb"></i> + 浠庡凡鏈変腑鑾峰彇</el-button> </el-button-group> </el-header> <el-container> @@ -27,14 +28,16 @@ <basic-container> <p style="margin-top: 10px;font-weight: 570;font-size: 19px">鍩烘湰淇℃伅</p> <el-descriptions class="margin-top" :column="3" :size="size" border> - <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> + <el-descriptions-item :labelStyle="descriptionOption.labelStyle" + :contentStyle="descriptionOption.contentStyle"> <template slot="label"> <i :class="icons.key"></i> 鑻辨枃鍚嶇О </template> {{ obj.id }} </el-descriptions-item> - <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> + <el-descriptions-item :labelStyle="descriptionOption.labelStyle" + :contentStyle="descriptionOption.contentStyle"> <template slot="label"> <i :class="icons.name"></i> 涓枃鍚嶇О @@ -42,20 +45,22 @@ {{ obj.name }} </el-descriptions-item> <el-descriptions-item> - <template slot="label" :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> + <template slot="label" :labelStyle="descriptionOption.labelStyle" + :contentStyle="descriptionOption.contentStyle"> <i :class="icons.tableName"></i> 鏁版嵁搴撹〃鍚� </template> {{ obj.tableName }} </el-descriptions-item> - <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> + <el-descriptions-item :labelStyle="descriptionOption.labelStyle" + :contentStyle="descriptionOption.contentStyle"> <template slot="label"> <i :class="icons.domain"></i> 鎵�灞為鍩� </template> - <el-tag size="small"> - {{ obj.domainText }} - </el-tag> + <el-tag size="small"> + {{ obj.domainText }} + </el-tag> </el-descriptions-item> <!-- <el-descriptions-item> <template slot="label"> @@ -71,28 +76,31 @@ </template> {{ obj.sss }} </el-descriptions-item> --> - <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> + <el-descriptions-item :labelStyle="descriptionOption.labelStyle" + :contentStyle="descriptionOption.contentStyle"> <template slot="label"> <i :class="icons.revisionRule"></i> 鐗堟湰瑙勫垯 </template> {{ obj.versionRule }} </el-descriptions-item> - <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> + <el-descriptions-item :labelStyle="descriptionOption.labelStyle" + :contentStyle="descriptionOption.contentStyle"> <template slot="label"> <i :class="icons.lifeCycle"></i> 鐢熷懡鍛ㄦ湡 </template> {{ obj.lifeCycleId }} </el-descriptions-item> - <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> + <el-descriptions-item :labelStyle="descriptionOption.labelStyle" + :contentStyle="descriptionOption.contentStyle"> <template slot="label"> <i :class="icons.view"></i> 瑙嗗浘 </template> - <el-tag size="small"> + <el-tag size="small"> {{ obj.viewText }} - </el-tag> + </el-tag> </el-descriptions-item> <!-- <el-descriptions-item> <template slot="label"> @@ -101,7 +109,8 @@ </template> {{ obj.implClass }} </el-descriptions-item> --> - <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> + <el-descriptions-item :labelStyle="descriptionOption.labelStyle" + :contentStyle="descriptionOption.contentStyle"> <template slot="label"> <i :class="icons.desc"></i> 鎻忚堪 @@ -114,9 +123,9 @@ <basic-container> <p style="margin-top: 10px;font-weight: 570;font-size: 19px">灞炴�у垪琛�</p> <avue-crud class="attributeCrud" v-model="obj" :data="obj.attributes" :option="loadOption"> - <template slot="attrDataTypeText" slot-scope="{row}" > - <el-tag>{{row.attrDataTypeText}}</el-tag> - </template> + <template slot="attrDataTypeText" slot-scope="{row}"> + <el-tag>{{ row.attrDataTypeText }}</el-tag> + </template> </avue-crud> </basic-container> </el-main> @@ -129,7 +138,8 @@ <div class="sep" style="height:7px"> </div> - <avue-crud class="businessCrud" v-model="ref.form" :option="ref.option" :data="ref.data" @selection-change="selectionChange"> + <avue-crud class="businessCrud" v-model="ref.form" :option="ref.option" :data="ref.data" + @selection-change="selectionChange"> </avue-crud> <span slot="footer" class="dialog-footer"> <el-button @click="dialoghandelfalse">鍙� 娑�</el-button> @@ -138,8 +148,9 @@ </el-dialog> </el-container> </el-container> - <business-add ref="btmAdd" :btmType="addOption.btmType" :domainOption="domainOptions" :icons="icons" @refreshTable="initTreeOnLoad"> - </business-add> + <business-add ref="btmAdd" :btmType="addOption.btmType" :domainOption="domainOptions" :icons="icons" + @refreshTable="initTreeOnLoad"> + </business-add> </el-container> </template> <script> @@ -172,8 +183,8 @@ children: 'childList', } }, - addOption:{ - btmType:{}, + addOption: { + btmType: {}, }, loadOption: { border: true, @@ -182,8 +193,8 @@ addBtn: false, menu: false, highlightCurrentRow: true, - refreshBtn:false, - columnBtn:false, + refreshBtn: false, + columnBtn: false, column: [ { label: '鑻辨枃鍚嶇О', @@ -213,12 +224,12 @@ ] }, descriptionOption: { - labelStyle:'text-align:center;width:120px', + labelStyle: 'text-align:center;width:120px', contentStyle: 'width:240px;text-align:center;word-break;break-all;' }, domain: null, domainOptions: [], - icons:{ + icons: { key: 'el-icon-finished', name: 'el-icon-tickets', tableName: 'el-icon-date', @@ -268,9 +279,13 @@ }, methods: { nodeClick(data) { - getDetail(data.oid).then(res => { - this.obj = res.data.data; - }) + if (data.oid) { + getDetail(data.oid).then(res => { + this.obj = res.data.data; + }) + }else{ + this.$message.warning('璇风偣鍑诲瓙鑺傜偣'); + } }, // 鍩烘湰淇℃伅娣诲姞 basicSave(row, done, loading) { @@ -330,17 +345,17 @@ this.initTreeOnLoad(); }) }, - businessAdd(){ + businessAdd() { this.$refs.btmAdd.showSubmitDialog = true; this.ifRefreshBtmAddRefresh(); }, - businessEdit(){ + businessEdit() { var json = JSON.stringify(this.obj); this.$refs.btmAdd.btmType = JSON.parse(json); this.$refs.btmAdd.showSubmitDialog = true; this.ifRefreshBtmAddRefresh(); }, - ifRefreshBtmAddRefresh(){ + ifRefreshBtmAddRefresh() { // this.$refs.btmAdd.refreshAttrTable(); } }, @@ -353,13 +368,14 @@ border-radius: 10px; } -.businessCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu{ - display: none !important; +.businessCrud>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { + display: none !important; } -.attributeCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu{ - display: none !important; + +.attributeCrud>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { + display: none !important; } -.businessTreeContainer > .el-card > .el-card__body { + +.businessTreeContainer>.el-card>.el-card__body { height: 775px; -} -</style> +}</style> diff --git a/Source/UBCS-WEB/src/views/modeling/LinkType.vue b/Source/UBCS-WEB/src/views/modeling/LinkType.vue index afadda5..43e926a 100644 --- a/Source/UBCS-WEB/src/views/modeling/LinkType.vue +++ b/Source/UBCS-WEB/src/views/modeling/LinkType.vue @@ -255,7 +255,6 @@ this.addOption.linkType = JSON.parse(json); this.$refs.linkAdd.linkType = this.addOption.linkType; this.$refs.linkAdd.showSubmitDialog = true; - console.log(this.obj); }, // 浠庡凡鏈変腑鑾峰彇鎸夐挳鐐瑰嚮浜嬩欢 selectFromTable() { diff --git a/Source/UBCS-WEB/src/views/modeling/Version.vue b/Source/UBCS-WEB/src/views/modeling/Version.vue index 5898873..2aaa39c 100644 --- a/Source/UBCS-WEB/src/views/modeling/Version.vue +++ b/Source/UBCS-WEB/src/views/modeling/Version.vue @@ -63,20 +63,38 @@ searchMenuSpan:5, highlightCurrentRow: true, stripe:true, + viewBtn:false, + columnBtn:false, column:[ { - label: '', + label: '閫夋嫨', prop: 'radio', - width: 120 + width: 120, + display:false }, { label:'鑻辨枃鍚嶇О', - prop: 'id' + prop: 'id', + rules: [ + { + required: true, + message: '鑻辨枃鍚嶇О涓嶈兘涓虹┖', + trigger: 'blur' + } + ] }, { label:"涓枃鍚嶇О", prop:"name", search:true, + required: true, + rules: [ + { + required: true, + message: '涓枃鍚嶇О涓嶈兘涓虹┖', + trigger: 'blur' + } + ] }, { label:"璺宠穬瀛楃", @@ -84,11 +102,25 @@ }, { label: "鍒濆鍊�", - prop:"startCode" + prop:"startCode", + rules: [ + { + required: true, + message: '鍒濆鍊间笉鑳戒负绌�', + trigger: 'blur' + } + ] }, { label: "姝ラ暱", - prop: "serialStep" + prop: "serialStep", + rules: [ + { + required: true, + message: '姝ラ暱涓嶈兘涓虹┖', + trigger: 'blur' + } + ] }, { label: "鍓嶇紑", @@ -171,11 +203,16 @@ }) }, searchChange(params, done) { - if (done) done(); - this.params = params; - this.page.currentPage = 1; - this.getList(); - this.$message.success('鎼滅储鎴愬姛') + var p = {"name_like" : params.name} + getPage(this.page.currentPage,this.page.pageSize,p).then(res => { + const data = res.data.data + this.loading = false; + this.page.total = data.total; + this.data = data.records; + }); + if (done) { + done(); + } }, refreshChange() { this.getList(); diff --git a/Source/UBCS-WEB/src/views/modeling/original.vue b/Source/UBCS-WEB/src/views/modeling/original.vue index eaf8f50..805e99f 100644 --- a/Source/UBCS-WEB/src/views/modeling/original.vue +++ b/Source/UBCS-WEB/src/views/modeling/original.vue @@ -8,15 +8,18 @@ <el-radio v-model="selectRow" :label="row.$index"> </el-radio> </template> - <template slot="menu"> - <el-button icon="el-icon-edit" size="small" type="text" @click="updateSave">缂栬緫</el-button> - <el-button icon="el-icon-delete" size="small" type="text" @click="deleteSave">鍒犻櫎</el-button> + <template slot="menu" slot-scope="{row,index}"> + <el-button icon="el-icon-edit" size="small" type="text" @click="updateSave(row,index)">缂栬緫</el-button> + <el-button icon="el-icon-delete" size="small" type="text" @click="deleteSave(row,index)">鍒犻櫎</el-button> </template> <template slot="menuLeft"> <el-button size="small" type="primary" icon="el-icon-plus" @click="addSave">鏂� 澧� </el-button> <el-button size="small" plain type="primary" icon="el-icon-zoom-in" @click="applyRangeOpen">鏌ョ湅浣跨敤鑼冨洿 </el-button> + <el-input placeholder="鎸夊睘鎬ц嫳鏂囧悕绉版煡璇�" v-model="searchId" clearable prefix-icon="el-icon-search" class="attrSearch" + size="small" @change="doSearch" type="text"></el-input> + <el-button size="small" plain type="primary" icon="el-icon-search" @click="doSearch"> 鎼滅储</el-button> </template> <template slot="typeValue" slot-scope="{row}"> <el-tag>{{ row.typeValue }}</el-tag> @@ -126,7 +129,7 @@ </el-tabs> </basic-container> </el-aside> - <originalAdd ref="originalAdd" :attribute="attribute" @refreshTable="refreshChange"></originalAdd> + <originalAdd ref="originalAdd" @refreshTable="refreshChange"></originalAdd> </el-container> </template> @@ -154,6 +157,7 @@ attribute: { nullable: true }, + editAttibute: {}, applyRangeData: [], option: { height: "550px", @@ -169,6 +173,7 @@ addBtn: false, editBtn: false, delBtn: false, + columnBtn:false, column: [{ label: "閫夋嫨", prop: "radio", @@ -246,7 +251,8 @@ itemData: {}, activeName: "referTab", form: {} - } + }, + searchId: '', }; }, created() { @@ -259,14 +265,21 @@ this.$refs.originalAdd.showSubmitDialog = true; this.$refs.originalAdd.attribute = {}; }, - updateSave() { + updateSave(row,index) { + this.selectRow = index; + var json = JSON.stringify(row); + this.editAttibute = JSON.parse(json); + this.editAttibute.nullable = row.nullable == 'true' ? true : false; + this.$refs.originalAdd.attribute = this.editAttibute; this.$refs.originalAdd.showSubmitDialog = true; - this.$refs.originalAdd.attribute = this.attribute; + this.refreshChange() }, - deleteSave() { - remove(this.itemForm.itemData).then(res => { + deleteSave(row,index) { + console.log(row); + remove(row.oid).then(res => { this.$message.success("鍒犻櫎鎴愬姛"); }); + this.refreshChange(); }, onLoad(page, params = {}) { this.loading = true; @@ -303,6 +316,10 @@ }); }, + doSearch(){ + var params = {"id_like":this.searchId}; + this.onLoad(this.page,params); + } }, components: { Versionpackage } } @@ -312,4 +329,10 @@ .applyRangeTable>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { display: none !important; } +.attrSearch { + width:201px; +} +.attrSearch > .el-input__inner { + width: 200px; +} </style> diff --git a/Source/UBCS-WEB/src/views/modeling/originalAdd.vue b/Source/UBCS-WEB/src/views/modeling/originalAdd.vue index fc2bae1..c6e0c48 100644 --- a/Source/UBCS-WEB/src/views/modeling/originalAdd.vue +++ b/Source/UBCS-WEB/src/views/modeling/originalAdd.vue @@ -27,10 +27,12 @@ <el-switch v-model="attribute.nullable" active-text="鍏佽" inactive-text="涓嶅厑璁�"></el-switch> </el-form-item> <el-form-item label="闀垮害" label-width="100px" prop="maxLength"> - <el-input-number v-model="attribute.maxLength" :min="1" :max="4000" :step="1" controls-position="right"></el-input-number> + <el-input-number v-model="attribute.maxLength" :min="1" :max="4000" :step="1" + controls-position="right"></el-input-number> </el-form-item> - <el-form-item label="绮惧害" label-width="100px" v-if="attribute.typeValue == 'VTDouble'"> - <el-input-number v-model="attribute.precision" :min="1" :max="20" :step="1" controls-position="right" @change="changeNumber"></el-input-number> + <el-form-item label="绮惧害" label-width="100px" v-if="attribute.typeKey == 'VTDouble'"> + <el-input-number v-model="attribute.precision" :min="1" :max="20" :step="1" controls-position="right" + @change="changeNumber"></el-input-number> </el-form-item> <el-form-item label="鎻忚堪" label-width="100px"> <el-input v-model="attribute.description" type="text"></el-input> @@ -59,7 +61,7 @@ </el-input> </el-form-item> <el-form-item label="鏋氫妇椤�" label-width="100px"> - + </el-form-item> </el-tab-pane> </el-tabs> @@ -74,7 +76,7 @@ <el-container> <el-aside> <basic-container> - <span class="el-dialog__title"> {{ domain.treeOption.title }} </span> + <span class="el-dialog__title"> {{ domain.treeOption.title }} </span> <div style="height:20px;"></div> <avue-tree id="domain" :data="domain.data" :option="domain.treeOption" @node-click="nodeClick" class="businessTree" style="height: 418px"> @@ -89,7 +91,8 @@ </el-aside> <el-main> <basic-container> - <avue-crud ref="btmTable" :option="btmRefer.option" :data="btmRefer.data" class="btmTable" @row-click="btmReferClick"> + <avue-crud ref="btmTable" :option="btmRefer.option" :data="btmRefer.data" class="btmTable" + @row-click="btmReferClick"> <template slot="radio" slot-scope="{row}"> <el-radio v-model="btmRefer.selectRow" :label="row.$index"> </el-radio> @@ -105,9 +108,10 @@ </div> </el-dialog> <!-- 閫夋嫨鏋氫妇鏃剁殑寮圭獥 --> - <el-dialog title="鏋氫妇鍒楄〃" :visible.sync="enumRefer.show" append-to-body @close="closeEnumDialog" width="70%" + <el-dialog title="鏋氫妇鍒楄〃" :visible.sync="enumRefer.show" append-to-body @close="closeEnumDialog" width="70%" style="height: 115vh;"> - <avue-crud ref="eunmTable" :option="enumRefer.option" :data="enumRefer.data" class="enumTable" @row-click="enumReferClick" :page.sync="enumRefer.enumPage"> + <avue-crud ref="eunmTable" :option="enumRefer.option" :data="enumRefer.data" class="enumTable" + @row-click="enumReferClick" :page.sync="enumRefer.enumPage"> <template slot="radio" slot-scope="{row}"> <el-radio v-model="enumRefer.selectRow" :label="row.$index"> </el-radio> @@ -124,9 +128,9 @@ </template> <script> -import { getDictionary,getParentList } from '@/api/omd/enum' -import { initTree,btmPage } from '@/api/omd/btmType' -import { add} from '@/api/omd/OmdAttribute' +import { getDictionary, getParentList } from '@/api/omd/enum' +import { initTree, btmPage } from '@/api/omd/btmType' +import { add } from '@/api/omd/OmdAttribute' export default { name: 'originalAdd', props: { @@ -181,24 +185,24 @@ highlightCurrentRow: true, column: [ { - label: '', - prop: 'radio', - width: 60, - hide: false - }, - { - label: '鑻辨枃鍚嶇О', - prop: 'id', - align: 'center', - searchSpan:8, - search: true, - }, { - label: '涓枃鍚嶇О', - prop: 'name', - align: 'center', - searchSpan:8, - search: true, - }] + label: '', + prop: 'radio', + width: 60, + hide: false + }, + { + label: '鑻辨枃鍚嶇О', + prop: 'id', + align: 'center', + searchSpan: 8, + search: true, + }, { + label: '涓枃鍚嶇О', + prop: 'name', + align: 'center', + searchSpan: 8, + search: true, + }] }, // 鍙傜収椤甸潰琛ㄦ牸鏁版嵁 data: [], @@ -231,17 +235,17 @@ prop: 'radio', width: 60, hide: false - },{ + }, { label: '鏋氫妇浠e彿', prop: 'name', align: 'center', - searchSpan:8, + searchSpan: 8, search: true, }, { label: '鏋氫妇鍚嶇О', prop: 'label', align: 'center', - searchSpan:8, + searchSpan: 8, search: true, }] }, @@ -283,30 +287,36 @@ this.referToFlag = true; this.$refs.form.resetFields(); }, - submitAttribute() { - add(this.attribute).then(res => { - this.$message.success("淇濆瓨鎴愬姛"); - this.showSubmitDialog = false; - this.attribute = {}; - this.$emit('refreshTable'); - }); - + submitAttribute() { + const that = this; + this.$refs.form.validate(function (pass, field) { + if (pass) { + add(that.attribute).then(res => { + that.$message.success("淇濆瓨鎴愬姛"); + that.showSubmitDialog = false; + that.attribute = {}; + that.$emit('refreshTable'); + }); + } else { + that.$message.error('蹇呭~'); + } + }) }, cancleSubmit() { this.closeSubmitDialog(); }, closeEnumDialog() { this.cancleEnum(); - }, - closeReferDialog() { + }, + closeReferDialog() { this.cancleBtm(); }, - confirmBtm() { + confirmBtm() { this.attribute.referToId = this.btmRefer.selectItem.oid; this.attribute.referToName = this.btmRefer.selectItem.name; this.btmRefer.show = false; }, - cancleBtm() { + cancleBtm() { this.btmRefer.selectItem = {}; this.btmRefer.show = false; this.btmRefer.selectRow = ''; @@ -316,8 +326,8 @@ this.attribute.dictCode = this.enumRefer.selectItem.name; this.attribute.dictValue = this.enumRefer.selectItem.label; this.enumRefer.show = false; - }, - cancleEnum() { + }, + cancleEnum() { this.enumRefer.selectItem = {}; this.enumRefer.show = false; this.enumRefer.selectRow = ''; @@ -340,19 +350,19 @@ // 鍙傜収绫诲瀷鏍戠殑鐐瑰嚮浜嬩欢 nodeClick(data) { // 鍖哄垎涓氬姟绫诲瀷鐨勬煡璇㈠拰閾炬帴绫诲瀷鐨勬煡璇� - if(this.attribute.referTypeKey == 'btmType'){ - btmPage(this.btmRefer.btmPage.currentPage,this.btmRefer.btmPage.pageSize,{domain:data.id}).then(res => { + if (this.attribute.referTypeKey == 'btmType') { + btmPage(this.btmRefer.btmPage.currentPage, this.btmRefer.btmPage.pageSize, { domain: data.id }).then(res => { this.btmRefer.data = res.data.data.records; this.btmRefer.btmPage.total = res.data.data.total; }) } - if(this.attribute.referTypeKey == 'linkType'){ + if (this.attribute.referTypeKey == 'linkType') { } }, // 鏋氫妇绫诲瀷杈撳叆妗嗚幏寰楃劍鐐规椂鐨勪簨浠� openEnumConfig() { - getParentList(this.enumRefer.enumPage.currentPage,this.enumRefer.enumPage.pageSize).then(res => { + getParentList(this.enumRefer.enumPage.currentPage, this.enumRefer.enumPage.pageSize).then(res => { this.enumRefer.enumPage.total = res.data.data.total; this.enumRefer.data = res.data.data.records; }) @@ -361,20 +371,20 @@ // 灞炴�х被鍨嬩笅鎷夋閫夋嫨浜嬩欢 typeSelectChange(value) { if (value == 'VTString') { - this.$set(this.attribute,"maxLength",150) + this.$set(this.attribute, "maxLength", 150) } else if (value == 'VTInteger') { - this.$set(this.attribute,"maxLength",50) + this.$set(this.attribute, "maxLength", 50) } else if (value == 'VTBoolean') { - this.$set(this.attribute,"maxLength",5) + this.$set(this.attribute, "maxLength", 5) } else if (value == 'VTDouble') { - this.$set(this.attribute,"maxLength",26) - this.$set(this.attribute,"precision",8) + this.$set(this.attribute, "maxLength", 26) + this.$set(this.attribute, "precision", 8) } else if (value == 'VTLong') { - this.$set(this.attribute,"maxLength",150) + this.$set(this.attribute, "maxLength", 150) } else if (value == 'VTDate' || value == 'VTTime' || value == 'VTDateTime') { - this.$set(this.attribute,"maxLength",6) + this.$set(this.attribute, "maxLength", 6) } else { - this.$set(this.attribute,"maxLength",50) + this.$set(this.attribute, "maxLength", 50) } this.attribute.typeCode = 'attributeType'; this.attribute.typeKey = value; @@ -395,7 +405,7 @@ this.$message.error('灞炴�х被鍨嬫病鎵惧埌鎴栬�呮湭瀹氫箟') }) }, - initAttributeReferTypeList(){ + initAttributeReferTypeList() { getDictionary({ code: 'attributeReferType' }).then(res => { res.data.data.forEach(element => { this.btmRefer.referTypeList.push( @@ -406,33 +416,33 @@ this.$message.error('鍙傜収绫诲瀷娌℃壘鍒版垨鑰呮湭瀹氫箟') }) }, - btmReferClick(row){ + btmReferClick(row) { this.btmRefer.selectItem = row; this.btmRefer.selectRow = row.$index; }, - enumReferClick(row){ + enumReferClick(row) { this.enumRefer.selectItem = row; this.enumRefer.selectRow = row.$index; }, // 鍙傜収鍚嶇О鐐瑰嚮娓呴櫎鏁版嵁 - clearReferTo(){ - this.$delete(this.attribute,'referToId'); - this.$delete(this.attribute,'referToName'); + clearReferTo() { + this.$delete(this.attribute, 'referToId'); + this.$delete(this.attribute, 'referToName'); this.btmRefer.selectItem = {}; this.btmRefer.selectRow = ''; }, - handleClick(tab){ - // 鍥犱负鍙兘鍙傜収鍜屾灇涓句簩閫変竴銆傛墍浠ュ湪鍒囨崲鐨勬椂鍊欐妸灞炴�х粰娓呯┖銆� - this.$delete(this.attribute,'referTypeCode'); - this.$delete(this.attribute,'referTypeKey'); - this.$delete(this.attribute,'referTypeValue'); - this.$delete(this.attribute,'referToId'); - this.$delete(this.attribute,'referToName'); - this.$delete(this.attribute,'dictCode'); - this.$delete(this.attribute,'dictKey'); - this.$delete(this.attribute,'dictValue'); - this.$delete(this.attribute,'usingDict'); - } + // handleClick(tab){ + // // 鍥犱负鍙兘鍙傜収鍜屾灇涓句簩閫変竴銆傛墍浠ュ湪鍒囨崲鐨勬椂鍊欐妸灞炴�х粰娓呯┖銆� + // this.$delete(this.attribute,'referTypeCode'); + // this.$delete(this.attribute,'referTypeKey'); + // this.$delete(this.attribute,'referTypeValue'); + // this.$delete(this.attribute,'referToId'); + // this.$delete(this.attribute,'referToName'); + // this.$delete(this.attribute,'dictCode'); + // this.$delete(this.attribute,'dictKey'); + // this.$delete(this.attribute,'dictValue'); + // this.$delete(this.attribute,'usingDict'); + // } } } </script> @@ -450,7 +460,6 @@ width: 200px; } -.attributeForm>.el-form-item>.el-form-item__content> .el-select>.el-input>.el-input__inner { +.attributeForm>.el-form-item>.el-form-item__content>.el-select>.el-input>.el-input__inner { width: 200px; -} -</style> \ No newline at end of file +}</style> \ No newline at end of file diff --git a/Source/UBCS-WEB/src/views/modeling/status.vue b/Source/UBCS-WEB/src/views/modeling/status.vue index 9d7c465..63e257a 100644 --- a/Source/UBCS-WEB/src/views/modeling/status.vue +++ b/Source/UBCS-WEB/src/views/modeling/status.vue @@ -65,19 +65,30 @@ stripe:true, column:[ { - label: '', + label: '閫夋嫨', prop: 'radio', - width: 120 + width: 120, + display: false }, { label:'鑻辨枃鍚嶇О', prop: 'id', - search: true + search: true, + rules: [{ + required: true, + message: '鑻辨枃鍚嶇О涓嶈兘涓虹┖', + trigger: 'blur' + }] }, { label:'涓枃鍚嶇О', prop:'name', search:true, + rules: [{ + required: true, + message: '涓枃鍚嶇О涓嶈兘涓虹┖', + trigger: 'blur' + }] }, { label: '鎻忚堪', @@ -149,10 +160,22 @@ }) }, searchChange(params, done) { - if (done) done(); - this.params = params; + this.loading = true; this.page.currentPage = 1; - this.getList(); + const p = {}; + if(params.id){ + p["id_like"] = params.id; + } + if(params.name){ + p["name_like"] = params.name + } + getPage(this.page.currentPage,this.page.pageSize,p).then(res => { + const data = res.data.data + this.loading = false; + this.page.total = data.total; + this.data = data.records; + done(); + }) this.$message.success('鎼滅储鎴愬姛') }, refreshChange() { -- Gitblit v1.9.3