| | |
| | | <!-- <el-button :disabled="disabledPush" 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">保 存 |
| | | <el-button v-if="permissionList.saveBtn" icon="el-icon-check" size="small" type="primary" |
| | | @click="handleSave">保 存 |
| | | </el-button> |
| | | <el-button icon="el-icon-connection" size="small" type="primary" |
| | | @click="handleSync('all')">同步主模型 |
| | | <el-button v-if="permissionList.allSyncBtn" icon="el-icon-connection" size="small" |
| | | type="primary" @click="handleSync('all')">同步主模型 |
| | | </el-button> |
| | | <el-button icon="el-icon-connection" size="small" type="primary" |
| | | @click="handleSync('one')">同步详细模型 |
| | | <el-button v-if="permissionList.oneSyncBtn" icon="el-icon-connection" size="small" |
| | | type="primary" @click="handleSync('one')">同步详细模型 |
| | | </el-button> |
| | | <el-button icon="el-icon-coordinate" size="small" type="primary" |
| | | @click="handlerAuto">自动填充 |
| | | <el-button v-if="permissionList.autoBtn" icon="el-icon-coordinate" size="small" |
| | | type="primary" @click="handlerAuto">自动填充 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | @row-update="handleUpdate" |
| | | @row-dblclick="handleRowClick"> |
| | | <template slot="menuLeft"> |
| | | <el-button icon="el-icon-coordinate" size="small" type="primary" |
| | | @click="handlerBottomAuto">自动填充 |
| | | <el-button v-if="permissionList.bottomAutoBtn" icon="el-icon-coordinate" size="small" |
| | | type="primary" @click="handlerBottomAuto">自动填充 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | <script> |
| | | import integrationTransfer from './integrationTransfer.vue' |
| | | import pinyin from 'js-pinyin' |
| | | import {mapGetters} from "vuex"; |
| | | import { |
| | | referCodeClassifyTree, |
| | | referTree, |
| | |
| | | }, |
| | | targetColumn() { |
| | | return this.optionMapping.column.find(column => column.prop === 'targetAttrName'); |
| | | } |
| | | }, |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | allSyncBtn: this.vaildData(this.permission.integration.integration_allSync, false), |
| | | autoBtn: this.vaildData(this.permission.integration.integration_auto, false), |
| | | bottomAutoBtn: this.vaildData(this.permission.integration.integration_bottomAuto, false), |
| | | oneSyncBtn: this.vaildData(this.permission.integration.integration_oneSync, false), |
| | | saveBtn: this.vaildData(this.permission.integration.integration_save, false), |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | handlerAuto() { |
| | |
| | | // const groupReturnData = res.data && res.data.data ? res.data.data.map(item => item.groupAttrKey) : []; |
| | | const groupReturnData = res.data.data; |
| | | // 过滤匹配 |
| | | // console.log(groupReturnData) |
| | | this.mappingData.forEach(mappingItem => { |
| | | groupReturnData.forEach(groupItem => { |
| | | if (mappingItem.sourceAttrKey === groupItem.groupAttrKey) { |
| | |
| | | } |
| | | }) |
| | | }) |
| | | this.$message.success('填充成功!'); |
| | | this.$message.success('自动填充成功,请确认属性后点击保存!'); |
| | | }) |
| | | .catch(error => { |
| | | console.log(error) |
| | | this.$message.error('填充失败,请稍后再试!'); |
| | | }); |
| | | }, |
| | |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | this.$message.success('自动填充成功,请确认属性后点击保存!') |
| | | }) |
| | | }, |
| | | calculateSimilarity(str1, str2) { |
| | |
| | | this.rangeData = [] |
| | | const response = await gridAttrRanges({meatId: oid}) |
| | | if (response.status === 200) { |
| | | // console.log(response.data) |
| | | this.rangeData = response.data.data |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | handelTransferSave(event) { |
| | | // console.log(event) |
| | | let that = this |
| | | const transferValue = event.value |
| | | if (Object.keys(that.mappingForm).length == 0) { |
| | |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | console.error('处理映射更新时出错:', error); |
| | | this.$message.error(error) |
| | | } finally { |
| | | done(); |
| | | } |
| | |
| | | } |
| | | }, |
| | | setCurrentRow(selection, row) { |
| | | console.log(selection, row) |
| | | |
| | | this.mappingForm = row |
| | | this.disabledPush = false |
| | | }, |