From 344ada5bc3e41c5fb42ae0e8ac590b64b7cb04ca Mon Sep 17 00:00:00 2001 From: ludc Date: 星期六, 24 二月 2024 20:30:16 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS-WEB/src/api/docking/info.js | 16 Source/UBCS-WEB/src/views/statistic/statisticPage.vue | 4 Source/UBCS-WEB/src/views/docking/info.vue | 23 Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue | 11 Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | 130 ++++--- Source/UBCS-WEB/src/views/docking/infoForm.vue | 7 Source/UBCS-WEB/src/components/advanced-query/advancedQuery.vue | 752 ++++++++++++++++++++++++---------------------- 7 files changed, 497 insertions(+), 446 deletions(-) diff --git a/Source/UBCS-WEB/src/api/docking/info.js b/Source/UBCS-WEB/src/api/docking/info.js index 6e8c242..81a1fb3 100644 --- a/Source/UBCS-WEB/src/api/docking/info.js +++ b/Source/UBCS-WEB/src/api/docking/info.js @@ -61,19 +61,27 @@ } // header鍙傛暟 -export const HeaderRequest =(params) => { +export const HeaderRequest =(page,limit,params) => { return request({ url: '/api/ubcs-code/dockingManagement/gridHeader', method: 'get', - ...params + params: { + ...params, + page, + limit + } }) } // 鍙傛暟璇锋眰 -export const ParmRequest =(params) => { +export const ParmRequest =(page,limit,params) => { return request({ url: '/api/ubcs-code/dockingManagement/gridParam', method: 'get', - ...params + params:{ + ...params, + page, + limit + } }) } diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue index 7b9018a..e0e64c2 100644 --- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue +++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue @@ -415,9 +415,8 @@ }, tableHeadDataFateher: { handler(newval, oldval) { - // console.log(newval) - if (newval.length > 0) { - this.options = newval.tableDefineVO.seniorQueryColumns + if (Object.keys(newval).length > 0) { + this.options = newval.tableDefineVO.seniorQueryColumns; } } }, @@ -623,12 +622,16 @@ async submitSync() { if (this.SyncValue) { this.syncLoading = true; - const response = await syncSearch({enDate: this.SyncValue}) + const response = await syncSearch({endDate: this.SyncValue}) if (response.status === 200) { this.$message.success('鍚屾鎴愬姛锛�') this.syncLoading = false; this.syncDialogBox = false; this.SyncValue = ""; + }else { + this.syncLoading = false; + this.syncDialogBox = false; + this.SyncValue = ""; } } else { this.$message.warning('璇烽�夋嫨鏈�鍚庢洿鏂版椂闂达紒') diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue index dd00bd6..9b9671d 100644 --- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue +++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue @@ -164,31 +164,19 @@ @click="TemRefresh">鍒锋柊</el-button> <el-button v-if="permissionList.CloneBtnStuatus" plain size="small" type="primary" @click="CloneBtn">浠庡叾瀹冩ā鏉垮厠闅�</el-button> <!-- 鏌ヨ瀵硅瘽妗�--> - <el-dialog :visible.sync="FindFormVisible" append-to-body title="楂樼骇鏌ヨ"> - <div> - <el-button size="small" type="primary" @click="AdvQueries">鏌ヨ</el-button> - <el-button size="small" type="primary">閲嶇疆</el-button> - </div> - <div style="padding-left: 80px;margin-top: 15px;"> - <template v-for="(value, key) in FindSelect"> - <div style="display: flex; justify-content: space-around; width: 85%; margin-bottom: 15px"> - <el-select v-model="FindSelect[key]" placeholder="璇烽�夋嫨" style="width: 28%" - @change="handleSelectChange(key)"> - <el-option label="妯℃澘缂栧彿" value="0"></el-option> - <el-option label="妯℃澘鍚嶇О" value="1"></el-option> - <el-option label="妯℃澘鎻忚堪" value="2"></el-option> - <el-option label="鐗堟湰鍙�" value="3"></el-option> - <el-option label="鐘舵��" value="4"></el-option> - </el-select> - <el-select v-model="condition[0]" placeholder="璇烽�夋嫨" style="width: 15%"> - <el-option label="鍖呭惈" value="0"></el-option> - <el-option label="绛変簬" value="1"></el-option> - </el-select> - <el-input v-model="QueryArray[key]" style="width: 49%"></el-input> - <span> <i class="el-icon-delete" style="font-size: 22px;margin-top:8px;margin-left: 10px"/></span> + <el-dialog :visible.sync="FindFormVisible" append-to-body title="楂樼骇鏌ヨ" width="30%" @close="searchReset"> + <div style="text-align: center; margin-top: 5px;"> + <el-select v-model="searchSelect" style="width: 35%"> + <el-option v-for="item in crudFindTreeArray" :key="item.field" :label="item.title" + :value="item.queryField"></el-option> + </el-select> + <el-input v-model="SearchValue" + placeholder="璇疯緭鍏ュ叧閿瓧杩涜鏌ヨ" style="width: 45%; margin-left: 5px;"></el-input> </div> - </template> - </div> + <span slot="footer" class="dialog-footer"> + <el-button type="primary" @click="advQueries">鏌ヨ</el-button> + <el-button type="danger" @click="searchReset">閲嶇疆</el-button> + </span> </el-dialog> <!-- 妯℃澘鍏嬮殕 --> <el-dialog :before-close="cloneClose" :visible.sync="CloneVisible" append-to-body title="鍏嬮殕妯℃澘"> @@ -378,6 +366,40 @@ name: "classifyTrees.vue", data() { return { + crudFindTreeArray: [ + { + title: '妯℃澘缂栧彿', + field: 'id', + fieldType: 'text', + queryField: 'id' + }, + { + title: '妯℃澘鍚嶇О', + field: 'name', + fieldType: 'text', + queryField: 'name' + }, + { + title: '妯℃澘鎻忚堪', + field: 'description', + fieldType: 'text', + queryField: 'description' + }, + { + title: '鐗堟湰鍙�', + field: 'revisionSeq', + fieldType: 'text', + queryField: 'revisionSeq' + }, + { + title: '鐘舵��', + field: 'lcStatusText', + fieldType: 'text', + queryField: 'lcStatusText' + }, + ], + searchSelect: 'id', + SearchValue: '', allButtons: Boolean, btnAuthList: [], activeName: 'first', @@ -512,7 +534,7 @@ Treedata: [], CloneTreedata: [], Treeoption: { - height:'auto', + height: 'auto', addBtn: false, editBtn: false, delBtn: false, @@ -669,11 +691,12 @@ showEditBtn: false, //浼犻�掔粰鍒嗙被鎺堟潈瀛愮粍浠跺璇濇鐨勫綋鍓嶉�変腑鐨勫垎绫昏妭鐐逛俊鎭� classifyData: "", + } }, watch: {}, mounted() { - this.type = this.tabOption.column[0]; + this.type = this.tabOption.column[0] || {label: '鍩烘湰淇℃伅', prop: 'tab1'}; this.getAttr(); const treeEle = this.$refs.tree.$el treeEle.addEventListener('click', (e) => { @@ -768,7 +791,7 @@ codeClassifyOid: '' } } - } + }, }, created() { }, @@ -1107,7 +1130,6 @@ this.loading = false; } }, - async Deactivate() { if (Object.keys(this.nodeClickList).length < 1) { this.$message.warning('璇峰厛浠庢爲涓婇�夋嫨涓�鏉℃暟鎹�'); @@ -1152,7 +1174,7 @@ }, //鏍戠偣鍑讳簨浠� async nodeClick(data) { - const response = this.findTheTopLevelNode(data,this.Treedata) + const response = this.findTheTopLevelNode(data, this.Treedata) this.classifyData = response; // console.log(response) // console.log('response',response.attributes.id) @@ -1199,10 +1221,9 @@ this.$message.error(error); } }, - // 閫掑綊鏌ユ壘椤跺眰鑺傜偣Id - findTheTopLevelNode(data,TreeData){ - if(data.parentId === ""){ + findTheTopLevelNode(data, TreeData) { + if (data.parentId === "") { return data; } const parentNode = this.findParentNode(data.parentId, TreeData); @@ -1211,7 +1232,7 @@ } }, // 閫掑綊鏌ユ壘鍑烘潵澶氬眰鑺傜偣鐨勭埗鑺傜偣 - findParentNode(parentId, TreeData){ + findParentNode(parentId, TreeData) { for (const node of TreeData) { if (node.oid === parentId) { return node; @@ -1276,34 +1297,28 @@ handleChange(column) { this.type = column; }, - AdvQueries() { - this.FindFormVisible = false - //濡傛灉鍏ㄩ儴涓虹┖ allEmpty涓簍rue - const allEmpty = Object.values(this.QueryArray).every(value => !value); - //濡傛灉鍏ㄩ儴涓虹┖锛岀偣鍑绘煡璇㈠嚭鐜版墍鏈夋暟鎹� - if (allEmpty) { - gridCodeClassifyTemplate().then(res => { - this.Formlist = res.data.data - }) + advQueries() { + if (this.SearchValue === "") { + this.$message.warning('璇疯緭鍏ヨ鏌ヨ鐨勫唴瀹癸紒'); } else { - //榛樿鏄瓑浜� - gridCodeClassifyFindTemplate({'conditionMap[id]': this.QueryArray.id}, - {'conditionMap[name]': this.QueryArray.name}, - {'conditionMap[description]': this.QueryArray.description}, - {'conditionMap[revisionValue]': this.QueryArray.revisionValue}, - {'conditionMap[lcStatus]': this.QueryArray.lcStatus} - ).then(res => { - this.Formlist = res.data.data - }) + const condition = { + 'conditionMap[codeclassifyoid]': this.nodeClickList.oid, + [`conditionMap[${this.searchSelect}]`]: this.SearchValue + }; + gridCodeClassifyFindTemplate(condition).then(res => { + if (res.data.data.length > 0) { + this.Formlist = res.data.data; + } else { + this.$message.error('鏆傛湭鏌ヨ鍒扮浉鍏虫ā鏉匡紒') + } + this.FindFormVisible = false; + }); } }, - //妯℃澘绠$悊娓叉煋 - CrudRend() { - gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': this.nodeClickList.oid}).then(res => { - this.Formlist = res.data.data - }) + searchReset() { + this.SearchValue = ""; + this.searchSelect = 'id' }, - //妯℃澘绠$悊琛ㄦ牸娣诲姞 CrudRowSave(row, done) { if (this.nodeClickList.length <= 0) { @@ -1548,6 +1563,7 @@ .headerCon > .el-button:nth-child(9) { margin-left: 0; } + ///deep/.el-scrollbar__bar.is-vertical{ // width: 8px; //} diff --git a/Source/UBCS-WEB/src/components/advanced-query/advancedQuery.vue b/Source/UBCS-WEB/src/components/advanced-query/advancedQuery.vue index 4017299..cb35a69 100644 --- a/Source/UBCS-WEB/src/components/advanced-query/advancedQuery.vue +++ b/Source/UBCS-WEB/src/components/advanced-query/advancedQuery.vue @@ -4,389 +4,407 @@ 3銆佺敤鎴疯緭鍏ョ殑鍊间細浠onditionMap[field]鐨勬牸寮忔嫾鎺ュソ杩涜鍥炰紶锛岀劧鍚庡氨闇�瑕佷娇鐢ㄧ殑鍦版柟鑷杩涜鏌ヨ鐨勮皟鐢紱 --> <template> - <el-dialog - title="楂樼骇鏌ヨ" - append-to-body - width="46vw" - style="height: 100vh;overflow: hidden" - v-dialogDrag - :visible.sync="isShowDialog" - lock-scroll - class="avue-dialog avue-dialog--top" - top="-3%" - destroy-on-close - @close="recoverPage"> - <div class="search-total"> - <!-- 澶撮儴鎸夐挳鍖哄煙 --> - <div slot="title" class="dialog-search-button"> - <el-button - type="primary" - size="small" - icon="el-icon-search" - @click="searchSubmit"> - 鏌ヨ - </el-button> - <el-button - type="warning" - size="small" - icon="el-icon-refresh" - @click="resetInput"> - 閲嶇疆 - </el-button> + <el-dialog + v-dialogDrag + :visible.sync="isShowDialog" + append-to-body + class="avue-dialog avue-dialog--top" + destroy-on-close + lock-scroll + style="height: 100vh;overflow: hidden" + title="楂樼骇鏌ヨ" + top="-3%" + width="46vw" + @close="recoverPage"> + <div class="search-total"> + <!-- 澶撮儴鎸夐挳鍖哄煙 --> + <div slot="title" class="dialog-search-button"> + <el-button + icon="el-icon-search" + size="small" + type="primary" + @click="searchSubmit"> + 鏌ヨ + </el-button> + <el-button + icon="el-icon-refresh" + size="small" + type="warning" + @click="resetInput"> + 閲嶇疆 + </el-button> + </div> + <!-- 椤甸潰涓讳綋鍐呭鍖哄煙 --> + <div class="search-content"> + <el-row + v-for="(item,index) in initOptions" + :key="item.queryField" + :span="24"> + <el-col :span="6"> + <div class="grid-content"> + <el-select v-model="searchFormArrays[index].queryField" disabled placeholder="璇烽�夋嫨"> + <el-option + v-for="feildName in options" + :key="feildName.queryField" + :label="feildName.title" + :value="feildName.queryField"> + </el-option> + </el-select> </div> - <!-- 椤甸潰涓讳綋鍐呭鍖哄煙 --> - <div class="search-content"> - <el-row - v-for="(item,index) in initOptions" - :key="item.queryField" - :span="24"> - <el-col :span="6"> - <div class="grid-content"> - <el-select disabled placeholder="璇烽�夋嫨" v-model="searchFormArrays[index].queryField"> - <el-option - v-for="feildName in options" - :key="feildName.queryField" - :label="feildName.title" - :value="feildName.queryField"> - </el-option> - </el-select> - </div> - </el-col> - <el-col :span="4"> - <div class="grid-content"> - <el-select placeholder="璇烽�夋嫨" v-model="searchFormArrays[index].condition"> - <el-option - v-for="condition in item.conditions" - :key="condition.value" - :label="condition.label" - :value="condition.value"> - </el-option> - </el-select> - </div> - </el-col> - <el-col :span="12"> - <div class="grid-content"> - <el-input v-if="item.fieldType==='text' || item.fieldType===''" v-model="searchFormArrays[index].fieldValue" type="text" placeholder="璇疯緭鍏�"></el-input> - <el-select v-else-if="item.fieldType==='combox'" v-model="searchFormArrays[index].fieldValue" placeholder="璇烽�夋嫨"> - <el-option - v-for="option in item.data" - :key="option.itemValue || option.value" - :label="option.itemName || option.label" - :value="option.itemValue || option.value"> - </el-option> - </el-select> - <el-switch v-else-if="item.fieldType==='truefalse'" v-model="searchFormArrays[index].fieldValue"></el-switch> - <el-date-picker v-else-if="item.fieldType==='datetime'" - v-model="searchFormArrays[index].fieldValue" - type="date" - placeholder="閫夋嫨鏃ユ湡"> - </el-date-picker> - <vci-web-refer - v-else-if="item.fieldType==='refer'" - :referConfig="item.referConfigData || {}" - :value="searchFormArrays[index].fieldValue" - :text="item.showField" - :display="!item.hidden" - @setReferValue="val=>setReferValue(val,index)"> - </vci-web-refer> - </div> - </el-col> - <el-col :span="1"> - <div class="grid-content"> - <i class="el-icon-close" @click="removeInput(index)"></i> - </div> - </el-col> - </el-row> + </el-col> + <el-col :span="4"> + <div class="grid-content"> + <el-select v-model="searchFormArrays[index].condition" placeholder="璇烽�夋嫨"> + <el-option + v-for="condition in item.conditions" + :key="condition.value" + :label="condition.label" + :value="condition.value"> + </el-option> + </el-select> </div> - </div> - </el-dialog> + </el-col> + <el-col :span="12"> + <div class="grid-content"> + <el-input v-if="item.fieldType==='text' || item.fieldType===''" + v-model="searchFormArrays[index].fieldValue" placeholder="璇疯緭鍏�" type="text"></el-input> + <el-select v-else-if="item.fieldType==='combox'" v-model="searchFormArrays[index].fieldValue" + placeholder="璇烽�夋嫨"> + <el-option + v-for="option in item.data" + :key="option.itemValue || option.value" + :label="option.itemName || option.label" + :value="option.itemValue || option.value"> + </el-option> + </el-select> + <el-switch v-else-if="item.fieldType==='truefalse'" + v-model="searchFormArrays[index].fieldValue"></el-switch> + <el-date-picker v-else-if="item.fieldType==='datetime'" + v-model="searchFormArrays[index].fieldValue" + placeholder="閫夋嫨鏃ユ湡" + type="date"> + </el-date-picker> + <vci-web-refer + v-else-if="item.fieldType==='refer'" + :display="!item.hidden" + :referConfig="item.referConfigData || {}" + :text="item.showField" + :value="searchFormArrays[index].fieldValue" + @setReferValue="val=>setReferValue(val,index)"> + </vci-web-refer> + </div> + </el-col> + <el-col :span="1"> + <div class="grid-content"> + <i class="el-icon-close" @click="removeInput(index)"></i> + </div> + </el-col> + </el-row> + </div> + </div> + </el-dialog> </template> <script> -import { getDictionary } from "@/api/omd/enum"; +import {getDictionary} from "@/api/omd/enum"; import moment from 'moment'; import vciWebRefer from '../refer/vciWebRefer.vue'; + export default { - components: { vciWebRefer }, - name: "advancedQuery", - props: { - // 瀵硅瘽妗嗘樉绀洪殣钘忔帶鍒� - visible: { - type: "Boolean", - default: false, - }, - // 椤甸潰鏄剧ず閰嶇疆 - options: { - type: "Object", - default: {}, - }, + components: {vciWebRefer}, + name: "advancedQuery", + props: { + // 瀵硅瘽妗嗘樉绀洪殣钘忔帶鍒� + visible: { + type: "Boolean", + default: false, }, - data() { - return { - // 瀵硅瘽妗嗘樉绀烘帶鍒� - isShowDialog: this.visible, - initOptions: [], - // 瀛楁绫诲瀷鏄緭鍏ユ绫诲瀷鐨勬潯浠舵暟缁� - searchConditions: [ - { - value: "_equal", - label: "绛変簬", - },{ - value: "_notequal", - label: "涓嶇瓑浜�", - },{ - value: "_like", - label: "鍖呭惈", - },{ - value: "_notlike", - label: "涓嶅寘鍚�", - } - ], - // 瀛楁绫诲瀷鏄崟閫夋垨涓嬫媺妗嗙被鍨嬬殑鏉′欢鏁扮粍 - switchSearchConditions: [ - { - value: "_equal", - label: "绛変簬", - },{ - value: "_notequal", - label: "涓嶇瓑浜�", - } - ], - // 鍙傜収绫诲瀷鐨勬潯浠舵暟缁� - referSearchConditions: [ - { - value: "_equal", - label: "绛変簬", - },{ - value: "_notequal", - label: "涓嶇瓑浜�", - },{ - value: "_like", - label: "鍖呭惈", - },{ - value: "_notlike", - label: "涓嶅寘鍚�", - } - ], - // 瀛楁绫诲瀷鏄棩鏈� - dateConditions: [ - { - value: "_equal", - label: "绛変簬", - },{ - value: "_notequal", - label: "涓嶇瓑浜�", - },{ - value: "_ge", //澶т簬锛岄粯璁や负澶т簬绛変簬 - label: "澶т簬", - },{ - value: "_le", //灏忎簬锛岄粯璁や负灏忎簬绛変簬 - label: "灏忎簬", - }, - ], - searchFormArrays: [], - fieldValue: '', + // 椤甸潰鏄剧ず閰嶇疆 + options: { + type: "Object", + default: {}, + }, + }, + data() { + return { + // 瀵硅瘽妗嗘樉绀烘帶鍒� + isShowDialog: this.visible, + initOptions: [], + // 瀛楁绫诲瀷鏄緭鍏ユ绫诲瀷鐨勬潯浠舵暟缁� + searchConditions: [ + { + value: "_equal", + label: "绛変簬", + }, { + value: "_notequal", + label: "涓嶇瓑浜�", + }, { + value: "_like", + label: "鍖呭惈", + }, { + value: "_notlike", + label: "涓嶅寘鍚�", } - }, - watch: { - // 鐩戝惉鐖剁粍浠朵紶鐨勭獥鍙f樉绀洪殣钘忕殑鍊� - visible (){ - this.isShowDialog = this.visible; - }, - // 瀵硅瘽妗嗗唴瀹规覆鏌撻厤缃� - options(){ - this.initData(); + ], + // 瀛楁绫诲瀷鏄崟閫夋垨涓嬫媺妗嗙被鍨嬬殑鏉′欢鏁扮粍 + switchSearchConditions: [ + { + value: "_equal", + label: "绛変簬", + }, { + value: "_notequal", + label: "涓嶇瓑浜�", } - }, - methods: { - - initData(){ - // 灏唎ptions閰嶇疆璧嬪�煎埌data涓殑option涓紝閬垮厤娣辨祬鎷疯礉鐨勯棶棰樻墍浠ラ渶瑕佽浆json涔嬪悗鍐嶈祴鍊� - const data = JSON.stringify(this.options); - this.initOptions = JSON.parse(data); - //console.log(this.initOptions); - if(this.initOptions.length > 0){ - let array = []; - this.initOptions.forEach((item,index) => { - if(item.fieldType==='combox') { - let enumCach = item.data || JSON.parse(localStorage.getItem(item.comboxKey)); - if(enumCach != null && enumCach.length > 0) { - item.data = enumCach; - }else { - getDictionary({code: item.comboxKey}).then(res=>{ - item.data = res.data.data; - localStorage.setItem(item.comboxKey,JSON.stringify(res.data.data)); - }) - } - }else if(item.fieldType==='refer'){ - this.$set(item,"referConfigData",{ - title: item.title, - showField: item.showField || item.field, - field: item.field, - placeholder: item.inputTip || '', - options: Object.assign(item.referConfig,{width:"80%"}), - }) - //console.log(item.referConfigData.options); - //console.log(item); - } - let conditions = []; - if(item.fieldType==='text'){ - conditions = this.searchConditions; - }else if (item.fieldType==='combox'|| item.fieldType==='truefalse'){ - conditions = this.switchSearchConditions; - }else if (item.fieldType==='datetime' || item.fieldType==='date') { - conditions = this.dateConditions; - }else { - conditions = this.referSearchConditions; - } - // console.log(conditions); - this.$set(item,"conditions",conditions) - - let add = { - queryField: String(item.queryField), - condition: item.fieldType==='text' ? String("_like"):String("_equal"), - fieldValue: item.fieldType==='truefalse' ? Boolean(false):String(''), - } - array.push(add) - }); - this.searchFormArrays = array; - } - //console.log(this.initOptions); - //console.log(this.searchFormArrays); + ], + // 鍙傜収绫诲瀷鐨勬潯浠舵暟缁� + referSearchConditions: [ + { + value: "_equal", + label: "绛変簬", + }, { + value: "_notequal", + label: "涓嶇瓑浜�", + }, { + value: "_like", + label: "鍖呭惈", + }, { + value: "_notlike", + label: "涓嶅寘鍚�", + } + ], + // 瀛楁绫诲瀷鏄棩鏈� + dateConditions: [ + { + value: "_equal", + label: "绛変簬", + }, { + value: "_notequal", + label: "涓嶇瓑浜�", + }, { + value: "_ge", //澶т簬锛岄粯璁や负澶т簬绛変簬 + label: "澶т簬", + }, { + value: "_le", //灏忎簬锛岄粯璁や负灏忎簬绛変簬 + label: "灏忎簬", }, - /** 涓哄弬鐓х被鍨嬫椂鍊奸�夋嫨涔嬪悗鐨勫鐞� */ - setReferValue(data,index){ - if(data.field) { - this.searchFormArrays[index][data.fieldValue] = data.value || ''; - this.initOptions[index][data.showField] = data.text || ''; - } - }, - - // 灞炴�у垏鎹㈡椂鏌ヨ鏉′欢鍜屾煡璇㈠�间篃闇�瑕佸杈撳叆妗嗚繘琛屽垏鎹� - // changeField(index) { - // //console.log(option,this.searchFormArrays[index],index); - // // 鎵惧埌鏁扮粍涓搴旂殑瑕佸垏鎹负鐨勯偅涓璞� - // let changeItem = this.options.filter((item)=>{ - // return item.queryField == this.searchFormArrays[index].queryField; - // })[0] - // // 濡傛灉鏄痗ombox绫诲瀷鐨勮繕闇�瑕佸鏋氫妇绫诲瀷杩涜璇锋眰 - // if(changeItem.fieldType==='combox' && changeItem.comboxKey != '') { - // changeItem.data = JSON.parse(localStorage.getItem(changeItem.comboxKey)); - // } - // //console.log(changeItem.fieldType); - // // 灏嗗綋鍓嶅垏鎹㈢殑閰嶇疆椤硅祴鍊煎埌option鐨勫搴旂殑閭d釜瀵硅薄杩涜瑕嗙洊 - // this.initOptions[index] = changeItem; - // // 瑕嗙洊v-model鐨勫璞� - // this.searchFormArrays[index] = { - // queryField: String(changeItem.queryField), - // condition: changeItem.fieldType==='text' ? String("_like"):String("_equal"), - // fieldValue: changeItem.fieldType==='truefalse' ? Boolean(false):String(""), - // }; - // //console.log(this.initOptions); - // //console.log(this.searchFormArrays); - // }, - - // 绉婚櫎鎼滅储妗� - - removeInput(index){ - //console.log(this.initOptions); - this.$delete(this.initOptions,index); - this.$delete(this.searchFormArrays,index); - }, - // 閲嶇疆褰撳墠鐣岄潰鐨勮緭鍏ユ - resetInput(){ - this.initData(); - }, - // 鎭㈠椤甸潰 - recoverPage(){ - this.resetInput(); - this.$emit('update:visible', false); - }, - // 鎻愪氦褰撳墠椤甸潰鐨勮緭鍏ョ殑鏌ヨ鏉′欢骞跺仛瀵瑰簲鐨勮繃婊や笌妫�鏌� - searchSubmit(){ - let condtionParam = {}; - const searchConditions = this.searchFormArrays; - for(let index = 0; index < searchConditions.length; index++) { - //console.log(condtionParam['conditionMap['+searchConditions[index].queryField+']']+'' == 'undefined'); - if(searchConditions[index].fieldValue+'' != '' || searchConditions[index].fieldValue+''==='false') { - // 瀛樺湪鐩稿悓鐨勬煡璇㈡潯浠� - if(condtionParam['conditionMap['+searchConditions[index].queryField+']']+'' != 'undefined' ) { - this.$message.warning("瀛樺湪閲嶅鏌ヨ鏉′欢锛岃浠旂粏鏍稿!"); - //console.log(condtionParam['conditionMap['+searchConditions[index].queryField+']']); - return false; - } - let fieldType = this.initOptions[index].fieldType; - // 褰撳嚭鐜版煡璇㈡棩鏈熺殑鏍煎紡鏃�,闇�瑕佸鏃ユ湡鏍煎紡杩涜澶勭悊 - if(fieldType==='datetime' || fieldType==='date'){ - // 灏嗘椂闂磋浆鎹负鏈湴鏃堕棿 - let localTime = moment.utc(searchConditions[index].fieldValue).local(); - // 鏍煎紡鍖栨椂闂翠负鎮ㄦ兂瑕佺殑鏍煎紡 - let formattedTime = localTime.format('YYYY-MM-DD HH:mm:ss'); - condtionParam['conditionMap['+searchConditions[index].queryField+searchConditions[index].condition+']'] = formattedTime; - //console.log(formattedTime); - }else{ - //鎷兼帴鎴恗ap瀵硅薄锛屽皢鏌ヨ瀵硅薄鍜宑ondition鎷兼帴鍦ㄤ竴璧凤紝缁勬垚楂樼骇鏌ヨmap鐨刱ey - condtionParam['conditionMap['+searchConditions[index].queryField+searchConditions[index].condition+']'] = searchConditions[index].fieldValue; - } - } - } - // 鏌ヨ鏉′欢娌℃湁鍑虹幇閲嶅灞炴�э紝骞朵笖杩囨护鎺変簡绌哄�硷紝灏变紶閫掔粰鐖剁粍浠� - //console.log(condtionParam); - this.$emit('echoContion',condtionParam) - this.isShowDialog = false; - }, + ], + searchFormArrays: [], + fieldValue: '', } + }, + watch: { + // 鐩戝惉鐖剁粍浠朵紶鐨勭獥鍙f樉绀洪殣钘忕殑鍊� + visible() { + this.isShowDialog = this.visible; + }, + // 瀵硅瘽妗嗗唴瀹规覆鏌撻厤缃� + options() { + this.initData(); + } + }, + created() { + this.resetInput() + }, + methods: { + + initData() { + // 灏唎ptions閰嶇疆璧嬪�煎埌data涓殑option涓紝閬垮厤娣辨祬鎷疯礉鐨勯棶棰樻墍浠ラ渶瑕佽浆json涔嬪悗鍐嶈祴鍊� + const data = JSON.stringify(this.options); + this.initOptions = JSON.parse(data); + //console.log(this.initOptions); + if (this.initOptions.length > 0) { + let array = []; + this.initOptions.forEach((item, index) => { + if (item.fieldType === 'combox') { + let enumCach = item.data || JSON.parse(localStorage.getItem(item.comboxKey)); + if (enumCach != null && enumCach.length > 0) { + item.data = enumCach; + } else { + getDictionary({code: item.comboxKey}).then(res => { + item.data = res.data.data; + localStorage.setItem(item.comboxKey, JSON.stringify(res.data.data)); + }) + } + } else if (item.fieldType === 'refer') { + this.$set(item, "referConfigData", { + title: item.title, + showField: item.showField || item.field, + field: item.field, + placeholder: item.inputTip || '', + options: Object.assign(item.referConfig, {width: "80%"}), + }) + //console.log(item.referConfigData.options); + //console.log(item); + } + let conditions = []; + if (item.fieldType === 'text') { + conditions = this.searchConditions; + } else if (item.fieldType === 'combox' || item.fieldType === 'truefalse') { + conditions = this.switchSearchConditions; + } else if (item.fieldType === 'datetime' || item.fieldType === 'date') { + conditions = this.dateConditions; + } else { + conditions = this.referSearchConditions; + } + // console.log(conditions); + this.$set(item, "conditions", conditions) + + let add = { + queryField: String(item.queryField), + condition: item.fieldType === 'text' ? String("_like") : String("_equal"), + fieldValue: item.fieldType === 'truefalse' ? Boolean(false) : String(''), + } + array.push(add) + }); + this.searchFormArrays = array; + } + //console.log(this.initOptions); + //console.log(this.searchFormArrays); + }, + /** 涓哄弬鐓х被鍨嬫椂鍊奸�夋嫨涔嬪悗鐨勫鐞� */ + setReferValue(data, index) { + if (data.field) { + this.searchFormArrays[index][data.fieldValue] = data.value || ''; + this.initOptions[index][data.showField] = data.text || ''; + } + }, + + // 灞炴�у垏鎹㈡椂鏌ヨ鏉′欢鍜屾煡璇㈠�间篃闇�瑕佸杈撳叆妗嗚繘琛屽垏鎹� + // changeField(index) { + // //console.log(option,this.searchFormArrays[index],index); + // // 鎵惧埌鏁扮粍涓搴旂殑瑕佸垏鎹负鐨勯偅涓璞� + // let changeItem = this.options.filter((item)=>{ + // return item.queryField == this.searchFormArrays[index].queryField; + // })[0] + // // 濡傛灉鏄痗ombox绫诲瀷鐨勮繕闇�瑕佸鏋氫妇绫诲瀷杩涜璇锋眰 + // if(changeItem.fieldType==='combox' && changeItem.comboxKey != '') { + // changeItem.data = JSON.parse(localStorage.getItem(changeItem.comboxKey)); + // } + // //console.log(changeItem.fieldType); + // // 灏嗗綋鍓嶅垏鎹㈢殑閰嶇疆椤硅祴鍊煎埌option鐨勫搴旂殑閭d釜瀵硅薄杩涜瑕嗙洊 + // this.initOptions[index] = changeItem; + // // 瑕嗙洊v-model鐨勫璞� + // this.searchFormArrays[index] = { + // queryField: String(changeItem.queryField), + // condition: changeItem.fieldType==='text' ? String("_like"):String("_equal"), + // fieldValue: changeItem.fieldType==='truefalse' ? Boolean(false):String(""), + // }; + // //console.log(this.initOptions); + // //console.log(this.searchFormArrays); + // }, + + // 绉婚櫎鎼滅储妗� + + removeInput(index) { + //console.log(this.initOptions); + this.$delete(this.initOptions, index); + this.$delete(this.searchFormArrays, index); + }, + // 閲嶇疆褰撳墠鐣岄潰鐨勮緭鍏ユ + resetInput() { + this.initData(); + }, + // 鎭㈠椤甸潰 + recoverPage() { + this.resetInput(); + this.$emit('update:visible', false); + }, + // 鎻愪氦褰撳墠椤甸潰鐨勮緭鍏ョ殑鏌ヨ鏉′欢骞跺仛瀵瑰簲鐨勮繃婊や笌妫�鏌� + searchSubmit() { + let condtionParam = {}; + const searchConditions = this.searchFormArrays; + for (let index = 0; index < searchConditions.length; index++) { + //console.log(condtionParam['conditionMap['+searchConditions[index].queryField+']']+'' == 'undefined'); + if (searchConditions[index].fieldValue + '' != '' || searchConditions[index].fieldValue + '' === 'false') { + // 瀛樺湪鐩稿悓鐨勬煡璇㈡潯浠� + if (condtionParam['conditionMap[' + searchConditions[index].queryField + ']'] + '' != 'undefined') { + this.$message.warning("瀛樺湪閲嶅鏌ヨ鏉′欢锛岃浠旂粏鏍稿!"); + //console.log(condtionParam['conditionMap['+searchConditions[index].queryField+']']); + return false; + } + let fieldType = this.initOptions[index].fieldType; + // 褰撳嚭鐜版煡璇㈡棩鏈熺殑鏍煎紡鏃�,闇�瑕佸鏃ユ湡鏍煎紡杩涜澶勭悊 + if (fieldType === 'datetime' || fieldType === 'date') { + // 灏嗘椂闂磋浆鎹负鏈湴鏃堕棿 + let localTime = moment.utc(searchConditions[index].fieldValue).local(); + // 鏍煎紡鍖栨椂闂翠负鎮ㄦ兂瑕佺殑鏍煎紡 + let formattedTime = localTime.format('YYYY-MM-DD HH:mm:ss'); + condtionParam['conditionMap[' + searchConditions[index].queryField + searchConditions[index].condition + ']'] = formattedTime; + //console.log(formattedTime); + } else { + //鎷兼帴鎴恗ap瀵硅薄锛屽皢鏌ヨ瀵硅薄鍜宑ondition鎷兼帴鍦ㄤ竴璧凤紝缁勬垚楂樼骇鏌ヨmap鐨刱ey + condtionParam['conditionMap[' + searchConditions[index].queryField + searchConditions[index].condition + ']'] = searchConditions[index].fieldValue; + } + } + } + // 鏌ヨ鏉′欢娌℃湁鍑虹幇閲嶅灞炴�э紝骞朵笖杩囨护鎺変簡绌哄�硷紝灏变紶閫掔粰鐖剁粍浠� + //console.log(condtionParam); + this.$emit('echoContion', condtionParam) + this.isShowDialog = false; + }, + } } </script> <style lang="scss" scoped> - .search-total { - border-radius: 4px; - margin-top: -10px; - } - .dialog-search-button { - margin-bottom: 15px; - } - // .search-total > .search-content > .el-row{ - // margin-bottom: 5px; - // &:last-child { - // margin-bottom: 0; - // } - // } - .search-total > .search-content { - } - .search-total > .search-content > .el-row > .el-col { - border-radius: 4px; - } - .search-total > .search-content > .el-row > .el-col > .grid-content { - border-radius: 4px; - min-height: 36px; - } - .search-total > .search-content > .el-row > .el-col { - margin-right: 6px; - &:last-child { - margin-right: 0; - } - } - .grid-content > .el-icon-close { - font-size: 30px; - line-height: 40px; - cursor: pointer; - color: rgb(222, 130, 105); - } - .grid-content > .el-icon-close:hover { - font-size: 30px; - color: rgb(219, 52, 6); - } - .grid-content > .el-select { - width: 100%; - } - .grid-content > .el-switch { - line-height: 40px; - height: 40px; - } - .grid-content > .el-date-editor.el-input, .el-date-editor.el-input__inner { - width: 100%; - } +.search-total { + border-radius: 4px; + margin-top: -10px; +} + +.dialog-search-button { + margin-bottom: 15px; +} + +// .search-total > .search-content > .el-row{ +// margin-bottom: 5px; +// &:last-child { +// margin-bottom: 0; +// } +// } +.search-total > .search-content { +} + +.search-total > .search-content > .el-row > .el-col { + border-radius: 4px; +} + +.search-total > .search-content > .el-row > .el-col > .grid-content { + border-radius: 4px; + min-height: 36px; +} + +.search-total > .search-content > .el-row > .el-col { + margin-right: 6px; + + &:last-child { + margin-right: 0; + } +} + +.grid-content > .el-icon-close { + font-size: 30px; + line-height: 40px; + cursor: pointer; + color: rgb(222, 130, 105); +} + +.grid-content > .el-icon-close:hover { + font-size: 30px; + color: rgb(219, 52, 6); +} + +.grid-content > .el-select { + width: 100%; +} + +.grid-content > .el-switch { + line-height: 40px; + height: 40px; +} + +.grid-content > .el-date-editor.el-input, .el-date-editor.el-input__inner { + width: 100%; +} </style> diff --git a/Source/UBCS-WEB/src/views/docking/info.vue b/Source/UBCS-WEB/src/views/docking/info.vue index 4cc1fb3..eea767b 100644 --- a/Source/UBCS-WEB/src/views/docking/info.vue +++ b/Source/UBCS-WEB/src/views/docking/info.vue @@ -59,7 +59,7 @@ <script> import { - getList, add, edit, del, push, updateStatus,HeaderRequest + getList, add, edit, del, push, updateStatus, HeaderRequest, ParmRequest } from "@/api/docking/info"; import {getDictionary} from "@/api/omd/enum"; import infoForm from "./infoForm.vue"; @@ -71,6 +71,8 @@ data() { return { + //涓嬫媺鎬荤被鍨� + DropDownTheTotalType: [], //鎺ュ彛绫诲瀷涓嬫媺 interfaceTypeList: [{ label: 'webService', value: 'webService' @@ -119,9 +121,9 @@ index: true, selection: true, indexFixed: false, - selectionFixed:false, + selectionFixed: false, searchShow: false, - refreshBtn:false, + refreshBtn: false, searchMenuSpan: 6, rowKey: "id", tabs: true, @@ -264,9 +266,6 @@ }; }, created() { - HeaderRequest().then(res => { - console.log(res) - }) }, computed: { ...mapGetters(["permission"]), @@ -365,8 +364,14 @@ this.editAttribute.type = 'edit'; this.$refs.infoForm.formData = this.editAttribute; this.$refs.infoForm.showSubmitDialog = true; - // console.log('row',this.editAttribute.pushType) - // console.log('editAttribute',this.editAttribute.dataFlowTypeText) + //header瀵硅薄 + HeaderRequest(1, -1, {'conditionMap[infoOid]': row.oid}).then(res => { + this.$refs.infoForm.formData.sysIntHeaderVOs = res.data.data.records; + }) + //鍙傛暟瀵硅薄 + ParmRequest(1, -1, {'conditionMap[infoOid]': row.oid}).then(res => { + this.$refs.infoForm.formData.sysIntParamVOs = res.data.data.records; + }) }, deleteSave(row, index) { this.$confirm("鍒犻櫎鏁版嵁灏嗘棤娉曡鎭㈠, 鏄惁缁х画?", "鎻愮ず", { @@ -455,7 +460,7 @@ if (JSON.stringify(conditionMaps) != '{}') { this.query = conditionMaps; this.onLoad(this.page); - }else { + } else { this.query = {}; this.onLoad(this.page, this.query); } diff --git a/Source/UBCS-WEB/src/views/docking/infoForm.vue b/Source/UBCS-WEB/src/views/docking/infoForm.vue index d8f88c9..2651165 100644 --- a/Source/UBCS-WEB/src/views/docking/infoForm.vue +++ b/Source/UBCS-WEB/src/views/docking/infoForm.vue @@ -285,13 +285,13 @@ {required: true, message: '璇烽�夋嫨鎺ㄩ�佺被鍨�', trigger: 'blur'} ], classifyName: [ - {required: true, message: '璇烽�夋嫨', trigger: 'sbumit'} + {required: true, message: '璇烽�夋嫨', trigger: 'submit'} ], sourceSystemName: [ - {required: true, message: '璇烽�夋嫨', trigger: 'sbumit'} + {required: true, message: '璇烽�夋嫨', trigger: 'submit'} ], targetSystemName: [ - {required: true, message: '璇烽�夋嫨', trigger: 'sbumit'} + {required: true, message: '璇烽�夋嫨', trigger: 'submit'} ], classPath: [ {required: true, message: '璇疯緭鍏ョ被璺緞', trigger: 'blur'} @@ -478,6 +478,7 @@ closeSubmitDialog() { // this.resetForm(); this.showSubmitDialog = false; + this.$refs.form.resetFields() }, resetForm() { this.formData = { diff --git a/Source/UBCS-WEB/src/views/statistic/statisticPage.vue b/Source/UBCS-WEB/src/views/statistic/statisticPage.vue index f896de9..6df37e1 100644 --- a/Source/UBCS-WEB/src/views/statistic/statisticPage.vue +++ b/Source/UBCS-WEB/src/views/statistic/statisticPage.vue @@ -2,7 +2,7 @@ <!-- 鏂板鍙充晶鎸夐挳--> <div v-loading="loading"> <div style=" display: flex; justify-content: flex-end;"> - <el-button plain type="primary" @click="addHandler">閰嶇疆</el-button> + <el-button plain type="primary" @click="addHandler" size="small">閰嶇疆</el-button> </div> <!--鏂板瀵硅瘽妗�--> <el-dialog :visible.sync="addVisible" append-to-body class="avue-dialog avue-dialog--top" title="閰嶇疆鏁版嵁缁熻鍒嗘瀽" @@ -24,7 +24,7 @@ </span> </el-dialog> <!--echarts缁勪欢--> - <div style="margin-top: 15px;padding-bottom: 35px"> + <div style="margin-top: 10px;padding-bottom: 35px"> <lineChart v-for="(item,index) in lineList" :key="index" -- Gitblit v1.9.3