From dc3ae0abbe8c508249397d5c9744387a6ace23c3 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期一, 11 十二月 2023 18:38:54 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/src/components/FormTemplate/index.vue | 2
Source/UBCS-WEB/src/views/integration/integrationIndex.vue | 20 ---
Source/UBCS-WEB/src/views/integration/integrationTransfer.vue | 262 ++++++++++++++++++++++++++++------------------------
3 files changed, 144 insertions(+), 140 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/index.vue b/Source/UBCS-WEB/src/components/FormTemplate/index.vue
index a21e706..d8ea149 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/index.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -639,7 +639,7 @@
};
} else if (item.secType == "coderefersec") {
//寮曠敤鐮佹
- params = JSON.parse(item.referValueInfo);
+ params = JSON.parse(item.referValueInfo || item.referConfig);
}
return params;
},
diff --git a/Source/UBCS-WEB/src/views/integration/integrationIndex.vue b/Source/UBCS-WEB/src/views/integration/integrationIndex.vue
index c7cff47..0b4e974 100644
--- a/Source/UBCS-WEB/src/views/integration/integrationIndex.vue
+++ b/Source/UBCS-WEB/src/views/integration/integrationIndex.vue
@@ -33,7 +33,7 @@
@row-dblclick="handleMapingRowClick" @selection-change="selectionChange" @select="setCurrentRow"
@select-all="handleSelectAll">
<template slot="menuLeft">
- <el-button icon="el-icon-plus" size="small" type="primary" :disabled="disabledPush"
+ <el-button icon="el-icon-plus" size="small" type="primary"
@click="dialogPush = true">鏂� 澧�
</el-button>
<el-button icon="el-icon-check" size="small" type="primary" @click="handleSave">淇� 瀛�
@@ -221,7 +221,7 @@
if (response.status === 200) {
this.loading = false
this.mappingData = response.data.data
- console.log(this.filtermapping)
+ // console.log(this.filtermapping)
}
},
// 鎺ュ彛鑾峰彇灞炴�ф槧灏勫彇鍊艰寖鍥�
@@ -229,7 +229,7 @@
this.rangeData = []
const response = await gridAttrRanges({ meatId: oid })
if (response.status === 200) {
- console.log(response.data)
+ // console.log(response.data)
this.rangeData = response.data.data
}
},
@@ -269,9 +269,7 @@
},
// 淇濆瓨鎸夐挳
async handleSave() {
- console.log(this.mappingData)
const response = await batchAddSave({ dockingPreAttrMappingVOList: this.mappingData })
- console.log(response)
if (response.status === 200) {
this.$message({
type: "success",
@@ -291,7 +289,6 @@
message: "璇烽�夋嫨涓�鏉¢泦鍥㈠垎绫�"
});
} else {
- console.log(param)
const response = await syncClassifyModel(param)
if (response.status === 200) {
console.log(response)
@@ -300,7 +297,6 @@
},
handelTransferSave(event) {
let that = this
- console.log(event)
const transferValue = event.value
if (Object.keys(that.mappingForm).length == 0) {
this.$message({
@@ -364,13 +360,9 @@
},
// 灞炴�у彇鍊艰寖鍥村崟鍏冩牸缂栬緫鍚�
handleUpdate(row, index, done) {
- console.log(row)
- console.log(index)
const findRow = this.mappingData.findIndex(item => item.metaListId === row.metaListId)
this.rangeData[index] = row
- console.log(this.rangeData)
this.mappingData[findRow].dockingPreAttrRangeVoList = (this.rangeData)
- console.log('淇敼鍚�', row)
this.$message({
showClose: true,
message: "淇敼鎴愬姛",
@@ -380,8 +372,6 @@
},
// 灞炴�у彇鍊艰寖鍥村崟鍏冩牸缂栬緫鍚�
handleMapingUpdate(row, index, done) {
- console.log(row)
- console.log('淇敼鍚�', row)
this.$message({
showClose: true,
message: "淇敼鎴愬姛",
@@ -391,8 +381,6 @@
},
// 闆嗗洟鏄犲皠灞炴�ч�夋嫨锛堝崟閫夛級
selectionChange(selection) {
- console.log(selection)
- console.log(this.mappingForm)
if (selection.length > 1) {
const nowVal = selection.shift();
this.$refs.crudMapping.toggleRowSelection(nowVal, false);
@@ -403,12 +391,10 @@
}
},
setCurrentRow(selection, row) {
- console.log(row)
this.mappingForm = row
this.disabledPush = false
},
handleSelectAll(selection) {
- console.log(selection)
this.$refs.crudMapping.toggleSelection()
}
}
diff --git a/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue b/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue
index e070be9..7793e02 100644
--- a/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue
+++ b/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue
@@ -1,144 +1,162 @@
<template>
- <el-dialog :title="title" :visible.sync="dialogVisible" append-to-body="true" destroy-on-close width="35%"
- @close="handelClose">
- <el-form :model="form">
- <el-form-item label="鏌ヨ鏉′欢" label-width="70px" size="small">
- <el-input v-model="inputVal" autocomplete="off" @change="handleQuery"></el-input>
- </el-form-item>
- </el-form>
- <p class="text_tip">*閫夋嫨鍒嗙被杩涜灞炴�ц繃婊�, 鎴栬�呰緭鍏ュ睘鎬х殑鍏ㄦ嫾鎴栬�呯畝鎷艰繘琛屾煡璇�! 濡�: 濮撳悕 (鍙緭鍏m鎴杧inming )</p>
- <transfer v-model="transferValue" :data="newdata" :filter-method="filterMethod"
- :filter-placeholder="filterPlaceholder" :props="props"></transfer>
- <span slot="footer" class="dialog-footer">
+ <el-dialog :title="title" :visible.sync="dialogVisible" append-to-body="true" destroy-on-close width="50%"
+ @close="handelClose">
+ <el-form :model="form">
+ <el-form-item label="鏌ヨ鏉′欢" label-width="70px" size="small">
+ <el-input v-model="inputVal" autocomplete="off" @change="handleQuery"></el-input>
+ </el-form-item>
+ </el-form>
+ <p class="text_tip">*閫夋嫨鍒嗙被杩涜灞炴�ц繃婊�, 鎴栬�呰緭鍏ュ睘鎬х殑鍏ㄦ嫾鎴栬�呯畝鎷艰繘琛屾煡璇�! 濡�: 濮撳悕 (鍙緭鍏m鎴杧inming )</p>
+ <div style="width: 100%; display: flex; justify-content: space-around">
+ <transfer v-model="transferValue" :data="newdata" :filter-method="filterMethod"
+ :filter-placeholder="filterPlaceholder" :props="props"></transfer>
+ </div>
+ <span slot="footer" class="dialog-footer">
<el-button @click="visible = false">鍙� 娑�</el-button>
<el-button type="primary" @click="handelTransferSave">淇� 瀛�</el-button>
</span>
- </el-dialog>
+ </el-dialog>
</template>
<script>
import transfer from '@/components/transfer/index'
import pinyin from 'js-pinyin'
+
export default {
- components: {
- transfer
+ components: {
+ transfer
+ },
+ name: 'IntegrationTransfer',
+ props: {
+ // 鏄惁鎵撳紑
+ visible: {
+ typeof: Boolean,
+ default: false
},
- name: 'IntegrationTransfer',
+ // 寮圭獥鏍囬
+ title: {
+ typeof: String,
+ default: '缂栫爜灞炴��'
+ },
+ // 鏁版嵁婧�
+ data: {
+ typeof: Array,
+ default: () => []
+ },
+ // 鏁版嵁榛樿鍊煎緱props
props: {
- // 鏄惁鎵撳紑
- visible: {
- typeof: Boolean,
- default: false
- },
- // 寮圭獥鏍囬
- title: {
- typeof: String,
- default: '缂栫爜灞炴��'
- },
- // 鏁版嵁婧�
- data: {
- typeof: Array,
- default: () => []
- },
- // 鏁版嵁榛樿鍊煎緱props
- props: {
- typeof: Object,
- default: () => {
- return {
- label: 'label',
- key: 'key',
- disabled: 'disabled'
- };
- }
- },
- // 濡傛灉鏈夌壒娈婃搷浣滐紝涓�鏉℃暟鎹彧鑳界敤涓�娆$殑鎿嶄綔锛屽氨闇�瑕佹妸绂佺敤鐨勬暟鎹瓧娈电敤lebel瀵瑰簲鐨勫�间紶閫掕繃鏉�
- disabledData: {
- typeof: Array,
- default: () => []
- },
- // 鏌ヨ鏂囨湰妗嗙殑placeholder
- filterPlaceholder: {
- typeof: String,
- default: '璇疯緭鍏ユ嫾闊冲叏鎷兼垨鑰呮嫾闊崇缉鍐�'
- }
- },
- data() {
+ typeof: Object,
+ default: () => {
return {
- inputVal: '',
- transferValue: this.value,
- dialogVisible: this.visible,
- }
+ label: 'label',
+ key: 'key',
+ disabled: 'disabled'
+ };
+ }
},
- watch: {
- visible(n) {
- this.dialogVisible = n;
- },
- dialogVisible(n) {
- this.$emit('update:visible', n)
- },
+ // 濡傛灉鏈夌壒娈婃搷浣滐紝涓�鏉℃暟鎹彧鑳界敤涓�娆$殑鎿嶄綔锛屽氨闇�瑕佹妸绂佺敤鐨勬暟鎹瓧娈电敤lebel瀵瑰簲鐨勫�间紶閫掕繃鏉�
+ disabledData: {
+ typeof: Array,
+ default: () => []
},
- computed: {
- newdata() {
- pinyin.setOptions({ checkPolyphone: false, charCase: 1 });
- let name = this.props.label
- let key = this.props.key
- if(this.data){
- let data = this.data.map(item => {
- let objitem = { disabled: false, ...item }
- if (this.disabledData.length !== 0) {
- this.disabledData.forEach(element => {
- if (objitem[name] === element) objitem.disabled = true
- });
- }
- return objitem
- })
- return
- }
- return data.map(item => {
- let pinYin = pinyin.getFullChars(item[this.props.label])
- let renPing = pinyin.getCamelChars(item[this.props.label])
- const obj = { pinyins: pinYin, renPing: renPing, [name]: item[this.props.label], [key]: item[this.props.key], disabled: item.disabled }
- return obj
- })
- }
- },
- methods: {
- // 鏂板寮圭獥鏌ヨ鎸夐挳
- handleQuery(event) {
- this.inputVal = event
- },
- // 绌挎妗嗘煡璇㈡暟鎹繃婊わ紙鍙屾潯浠讹級
- filterMethod(query, item) {
- return item.pinyins.indexOf(this.inputVal) > -1 || item.renPing.indexOf(this.inputVal) > -1
- },
- // 鍏抽棴娓呴櫎鎵�鏈夋暟鎹�
- handelClose() {
- this.transferValue = []
- this.inputVal = ''
- this.visible = false
- },
- // 纭畾鎸夐挳锛岃繑鍥炲綋鍓嶆暟鎹拰淇敼鍚庣殑鏁版嵁
- handelTransferSave() {
- let that = this
- let datas = that.newdata
- const findtra = datas.findIndex(item => item.oid === that.transferValue[0].oid)
- datas[findtra].disabled = true
- const obj = {
- // 褰撳墠閫夋嫨鐨勬暟鎹�
- value: this.transferValue,
- // 鎬绘暟鎹�
- data: datas
- }
- that.$emit('save', obj)
- that.transferValue = []
- that.inputVal = ''
- },
+ // 鏌ヨ鏂囨湰妗嗙殑placeholder
+ filterPlaceholder: {
+ typeof: String,
+ default: '璇疯緭鍏ユ嫾闊冲叏鎷兼垨鑰呮嫾闊崇缉鍐�'
}
+ },
+ data() {
+ return {
+ inputVal: '',
+ transferValue: this.value,
+ dialogVisible: this.visible,
+ }
+ },
+ watch: {
+ visible(n) {
+ this.dialogVisible = n;
+ },
+ dialogVisible(n) {
+ this.$emit('update:visible', n)
+ },
+ data(n) {
+ console.log('n', n)
+ },
+ newdata(n) {
+ console.log('newdata', n)
+ }
+ },
+ computed: {
+ newdata() {
+ pinyin.setOptions({checkPolyphone: false, charCase: 1});
+
+ let name = this.props.label;
+ let key = this.props.key;
+
+ if (this.data) {
+ let data = this.data.map(item => {
+ let objitem = {disabled: false, ...item};
+ if (this.disabledData.length !== 0) {
+ this.disabledData.forEach(element => {
+ if (objitem[name] === element) objitem.disabled = true;
+ });
+ }
+ return objitem;
+ });
+ return data.map(item => {
+ let pinYin = pinyin.getFullChars(item[this.props.label]);
+ let renPing = pinyin.getCamelChars(item[this.props.label]);
+ const obj = {
+ pinyins: pinYin,
+ renPing: renPing,
+ [name]: item[this.props.label],
+ [key]: item[this.props.key],
+ disabled: item.disabled
+ };
+ return obj;
+ });
+ } else {
+ return []; // 鍦ㄦ病鏈夋暟鎹椂杩斿洖涓�涓┖鏁扮粍
+ }
+ }
+ },
+ methods: {
+ // 鏂板寮圭獥鏌ヨ鎸夐挳
+ handleQuery(event) {
+ this.inputVal = event
+ },
+ // 绌挎妗嗘煡璇㈡暟鎹繃婊わ紙鍙屾潯浠讹級
+ filterMethod(query, item) {
+ return item.pinyins.indexOf(this.inputVal) > -1 || item.renPing.indexOf(this.inputVal) > -1
+ },
+ // 鍏抽棴娓呴櫎鎵�鏈夋暟鎹�
+ handelClose() {
+ this.transferValue = []
+ this.inputVal = ''
+ this.visible = false
+ },
+ // 纭畾鎸夐挳锛岃繑鍥炲綋鍓嶆暟鎹拰淇敼鍚庣殑鏁版嵁
+ handelTransferSave() {
+ let that = this
+ let datas = that.newdata
+ const findtra = datas.findIndex(item => item.oid === that.transferValue[0].oid)
+ datas[findtra].disabled = true
+ const obj = {
+ // 褰撳墠閫夋嫨鐨勬暟鎹�
+ value: this.transferValue,
+ // 鎬绘暟鎹�
+ data: datas
+ }
+ that.$emit('save', obj)
+ that.transferValue = []
+ that.inputVal = ''
+ },
+ }
}
</script>
<style lang="scss" scoped>
.text_tip {
- padding: 10px 0;
- color: #F56C6C;
+ padding: 10px 0;
+ color: #F56C6C;
}
</style>
--
Gitblit v1.9.3