From e347c62b06319cc9a6018b323d7dce55ead19e11 Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期一, 09 九月 2024 15:22:06 +0800 Subject: [PATCH] 修改行高度,修改查询模板 --- Source/plt-web/plt-web-ui/src/App.vue | 15 ++++ Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue | 30 +++++---- Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue | 58 +++++++++++++++++-- Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue | 21 +++++- Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue | 40 ++++++++++++- 5 files changed, 135 insertions(+), 29 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/App.vue b/Source/plt-web/plt-web-ui/src/App.vue index 421e759..a3f276c 100644 --- a/Source/plt-web/plt-web-ui/src/App.vue +++ b/Source/plt-web/plt-web-ui/src/App.vue @@ -59,11 +59,24 @@ margin-bottom: 0; } .avue-crud .avue-crud__menu{ - min-height: 32px; + min-height: 26px; } .avue-crud .avue-crud__menu .el-button{ margin-bottom: 5px; } +.avue-crud .avue-crud__menu .el-button--text{ + padding: 2px 6px; +} +.avue-crud table td{ + line-height: 22px; +} +.el-table .cell{ + line-height: 22px; +} +.el-table .cell .el-tag{ + line-height: 20px; + height: 22px; +} .avue-crud__pagination{ padding: 15px 0 10px; } diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue index 3e8d85d..4bdc47c 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue @@ -37,6 +37,19 @@ <!--瀵煎叆 --> <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆" @updata="uploadCallBack"></upload-file> + + <div> + <fieldset> + <legend> 鏌ヨ鏉′欢 </legend> + <form-query-dialog ref="formQuery" + style="height: 260px;" + :readOnly="true" + :queryCondition="queryCondition" + :queryTree="queryTree" + :levelFlag.sync="levelFlag" + ></form-query-dialog> + </fieldset> + </div> </basic-container> </el-main> @@ -51,9 +64,10 @@ import func from "@/util/func"; import {dateFormat} from "@/util/date"; import FormDialog from "./formDialog.vue" +import formQueryDialog from "@/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue"; export default { name: "index", - components: {FormDialog}, + components: {FormDialog,formQueryDialog}, data() { return { treeOption: { @@ -68,7 +82,7 @@ } }, nodeRow: {}, - treeData: [ { + treeData: [{ label: '涓氬姟绫诲瀷鏍�', oid: 'topNode', children: [] @@ -95,7 +109,7 @@ selection: true, menu: false, height: "auto", - calcHeight: -40, + calcHeight: 300, tip: false, header:false, column: [{ @@ -115,6 +129,11 @@ ], upFileType: ['vciqtf'], fileUrl: 'api/templateController/impBtmTemplate', + //楂樼骇鏌ヨ鏉′欢 + queryTree:{}, + //鏅�氭煡璇㈡潯浠� + queryCondition:[], + levelFlag:0 } }, created() { @@ -126,14 +145,24 @@ const loading = this.$loading({}); getBizTypes().then(res => { const data = res.data.data.map(item => { - item.label = item.attributes.id; - return item; + this.processChildren(item); // 澶勭悊姣忎釜鑺傜偣 + item.attributes.label = item.attributes.id; + return item.attributes; }); this.treeData[0].children = data; loading.close(); }) }, - + // 澶勭悊鏍戝舰缁撴瀯 + processChildren(item) { + if (item.children && item.children.length > 0) { + item.attributes.children = item.children.map(child => { + child.attributes.label = child.attributes.id; + this.processChildren(child); // 閫掑綊澶勭悊姣忎釜瀛愯妭鐐� + return child.attributes; // 鍙繑鍥炲瓙鑺傜偣鐨� attributes + }); + } + }, // 鏍戠偣鍑� nodeClick(row) { this.nodeRow = row; @@ -145,12 +174,19 @@ getObjTypeQTs(this.nodeRow.label).then(res => { this.crudData = res.data.data; this.tableLoading = false; + this.queryCondition=[]; + this.queryTree={}; + this.levelFlag=0; }) }, rowClick(row) { this.$refs.crud.toggleSelection(); this.$refs.crud.toggleRowSelection(row); //閫変腑褰撳墠琛� this.selectionRow = [row]; + + this.queryCondition=row.queryTemplate.condition; + this.queryTree=row.tree; + this.levelFlag=row.levelFlag; }, selectionChange(list) { this.selectionRow = list; @@ -286,5 +322,13 @@ text-align: center; padding-left: 4.5px; } - +fieldset { + border-radius: 5px; + -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + padding: 10px 6px; + box-sizing: border-box; + margin: 10px 0 0 0; + border: 1px solid #EBEEF5; +} </style> diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue index 237f483..612fa18 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue @@ -1,34 +1,34 @@ <template> <div style="padding: 0 10px"> <div style="text-align: center;margin-bottom: 10px"> - <avue-radio v-model="radioForm" :dic="radioDic" style="margin: 0 20px 0 0;display: inline-block"></avue-radio> - <el-button plain size="mini" type="primary" @click="clearValue">娓呯┖鍊�</el-button> - <el-button plain size="mini" type="primary" @click="delAll">鍒犻櫎鍏ㄩ儴鏉′欢</el-button> + <avue-radio v-model="radioForm" :disabled ="readOnly" :dic="radioDic" style="margin: 0 20px 0 0;display: inline-block"></avue-radio> + <el-button v-if="!readOnly" plain size="mini" type="primary" @click="clearValue">娓呯┖鍊�</el-button> + <el-button v-if="!readOnly" plain size="mini" type="primary" @click="delAll">鍒犻櫎鍏ㄩ儴鏉′欢</el-button> </div> <div v-if="radioForm==0" @drop="drop" @dragover.prevent style="height: 220px;text-align: center;"> <div v-for="(condition,index) in conditionList" :key="index" class="el-input--small" style="margin-bottom: 5px; text-align:left"> <span style="width: 200px;display: inline-block;text-align: right" :title="condition.clause">{{condition.clause}}</span> - <avue-select v-model="condition.operator" type="tree" :dic="condition.operatorDic" :clearable="false" style="width: 80px;margin: 0 5px;"></avue-select> - <el-date-picker v-if="condition.type=='VTDate'" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;" value-format="YYYY-MM-DD" + <avue-select :disabled ="readOnly" v-model="condition.operator" type="tree" :dic="condition.operatorDic" :clearable="false" style="width: 80px;margin: 0 5px;"></avue-select> + <el-date-picker :disabled ="readOnly" v-if="condition.type=='VTDate'" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;" value-format="YYYY-MM-DD" type="date"> </el-date-picker> - <el-date-picker v-else-if="condition.type=='VTDateTime'" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;" + <el-date-picker :disabled ="readOnly" v-else-if="condition.type=='VTDateTime'" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;" type="datetime"> </el-date-picker> - <el-time-select v-else-if="condition.type=='VTTime'" v-model="condition.ordinaryValue" value-format="HH:mm:ss" style="width:300px;margin-right: 5px;display: inline-block;"> + <el-time-select :disabled ="readOnly" v-else-if="condition.type=='VTTime'" v-model="condition.ordinaryValue" value-format="HH:mm:ss" style="width:300px;margin-right: 5px;display: inline-block;"> </el-time-select> - <avue-input-number v-else-if="condition.type=='VTInteger'" precision="0" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;"></avue-input-number> - <avue-input-number v-else-if="condition.type=='VTLong' || condition.type=='VTDouble'" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;"></avue-input-number> - <avue-input v-else v-model="condition.ordinaryValue" placeholder="" style="width: 300px;margin-right: 5px;"></avue-input> - <el-button plain size="mini" type="primary" @click="checkTemp(index)">閫夋嫨鏌ヨ妯℃澘</el-button> - <el-button size="mini" type="danger" icon="el-icon-delete" @click="delCondition(index)" style="padding: 7px 8px"></el-button> + <avue-input-number :disabled ="readOnly" v-else-if="condition.type=='VTInteger'" precision="0" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;"></avue-input-number> + <avue-input-number :disabled ="readOnly" v-else-if="condition.type=='VTLong' || condition.type=='VTDouble'" v-model="condition.ordinaryValue" style="width:300px;margin-right: 5px;display: inline-block;"></avue-input-number> + <avue-input :disabled ="readOnly" v-else v-model="condition.ordinaryValue" placeholder="" style="width: 300px;margin-right: 5px;"></avue-input> + <el-button v-if="!readOnly" plain size="mini" type="primary" @click="checkTemp(index)">閫夋嫨鏌ヨ妯℃澘</el-button> + <el-button v-if="!readOnly" size="mini" type="danger" icon="el-icon-delete" @click="delCondition(index)" style="padding: 7px 8px"></el-button> </div> </div> <div v-else @drop="drop" @dragover.prevent style="height: 220px;text-align: left"> <avue-tree ref="tree" @node-drag-end="handleDragEnd" @node-drag-leave="handleDragLeave" @node-drag-over="handleDragOver" style="height: 220px" :data="treeData" :option="treeOption" @node-click="nodeClick" node-key="value"></avue-tree> </div> - <div style="text-align: right;margin-top: 10px;"> + <div v-if="!readOnly" style="text-align: right;margin-top: 10px;"> <el-button v-if="radioForm==1" plain size="mini" type="primary" @click="addHandler">澧炲姞閫昏緫</el-button> <el-button v-if="radioForm==1" plain size="mini" type="primary" @click="editHandler">淇敼鏉′欢</el-button> <el-button v-if="radioForm==1" plain size="mini" type="primary" @click="delHandler">鍒犻櫎</el-button> @@ -132,6 +132,10 @@ levelFlag:{ type: Number, default: 0 + }, + readOnly:{ + type:Boolean, + default:false } }, data() { diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue index a5d706a..b8cc2f9 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue @@ -36,6 +36,18 @@ <!--瀵煎叆 --> <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆" @updata="uploadCallBack"></upload-file> + <div> + <fieldset> + <legend> 鏌ヨ鏉′欢 </legend> + <form-query-dialog ref="formQuery" + style="height: 260px;" + :readOnly="true" + :queryCondition="queryCondition" + :queryTree="queryTree" + :levelFlag.sync="levelFlag" + ></form-query-dialog> + </fieldset> + </div> </basic-container> </el-main> </el-container> @@ -48,10 +60,11 @@ import basicOption from "@/util/basic-option"; import FormDialog from "./formDialog.vue" import func from "@/util/func"; +import formQueryDialog from "@/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue"; export default { name: "index", - components: {FormDialog}, + components: {FormDialog,formQueryDialog}, data() { return { treeOption: { @@ -83,7 +96,7 @@ selection: true, menu: false, height: "auto", - calcHeight: -40, + calcHeight: 300, tip: false, header:false, column: [{ @@ -151,6 +164,11 @@ ], upFileType: ['vciqtf'], fileUrl: 'api/templateController/impLinkTemplate', + //楂樼骇鏌ヨ鏉′欢 + queryTree:{}, + //鏅�氭煡璇㈡潯浠� + queryCondition:[], + levelFlag:0 } }, created() { @@ -182,12 +200,20 @@ this.crudData = res.data.data; this.tableLoading = false; this.selectionClear(); + + this.queryCondition=[]; + this.queryTree={}; + this.levelFlag=0; }) }, rowClick(row) { this.$refs.crud.toggleSelection(); this.$refs.crud.toggleRowSelection(row); //閫変腑褰撳墠琛� this.selectionRow = [row]; + + this.queryCondition=row.queryTemplate.condition; + this.queryTree=row.tree; + this.levelFlag=row.levelFlag; }, selectionChange(list) { this.selectionRow = list; @@ -323,5 +349,13 @@ text-align: center; padding-left: 4.5px; } - +fieldset { + border-radius: 5px; + -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + padding: 10px 6px; + box-sizing: border-box; + margin: 10px 0 0 0; + border: 1px solid #EBEEF5; +} </style> diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue index 441a5c2..4a4395b 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue @@ -170,8 +170,9 @@ if (newval ==0) { getBizTypes().then(res => { const data = res.data.data.map(item => { - item.label=item.attributes.id; - return item; + this.processChildren(item); // 澶勭悊姣忎釜鑺傜偣 + item.attributes.label = item.attributes.id; + return item.attributes; }); this.treeData = data; loading.close(); @@ -195,14 +196,24 @@ const loading = this.$loading({}); getBizTypes().then(res => { const data = res.data.data.map(item => { - item.label=item.attributes.id; - return item; + this.processChildren(item); // 澶勭悊姣忎釜鑺傜偣 + item.attributes.label = item.attributes.id; + return item.attributes; }); this.treeData = data; loading.close(); }) }, - + // 澶勭悊涓氬姟绫诲瀷鏍戝舰缁撴瀯 + processChildren(item) { + if (item.children && item.children.length > 0) { + item.attributes.children = item.children.map(child => { + child.attributes.label = child.attributes.id; + this.processChildren(child); // 閫掑綊澶勭悊姣忎釜瀛愯妭鐐� + return child.attributes; // 鍙繑鍥炲瓙鑺傜偣鐨� attributes + }); + } + }, // 鏍戠偣鍑� nodeClick(row) { this.nodeRow = row; -- Gitblit v1.9.3