From 6c170b6b427f0882da35957e73f385d318970a06 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 25 十月 2024 17:59:19 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue | 179 +++++++++++++++++++++++++++++++++++++----------------------
1 files changed, 113 insertions(+), 66 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
index c2cb92a..befcded 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
@@ -18,11 +18,10 @@
@current-change="currentChange"
>
<template slot="menuLeft" slot-scope="scope">
- <el-button icon="el-icon-plus" size="small" type="primary" @click="rowSaveHandlerClick">鍒涘缓</el-button>
+ <el-button icon="el-icon-plus" plain size="small" type="primary" @click="rowSaveHandlerClick">鍒涘缓</el-button>
<el-button icon="el-icon-delete" plain size="small" type="danger" @click="allDelHandler">鍒犻櫎</el-button>
<el-button icon="el-icon-view" plain size="small" type="primary" @click="chekView">鏌ョ湅浣跨敤鑼冨洿</el-button>
- <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadTemplateHandler">涓嬭浇瀵煎叆妯℃澘
- </el-button>
+ <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadTemplateHandler">涓嬭浇瀵煎叆妯℃澘</el-button>
<el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadHandler">瀵煎叆</el-button>
<el-button icon="el-icon-download" plain size="small" type="primary" @click="downLoadHandler">瀵煎嚭</el-button>
</template>
@@ -45,19 +44,25 @@
<template slot="label">
鍚嶇О
</template>
- {{ lastItem.id }}
+ <div style="width: 330px">
+ {{ lastItem.id }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
鏍囩
</template>
+ <div style="width: 330px">
{{ lastItem.name }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
鎻忚堪
</template>
+ <div style="width: 330px">
{{ lastItem.description }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
@@ -75,9 +80,11 @@
<template slot="label">
鍏佽涓虹┖
</template>
+ <div style="width: 330px">
<el-tag :type="lastItem.nullableFlag ? 'success' : 'danger'">
{{ lastItem.nullableFlag ? '鏄�' : '鍚�' }}
</el-tag>
+ </div>
</el-descriptions-item>
<el-descriptions-item v-if="accuracy">
<template slot="label">
@@ -89,13 +96,17 @@
<template slot="label">
闀垮害
</template>
+ <div style="width: 330px">
{{ lastItem.attrLength }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
榛樿鍊�
</template>
+ <div style="width: 330px">
{{ lastItem.defaultValue }}
+ </div>
</el-descriptions-item>
</el-descriptions>
@@ -106,33 +117,43 @@
<template slot="label">
褰撳墠绫诲瀷
</template>
+ <div style="width: 345px">
{{ lastItem.version ? '閾炬帴绫诲瀷' : '涓氬姟绫诲瀷' }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
褰撳墠绫诲瀷鍊�
</template>
+ <div style="width: 345px">
{{ lastItem.version ? lastItem.linkTypeName : lastItem.btmTypeId }}
+ </div>
</el-descriptions-item>
<el-descriptions-item v-if="lastItem.version">
<template slot="label">
褰撳墠鐗堟湰娆�
</template>
+ <div style="width: 345px">
{{ lastItem.version }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
浣跨敤鏋氫妇
</template>
+ <div style="width: 345px">
<el-tag :type="lastItem.enumId ? 'success' : 'danger'">
{{ lastItem.enumId ? '鏄�' : '鍚�' }}
</el-tag>
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
褰撳墠鏋氫妇绫诲瀷
</template>
+ <div style="width: 345px">
{{ lastItem.enumId }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
@@ -153,21 +174,25 @@
<template slot="label">
浣跨敤鏋氫妇
</template>
+ <div style="width: 330px">
<el-tag :type="lastItem.enumFlag ? 'success' : 'danger'">
{{ lastItem.enumFlag ? '鏄�' : '鍚�' }}
</el-tag>
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
鏋氫妇绫诲瀷
</template>
+ <div style="width: 330px">
{{ lastItem.enumFlag }}
+ </div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
鍙栧�艰寖鍥�
</template>
- <div style="width: 330px; height: 80px;overflow: auto">
+ <div style="width: 345px; height: 80px;overflow: auto">
<el-tag v-for="item in rangeList" plain style="margin: 5px">{{ item }}</el-tag>
</div>
</el-descriptions-item>
@@ -206,9 +231,7 @@
<el-row>
<div class="addDialog">
<div>
-
<h3>灞炴�ч」</h3>
-
<el-col :span="12">
<el-form-item label="鍚嶇О锛�" prop="id">
<el-input v-model="form.id"></el-input>
@@ -306,7 +329,7 @@
</el-form-item>
- <el-form-item :label="form.enumSwitch ? '鏋氫妇閫夋嫨锛�' : '娣诲姞鏋氫妇鍊硷細'" prop="enumSwitch">
+ <el-form-item :label="form.enumSwitch ? '鏋氫妇閫夋嫨锛�' : '娣诲姞鍊煎煙锛�'" prop="enumSwitch">
<el-select v-if="form.enumSwitch" v-model="form.enumId" placeholder="璇烽�夋嫨鏋氫妇绫诲瀷"
@change="enumSelectChange">
<el-option v-for="(item,index) in attributeDataTypePickList" :key="index" :label="item.key"
@@ -320,8 +343,8 @@
<el-button size="mini" @click="enumAddHandler"> = </el-button>
</div>
</el-form-item>
- <el-form-item label="褰撳墠鏋氫妇鍊硷細" prop="rangeValue">
- <textarea v-model="form.rangeValue"
+ <el-form-item :label="form.enumSwitch ? '褰撳墠鏋氫妇鍊硷細' : '褰撳墠鍊煎煙锛�'" prop="rangeValue">
+ <textarea v-model="form.rangeValue" :readonly="form.enumSwitch"
style="width: 330px; height: 80px; border: 1px solid #DCDFE6; overflow: auto; text-align: left;resize: none;">
</textarea>
</el-form-item>
@@ -336,7 +359,7 @@
</el-form-item>
- <el-form-item :label="form.enumSwitch ? '鏋氫妇閫夋嫨锛�' : '娣诲姞鏋氫妇鍊硷細'" prop="enumSwitch">
+ <el-form-item :label="form.enumSwitch ? '鏋氫妇閫夋嫨锛�' : '娣诲姞鍊煎煙锛�'" prop="enumSwitch">
<el-select v-if="form.enumSwitch" v-model="form.enumId" placeholder="璇烽�夋嫨鏋氫妇绫诲瀷"
@change="enumSelectChange">
<el-option v-for="(item,index) in attributeDataTypePickList" :key="index" :label="item.key"
@@ -347,17 +370,17 @@
</el-form-item>
<el-form-item v-if="!form.enumSwitch" label="杩愮畻绗︼細">
<div>
- <el-button size="mini" @click="operationHandler('>')"> > </el-button>
- <el-button size="mini" @click="operationHandler('<')"> < </el-button>
- <el-button size="mini" @click="operationHandler('>=')"> >= </el-button>
- <el-button size="mini" @click="operationHandler('<=')"> <= </el-button>
- <el-button size="mini" @click="operationHandler('=')"> = </el-button>
- <el-button size="mini" @click="operationHandler('!=')"> != </el-button>
- <el-button size="mini" @click="operationHandler('()')"> () </el-button>
+ <el-button size="mini" @click="operationHandler('>')"> ></el-button>
+ <el-button size="mini" @click="operationHandler('<')"> <</el-button>
+ <el-button size="mini" @click="operationHandler('>=')"> >=</el-button>
+ <el-button size="mini" @click="operationHandler('<=')"> <=</el-button>
+ <el-button size="mini" @click="operationHandler('=')"> =</el-button>
+ <el-button size="mini" @click="operationHandler('!=')"> !=</el-button>
+ <el-button size="mini" @click="operationHandler('()')"> ()</el-button>
</div>
</el-form-item>
- <el-form-item label="褰撳墠鏋氫妇鍊硷細" prop="rangeValue">
- <textarea v-model="form.rangeValue"
+ <el-form-item :label="form.enumSwitch ? '褰撳墠鏋氫妇鍊硷細' : '褰撳墠鍊煎煙锛�'" prop="rangeValue">
+ <textarea v-model="form.rangeValue" :readonly="form.enumSwitch"
style="width: 330px; height: 80px; border: 1px solid #DCDFE6; overflow: auto; text-align: left;resize: none;">
</textarea>
</el-form-item>
@@ -365,22 +388,22 @@
<!-- VTDouble -->
<div v-if="form.attributeDataType === 'VTDouble'" class="right">
<h3>鍊煎煙</h3>
- <el-form-item label="娣诲姞鏋氫妇鍊硷細" prop="enumAddValue">
+ <el-form-item :label="form.enumSwitch ? '鏋氫妇閫夋嫨锛�' : '娣诲姞鍊煎煙锛�'" prop="enumAddValue">
<el-input v-model="form.enumAddValue">
</el-input>
</el-form-item>
<el-form-item label="杩愮畻绗︼細">
<div>
- <el-button size="mini" @click="operationHandler('>')"> > </el-button>
- <el-button size="mini" @click="operationHandler('<')"> < </el-button>
- <el-button size="mini" @click="operationHandler('>=')"> >= </el-button>
- <el-button size="mini" @click="operationHandler('<=')"> <= </el-button>
- <el-button size="mini" @click="operationHandler('=')"> = </el-button>
- <el-button size="mini" @click="operationHandler('!=')"> != </el-button>
- <el-button size="mini" @click="operationHandler('()')"> () </el-button>
+ <el-button size="mini" @click="operationHandler('>')"> ></el-button>
+ <el-button size="mini" @click="operationHandler('<')"> <</el-button>
+ <el-button size="mini" @click="operationHandler('>=')"> >=</el-button>
+ <el-button size="mini" @click="operationHandler('<=')"> <=</el-button>
+ <el-button size="mini" @click="operationHandler('=')"> =</el-button>
+ <el-button size="mini" @click="operationHandler('!=')"> !=</el-button>
+ <el-button size="mini" @click="operationHandler('()')"> ()</el-button>
</div>
</el-form-item>
- <el-form-item label="褰撳墠鏋氫妇鍊硷細" prop="rangeValue">
+ <el-form-item :label="form.enumSwitch ? '褰撳墠鏋氫妇鍊硷細' : '褰撳墠鍊煎煙锛�'" prop="rangeValue">
<textarea v-model="form.rangeValue"
style="width: 330px; height: 80px; border: 1px solid #DCDFE6; overflow: auto; text-align: left;resize: none;">
</textarea>
@@ -458,7 +481,7 @@
append-to-body="true"
class="avue-dialog"
title="鏌ョ湅浣跨敤鑼冨洿"
- width="70%"
+ width="60%"
>
<avue-crud
ref="checkViewCrud"
@@ -479,7 +502,7 @@
getUsedAttributeList,
getEnumMapByType,
deleteAttributes,
- download,
+ exportAttributes,
downloadAttributeTemplate,
getBizTypes,
getAllLtName,
@@ -576,6 +599,7 @@
addBtn: false,
editBtn: false,
delBtn: false,
+ menuWidth:160,
column
},
tableLoading: false,
@@ -649,6 +673,7 @@
],
upFileType: ['xls', 'xlsx'],
fileUrl: 'api/attributeController/importAttributes',
+ lastIndex: null
}
},
computed: {
@@ -682,7 +707,13 @@
this.form.attributeDataType === 'VTFilePath';
},
rangeOptionValue() {
- return this.form.rangeValue.split('\n')
+ let values = this.form.rangeValue.split('\n');
+
+ // 澶勭悊姣忎釜鍊硷紝鍘婚櫎绛夊彿鍓嶇殑閮ㄥ垎锛屽彧淇濈暀绛夊彿鍚庣殑閮ㄥ垎
+ return values.map(value => {
+ let parts = value.split('=');
+ return parts.length > 1 ? parts[1].trim() : value.trim();
+ });
}
},
methods: {
@@ -726,7 +757,17 @@
// 鐐瑰嚮琛�
rowClickHandler(row) {
- this.$refs.userCrud.toggleRowSelection(row);
+ func.rowClickHandler(
+ row,
+ this.$refs.userCrud,
+ this.lastIndex,
+ (newIndex) => {
+ this.lastIndex = newIndex;
+ },
+ () => {
+ this.selectList = [];
+ }
+ );
},
// 鏉℃暟
@@ -907,16 +948,16 @@
enumSelectChange(val) {
const list = this.attributeDataTypePickList.find(item => item.key === val).values;
this.form.rangeValue = list.join('\n');
- this.form.defaultValue = list[0];
+ this.form.defaultValue = this.rangeOptionValue[0];
},
// 浣跨敤鏋氫妇switch婊戝潡change浜嬩欢
switchEnumChange(status) {
if (status) {
this.form.enumId = this.attributeDataTypePickList[0].key;
- this.form.defaultValue = this.attributeDataTypePickList[0].values[0];
const list = this.attributeDataTypePickList[0].values;
this.form.rangeValue = list.join('\n');
+ this.form.defaultValue = this.rangeOptionValue[0];
} else {
this.form.defaultValue = "";
this.form.rangeValue = "";
@@ -1200,38 +1241,44 @@
linkTypeName: "",
rangeValue: ""
};
- if (this.dialogTitle === 'add') {
- this.form.range = this.form.rangeValue.replace(/\n/g, ';');
- if (this.form.attributeSelectType === 'business') {
- this.form.btmTypeId = this.form.referValue;
- } else {
- this.form.linkTypeName = this.form.referValue;
- }
- addAttribute(this.form).then(res => {
- if (res.data.code === 200) {
- this.$message.success(res.data.msg);
- this.getTableList();
- this.form = form;
- this.addVisible = false;
+ this.$refs.form.validate((valid) => {
+ if (valid) {
+ if (this.dialogTitle === 'add') {
+ this.form.range = this.form.rangeValue.replace(/\n/g, ';');
+ if (this.form.attributeSelectType === 'business') {
+ this.form.btmTypeId = this.form.referValue;
+ } else {
+ this.form.linkTypeName = this.form.referValue;
+ }
+ addAttribute(this.form).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success(res.data.obj);
+ this.getTableList();
+ this.form = form;
+ this.addVisible = false;
+ }
+ })
}
- })
- }
- if (this.dialogTitle === 'edit') {
- this.form.range = this.form.rangeValue.replace(/\n/g, ';');
- if (this.form.attributeSelectType === 'business') {
- this.form.btmTypeId = this.form.referValue;
- } else {
- this.form.linkTypeName = this.form.referValue;
- }
- updateAttribute(this.form).then(res => {
- if (res.data.code === 200) {
- this.$message.success(res.data.obj);
- this.getTableList();
- this.form = form;
- this.addVisible = false;
+ if (this.dialogTitle === 'edit') {
+ this.form.range = this.form.rangeValue.replace(/\n/g, ';');
+ if (this.form.attributeSelectType === 'business') {
+ this.form.btmTypeId = this.form.referValue;
+ } else {
+ this.form.linkTypeName = this.form.referValue;
+ }
+ updateAttribute(this.form).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success(res.data.obj);
+ this.getTableList();
+ this.form = form;
+ this.addVisible = false;
+ }
+ })
}
- })
- }
+ } else {
+ return false;
+ }
+ });
},
// 瀵煎叆
@@ -1247,7 +1294,7 @@
}
let attrNames = this.selectList.map(item => item.id).join(',');
- download({attrNames: attrNames}).then(res => {
+ exportAttributes({attrNames: attrNames}).then(res => {
func.downloadFileByBlobHandler(res);
this.$message.success('瀵煎嚭鎴愬姛');
}).catch(err => {
--
Gitblit v1.9.3