From 65866894f615d7a1386cd7f030307322996450de Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期四, 24 十月 2024 16:17:37 +0800
Subject: [PATCH] 文件柜导出接口上传,ui定义导出界面传参调整。
---
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue | 1672 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 1,669 insertions(+), 3 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
index 53e5dd8..761693e 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
@@ -1,13 +1,1679 @@
<template>
- <p>涓氬姟绫诲瀷</p>
+ <el-container v-loading="createViewLoading">
+ <el-aside>
+ <basic-container>
+ <div ref="TreeBox" style="height: calc(100vh - 154px);!important;">
+
+ <!-- 宸︿晶鏍� -->
+ <div style="height: calc(100vh - 190px);">
+ <avue-tree ref="tree" v-loading="treeLoading" :data="treeData" :option="treeOption" @node-click="nodeClick">
+ <span slot-scope="{ node, data }" class="el-tree-node__label">
+ <span style="font-size: 15px">
+ <i class="el-icon-s-promotion"></i>
+ {{ (node || {}).label }}
+ </span>
+ </span>
+ </avue-tree>
+ </div>
+ </div>
+ </basic-container>
+ </el-aside>
+ <el-main>
+ <basic-container>
+ <div>
+ <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">鍒涘缓</el-button>
+ <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">淇敼</el-button>
+ <el-button icon="el-icon-delete" plain size="small" type="danger" @click="deleteClickHandler">鍒犻櫎</el-button>
+ <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭</el-button>
+ <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">瀵煎叆</el-button>
+ <el-button icon="el-icon-circle-plus-outline" plain size="small" type="primary" @click="createViewClickHandler">鍒涘缓瑙嗗浘</el-button>
+ <el-button icon="el-icon-circle-plus-outline" plain size="small" type="primary" @click="indexClickHandler">鍒涘缓绱㈠紩</el-button>
+ <el-button icon="el-icon-menu" plain size="small" type="primary" @click="checkClickHandler">涓�鑷存�ф鏌�</el-button>
+ <el-button icon="el-icon-delete" plain size="small" type="danger" @click="checkClickHandler">鍒犻櫎鏁版嵁</el-button>
+ <el-button plain size="small" type="danger" @click="checkClickHandler">鍒犻櫎鍏ㄩ儴绫诲瀷</el-button>
+ <el-button plain size="small" type="primary" @click="checkViewClickHandler">鏌ョ湅浣跨敤鑼冨洿</el-button>
+ </div>
+ <div style="display: flex;justify-content: center; height: 230px;margin-top: 10px;">
+ <div class="descBox" style="max-height: 100px">
+ <el-descriptions :column="1" border class="margin-top" size="medium" title="灞炴�т俊鎭�">
+ <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ 鍚嶇О
+ </template>
+ <el-tag v-if="nodeRow.id">{{ nodeRow.id }}</el-tag>
+ </el-descriptions-item>
+ <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ 鏍囩
+ </template>
+ <el-tag v-if="nodeRow.name">{{ nodeRow.name }}</el-tag>
+ </el-descriptions-item>
+ <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ 瀹炵幇绫�
+ </template>
+ <el-tooltip v-if="nodeRow.implClass" :content="nodeRow.implClass" class="item" effect="dark"
+ placement="top-start">
+ <el-tag style="max-width: 250px;overflow: hidden">{{ nodeRow.implClass }}
+ </el-tag>
+ </el-tooltip>
+ </el-descriptions-item>
+ <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ 鎻忚堪
+ </template>
+ <span v-if="nodeRow.description">{{ nodeRow.description }}</span>
+ </el-descriptions-item>
+ </el-descriptions>
+ </div>
+ <div class="descBox">
+ <el-descriptions :column="1" border class="margin-top" size="medium" title="鐗堟湰瑙勫垯">
+ <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ 鐗堟湰瑙勫垯
+ </template>
+ <el-tag v-if="nodeRow.revLevel"
+ :type="nodeRow.revLevel === '0' ? 'warning' : nodeRow.revLevel === '1' ? '' : 'success'">
+ {{
+ nodeRow.revLevel === '0'
+ ? '涓嶅彲淇'
+ : nodeRow.revLevel === '1'
+ ? '閲囩敤涓�绾х増鏈鐞�'
+ : '閲囩敤浜岀骇鐗堟湰绠$悊'
+ }}
+ </el-tag>
+ </el-descriptions-item>
+ <el-descriptions-item v-if="nodeRow.revLevel !== '0'" :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ 鐗堟湰鍙疯鍒�
+ </template>
+ <el-tag v-if="nodeRow.revisionRuleId">{{ nodeRow.revisionRuleId }}</el-tag>
+ </el-descriptions-item>
+ <el-descriptions-item v-if="nodeRow.revLevel !== '0'" :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ 鍒嗛殧绗�
+ </template>
+ <el-tag v-if="nodeRow.delimiter">{{ nodeRow.delimiter }}</el-tag>
+ </el-descriptions-item>
+ <el-descriptions-item v-if="nodeRow.revLevel !== '0' && nodeRow.revLevel !== '1'"
+ :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ 鐗堟鍙疯鍒�
+ </template>
+ <el-tag v-if="nodeRow.revisionRuleId"
+ :type="nodeRow.revisionRuleId === '0' ? 'warning' : nodeRow.revisionRuleId === '1' ? '' : 'success'">
+ {{
+ nodeRow.versionRule === '0'
+ ? '1.2.3...'
+ : nodeRow.versionRule === '1'
+ ? 'a.b.c...'
+ : '0.1.2...'
+ }}
+ </el-tag>
+ </el-descriptions-item>
+
+ </el-descriptions>
+ </div>
+ <div class="descBox">
+ <el-descriptions :column="1" border class="margin-top" size="medium" title="鐢熷懡鍛ㄦ湡">
+ <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ 鐢熷懡鍛ㄦ湡
+ </template>
+ <el-tag v-if="nodeRow.lifeCycleId">{{ nodeRow.lifeCycleId }}</el-tag>
+ </el-descriptions-item>
+ </el-descriptions>
+ </div>
+ </div>
+ <div style="margin-top: 30px">
+ <h3>灞炴�у垪琛�</h3>
+ <avue-crud
+ :data="attrData"
+ :option="attrOption">
+ </avue-crud>
+ </div>
+ </basic-container>
+ </el-main>
+
+ <!-- 鏂板 && 缂栬緫 -->
+ <el-dialog
+ v-dialogDrag
+ :title="title === 'add' ? '鍒涘缓' : '淇敼'"
+ :visible.sync="visible"
+ append-to-body="true"
+ class="avue-dialog"
+ width="75%"
+ @close="addDialogClose">
+ <el-form ref="form" :model="form" :rules="rules" label-width="95px">
+ <div class="dialogForm">
+ <div class="leftForm">
+ <el-form-item label="绫诲瀷鍚嶇О锛�" prop="id">
+ <el-input v-model="form.id" :readOnly="title === 'edit'"></el-input>
+ </el-form-item>
+ <el-form-item label="鏍囩锛�">
+ <el-input v-model="form.name"></el-input>
+ </el-form-item>
+ <el-form-item label="缁ф壙鑷細">
+ <div style="display: flex;gap: 5px;align-items: center">
+ <el-input v-model="form.fName" :readOnly="true"></el-input>
+ <el-button :disabled="title === 'add'" plain size="small" style="margin-left: 5px;height: 30px"
+ type="success"
+ @click="inheritClickHandler">閫夋嫨
+ </el-button>
+ </div>
+ </el-form-item>
+ <el-form-item label="瀹炵幇绫伙細">
+ <el-input v-model="form.implClass"></el-input>
+ </el-form-item>
+ <el-form-item label="鎻忚堪">
+ <el-input v-model="form.description" :rows="2" type="textarea"></el-input>
+ </el-form-item>
+ </div>
+ <div class="centerForm">
+ <el-form-item label="鐗堟湰瑙勫垯锛�" label-width="110px" prop="revLevel">
+ <el-select v-model="form.revLevel" @change="revLevelChange">
+ <el-option label="涓嶅彲淇" value="0"></el-option>
+ <el-option label="閲囩敤涓�绾х増鏈鐞�" value="1"></el-option>
+ <el-option label="閲囩敤浜岀骇鐗堟湰绠$悊" value="2"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item v-if="form.revLevel !== '0'" label="鐗堟湰鍙疯鍒欙細" label-width="110px" prop="revisionRuleId">
+ <div style="display: flex;gap: 5px;align-items: center">
+ <el-input v-model="form.revisionRuleId" :readOnly="true"></el-input>
+ <el-button :disabled="form.inputRevisionFlag" plain size="small" style="margin-left: 5px;height: 30px"
+ type="success"
+ @click="versionAddHandler">娣诲姞
+ </el-button>
+ <el-switch
+ v-model="form.inputRevisionFlag"
+ active-text="鎵嬪伐杈撳叆"
+ style="width: 300px"
+ @change="form.revisionRuleId = ''">
+ </el-switch>
+ </div>
+ </el-form-item>
+ <el-form-item v-if="form.revLevel !== '0'" label="鍒嗛殧绗︼細" label-width="110px" prop="delimiter">
+ <el-select v-model="form.delimiter" clearable>
+ <el-option label="." value="."></el-option>
+ <el-option label="-" value="-"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item v-if="form.revLevel !== '0' && form.revLevel !== '1'" label="鐗堟鍙疯鍒欙細" label-width="110px"
+ prop="versionRule">
+ <el-select v-model="form.versionRule" clearable>
+ <el-option label="1.2.3..." value="0"></el-option>
+ <el-option label="a.b.c..." value="1"></el-option>
+ <el-option label="0.1.2..." value="2"></el-option>
+ </el-select>
+ </el-form-item>
+ </div>
+ <div class="rightForm">
+ <el-form-item label="鐢熷懡鍛ㄦ湡锛�" label-width="138px" prop="lifeCycleId">
+ <div style="display: flex;gap: 5px;align-items: center">
+ <el-input v-model="form.lifeCycleId" :readOnly="true"></el-input>
+ <el-button plain size="small" style="margin-left: 5px;height: 30px" type="success"
+ @click="lifeAddHandler('input')">娣诲姞
+ </el-button>
+ </div>
+ </el-form-item>
+
+ <el-form-item label="澶囬�夌敓鍛藉懆鏈熷垪琛細" label-width="138px">
+ <div style="display: flex; align-items: center">
+ <div style="height: 200px; width: 280px; border: 1px solid #bdbbbb;overflow-y: auto">
+ <!-- 鍐呭 -->
+ <el-table
+ :data="dialogLifeTable"
+ :show-header="false"
+ style="width: 100%">
+ <el-table-column
+ align="center"
+ prop="id">
+ </el-table-column>
+ <el-table-column
+ fixed="right"
+ label="鎿嶄綔"
+ width="60">
+ <template slot-scope="scope">
+ <el-button
+ size="small"
+ style="color:#F56C6C;"
+ type="text"
+ @click.native.prevent="dialogDeleteLifeTable(scope.$index)">
+ 绉婚櫎
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ <el-button plain size="mini" style="margin-left: 5px" type="success"
+ @click="lifeAddHandler('table')">娣诲姞
+ </el-button>
+
+ </div>
+ </el-form-item>
+ </div>
+ </div>
+ </el-form>
+ <div class="bottomForm">
+ <h3>灞炴�ф睜鍒楄〃</h3>
+ <avue-crud
+ :data="dialogAttrData"
+ :option="dialogAttrOption"
+ @row-del="dialogBottomAttrDel">
+ <template slot="menuLeft">
+ <el-button icon="el-icon-plus" size="small" type="primary" @click="addDialogClickHandler">鍒涘缓</el-button>
+ </template>
+ </avue-crud>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="addDialogClose">鍙� 娑�</el-button>
+ <el-button type="primary" @click="addDialogSavaHandler">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+
+ <!-- 灞炴�ф睜娣诲姞 -->
+ <el-dialog
+ v-dialogDrag
+ :visible.sync="attrPollDialogVisible"
+ append-to-body="true"
+ class="avue-dialog"
+ title="灞炴�ф睜"
+ width="60%"
+ @close="dialogAttrClose"
+ >
+ <avue-crud
+ :key="dialogAttrReload"
+ ref="dialogAttrCrud"
+ :data="dialogAttrSaveData"
+ :option="dialogAttrSaveOption"
+ :page.sync="attrPage"
+ :table-loading="dialogAttrLoading"
+ @selection-change="dialogAttrSelectChange"
+ @row-click="dialogAttrRowClickHandler"
+ @size-change="attrSizeChange"
+ @current-change="attrCurrentChange"
+ @search-change="attrHandleSearch"
+ @search-reset="attrHandleReset"
+ >
+ </avue-crud>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="dialogAttrClose">鍙� 娑�</el-button>
+ <el-button type="primary" @click="dialogAttrAddClickHandler">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+
+ <!-- 鐗堟湰鍙疯鍒欓�夋嫨 -->
+ <el-dialog
+ v-dialogDrag
+ :visible.sync="dialogVersionVisible"
+ append-to-body="true"
+ class="avue-dialog"
+ title="鐗堟湰鍙疯鍒�"
+ width="60%"
+ >
+
+ <avue-crud
+ :key="dialogVersionKey"
+ ref="dialogAttrCrud"
+ :data="dialogVersionData"
+ :option="dialogVersionOption"
+ :table-loading="dialogVersionLoading"
+ @row-click="dialogVersionRowClick"
+ @search-change="versionHandleSearch"
+ @search-reset="versionHandleReset"
+ >
+ </avue-crud>
+
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="dialogVersionVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="dialogVersionAddClickHandler">纭� 瀹�</el-button>
+ </span>
+
+ </el-dialog>
+
+ <!-- 鐢熷懡鍛ㄦ湡 -->
+ <el-dialog
+ v-dialogDrag
+ :visible.sync="dialogLfeVisible"
+ append-to-body="true"
+ class="avue-dialog"
+ title="鐢熷懡鍛ㄦ湡妯℃澘"
+ width="60%"
+ >
+ <avue-crud
+ :key="dialogLifeKey"
+ ref="dialogAttrCrud"
+ :data="dialogLifeData"
+ :option="dialogLifeOption"
+ :table-loading="dialogLifeLoading"
+ @row-click="dialogLifeRowClick"
+ @search-change="lifeHandleSearch"
+ @search-reset="lifeHandleReset"
+ >
+ </avue-crud>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="dialogLfeVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="dialogLifeAddClickHandler">纭� 瀹�</el-button>
+ </span>
+
+ </el-dialog>
+
+ <!-- 缁ф壙鑷� -->
+ <el-dialog
+ v-dialogDrag
+ :visible.sync="dialogInheritVisible"
+ append-to-body="true"
+ class="avue-dialog"
+ title="缁ф壙涓氬姟绫诲瀷"
+ width="30%"
+ @close="inheritClose"
+ >
+ <avue-tree ref="inheritTree" v-model="treeForm" :data="inheritTreeData" :option="inheritTreeOption"
+ @node-click="inheritNodeClick">
+ <span slot-scope="{ node, data }" class="el-tree-node__label">
+ <span style="font-size: 15px">
+ <i class="el-icon-s-promotion"></i>
+ {{ (node || {}).label }}
+ </span>
+ </span>
+ </avue-tree>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="inheritClose">鍙� 娑�</el-button>
+ <el-button type="primary" @click="inheritSaveClickHandler">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+
+ <!-- 瀵煎叆 -->
+ <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆"
+ @updata="getTreeList"></upload-file>
+
+ <!-- 鏌ョ湅浣跨敤鑼冨洿 -->
+ <el-dialog
+ v-dialogDrag
+ :visible.sync="checkViewVisible"
+ append-to-body="true"
+ class="avue-dialog"
+ title="鏌ョ湅浣跨敤鑼冨洿"
+ width="60%"
+ >
+ <avue-crud
+ ref="checkViewCrud"
+ :data="checkViewData"
+ :option="checkViewOption"
+ :table-loading="checkViewLoading"
+ @search-change="checkHandleSearch"
+ @search-reset="checkHandleReset"
+ >
+ </avue-crud>
+ </el-dialog>
+
+ <!-- 涓�鑷存�ф鏌� -->
+ <el-dialog
+ v-dialogDrag
+ :visible.sync="conCheckVisible"
+ append-to-body="true"
+ class="avue-dialog"
+ title="涓�鑷存�ф鏌�"
+ width="60%"
+ >
+ <avue-crud
+ :data="conCheckData"
+ :option="conCheckOption"
+ :table-loading="conCheckLoading">
+ </avue-crud>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="conCheckVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="repairClickHandler">淇� 澶�</el-button>
+ </span>
+ </el-dialog>
+
+ <!-- 鏌ョ湅绱㈠紩 -->
+ <el-dialog
+ v-dialogDrag
+ :visible.sync="indexVisible"
+ append-to-body="true"
+ class="avue-dialog"
+ title="绱㈠紩淇℃伅"
+ width="60%"
+ @close="indexDialogClose"
+ >
+ <div v-loading="indexLoading" style="display: flex;height: 500px;width: 100%">
+ <basic-container>
+ <div style="height: 390px">
+ <el-button plain size="mini" style="margin-bottom: 5px" type="danger"
+ @click="deleteIndexLeftTreeClickHandler">鍒犻櫎绱㈠紩
+ </el-button>
+ <avue-tree
+ :data="indexLeftData"
+ :option="indexLeftOption"
+ @node-click="indexLeftNodeClick"></avue-tree>
+ </div>
+ </basic-container>
+ <div style="padding: 20px;width: 75%">
+ <div>
+ <el-form ref="form" :model="indexForm" label-width="90px" size="mini">
+ <el-form-item label="绱㈠紩鍚嶇О锛�">
+ <el-input v-model="indexForm.name" :readOnly="indexFormRead"></el-input>
+ </el-form-item>
+ <el-form-item label="鎻忚堪锛�">
+ <el-input v-model="indexForm.desc"></el-input>
+ </el-form-item>
+ </el-form>
+ <div style="display: flex;justify-content: center">
+ <el-button plain size="mini" type="success" @click="rightIndexAddClick">澧炲姞</el-button>
+ <el-button plain size="mini" type="danger">鍒犻櫎</el-button>
+ </div>
+ </div>
+ <avue-crud
+ :data="indexData"
+ :option="indexOption"></avue-crud>
+ </div>
+ </div>
+ <el-dialog
+ v-dialogDrag
+ :visible.sync="indexAttrVisible"
+ append-to-body="true"
+ class="avue-dialog"
+ title="灞炴�т俊鎭�"
+ width="60%"
+ >
+ <avue-crud
+ :data="indexAttrData"
+ :option="indexAttrOption"
+ @row-click="indexAttrRowClick"></avue-crud>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="indexAttrVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="indexAttrClickAddHandler">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="indexDialogClose">鍙� 娑�</el-button>
+ <el-button type="primary" @click="indexClickAddHandler">淇� 瀛�</el-button>
+ </span>
+ </el-dialog>
+
+ </el-container>
</template>
<script>
+import basicOption from '@/util/basic-option'
+import {
+ getBizTypes,
+ addLifeCycle,
+ updateLifeCycle,
+ deleteBtmType,
+ createView,
+ expData,
+ getUsedBtmLinkList,
+ checkBtmConsistency,
+ executeRepair,
+ getIndexByCondition,
+ delIndex,
+ getAllAttributesByBtmId,
+ addIndex
+} from "@/api/modeling/businessType/api"
+import {gridAttribute} from "@/api/modeling/attributePool/api";
+import func from "@/util/func";
+import {getUsedVersionRuleList, getVersionRuleAllList} from "@/api/modeling/version/api";
+import {gridLifeCycle} from "@/api/modeling/lifeCycle/api";
+
export default {
- name: "index"
+ name: "index",
+ data() {
+ return {
+ indexLoading: false,
+ indexFormRead: false,
+ indexAttrRow: {},
+ indexAttrOption: {
+ ...basicOption,
+ height: 380,
+ highlightCurrentRow: true,
+ addBtn: false,
+ refreshBtn: false,
+ editBtn: false,
+ delBtn: false,
+ selection: false,
+ menu: false,
+ column: [
+ {
+ label: '灞炴�т俊鎭�',
+ prop: 'id',
+ sortable: true,
+ },
+ ]
+ },
+ indexAttrData: [],
+ indexData: [],
+ indexAttrVisible: false,
+ indexLeftNodeRow: {},
+ indexForm: {
+ name: '',
+ desc: ''
+ },
+ indexLeftData: [],
+ indexLeftOption: {
+ height: 'auto',
+ menu: false,
+ addBtn: false,
+ props: {
+ label: 'name',
+ value: 'id',
+ children: 'children',
+ },
+ },
+ indexOption: {
+ ...basicOption,
+ height: 280,
+ addBtn: false,
+ refreshBtn: false,
+ editBtn: false,
+ delBtn: false,
+ selection: false,
+ menu: false,
+ column: [
+ {
+ label: '涓氬姟绫诲瀷鍚嶇О',
+ prop: 'typeName',
+ sortable: true,
+ },
+ {
+ label: '绱㈠紩鍚嶇О',
+ prop: 'indexName',
+ sortable: true,
+ },
+ {
+ label: '灞炴�у悕绉�',
+ prop: 'attrNames',
+ sortable: true,
+ },
+ {
+ label: '鎻忚堪',
+ prop: 'desc',
+ sortable: true,
+ },
+ ]
+ },
+ indexVisible: false,
+ conDefaultCheckData: [], // 淇濈暀涓婁釜鎺ュ彛杩斿洖鐨勬暟鎹�
+ conCheckLoading: false,
+ conCheckOption: {
+ ...basicOption,
+ menu: false,
+ addBtn: false,
+ index: false,
+ selection: false,
+ refreshBtn: false,
+ column: [
+ {
+ label: '绫诲瀷鍚�',
+ prop: 'id',
+ },
+ {
+ label: '鎿嶄綔',
+ prop: 'methods',
+ },
+ {
+ label: '鐘舵��',
+ prop: 'status',
+ }
+ ]
+ },
+ conCheckData: [],
+ conCheckVisible: false,
+ checkViewVisible: false,
+ checkViewData: [],
+ checkViewDataSearch: [],
+ checkViewLoading: false,
+ checkViewOption: {
+ ...basicOption,
+ addBtn: false,
+ menu: false,
+ searchMenuSpan: 8,
+ refreshBtn: false,
+ selection: false,
+ column: [
+ {
+ label: '鍚嶇О',
+ prop: 'name',
+ sortable: true,
+ },
+ {
+ label: '鏉ユ簮',
+ prop: 'source',
+ sortable: true,
+ search: true
+ },
+ {
+ label: '璇存槑',
+ prop: 'description',
+ }
+ ]
+ },
+ tipList: [
+ "瀵煎叆涓氬姟鍚嶇О涓嶅彲涓虹┖涓旈摼鎺ョ被鍨嬪悕绉板彧鑳戒负鑻辨枃瀛楁瘝",
+ "瀵煎叆鐨勬枃浠跺寘鎷睘鎬с�佷笟鍔$被鍨嬨�佺敓鍛藉懆鏈熺瓑鏂囦欢",
+ "涓婁紶鐨勬枃浠朵负鍘嬬缉鏂囦欢锛屼笖鍘嬬缉鏍煎紡浠呰兘涓簔ip鏍煎紡"
+ ],
+ upFileType: ['zip'],
+ fileUrl: 'api/linkTypeController/impData',
+ createViewLoading: false, // 鍒涘缓瑙嗗浘
+ versionAddFlag: false,
+ treeForm: {},
+ inheritNodeRow: {},
+ inheritTreeOption: {
+ height: 'auto',
+ defaultExpandAll: false,
+ menu: false,
+ addBtn: false,
+ props: {
+ label: 'id',
+ value: 'id',
+ children: 'children'
+ }
+ },
+ inheritTreeData: [],
+ dialogInheritVisible: false,
+ dialogLifeDefalutData: [], // 鏌ヨ閲嶇疆榛樿鏁版嵁
+ lifeType: '',
+ dialogLifeTable: [],
+ dialogLifeSaveRow: {},
+ dialogLifeKey: Math.random(),
+ dialogLifeData: [],
+ dialogLifeOption: {
+ ...basicOption,
+ addBtn: false,
+ selection: false,
+ refreshBtn: false,
+ menu: false,
+ height: 450,
+ searchMenuSpan: 8,
+ highlightCurrentRow: true,
+ column: [
+ {
+ label: '鐢熷懡鍛ㄦ湡妯℃澘鍚�',
+ prop: 'id',
+ searchLabelWidth: 120,
+ search: true
+ }
+ ]
+ },
+ dialogLifeLoading: false,
+ dialogLfeVisible: false,
+ dialogVersionDefalutData: [], // 鏌ヨ閲嶇疆榛樿鏁版嵁
+ dialogSwitchValue: false,
+ dialogVersionSaveRow: {},
+ dialogVersionVisible: false,
+ dialogVersionKey: Math.random(),
+ dialogVersionData: [],
+ dialogVersionOption: {
+ ...basicOption,
+ addBtn: false,
+ selection: false,
+ refreshBtn: false,
+ menu: false,
+ height: 450,
+ searchMenuSpan: 8,
+ highlightCurrentRow: true,
+ // calcHeight: 100,
+ column: [
+ {
+ label: '鐗堟湰鍙疯鍒�',
+ prop: 'id',
+ searchLabelWidth: 110,
+ search: true
+ }
+ ]
+ },
+ dialogVersionLoading: false,
+ dialogAttrSelectList: [],
+ searchAttrParams: {},
+ dialogAttrLoading: false,
+ dialogAttrReload: Math.random(),
+ attrPage: {
+ currentPage: 1,
+ pageSize: 30,
+ total: 0,
+ pageSizes: [30, 50, 100, 200],
+ },
+ dialogAttrSaveOption: {
+ ...basicOption,
+ addBtn: false,
+ menu: false,
+ refreshBtn: false,
+ index: false,
+ highlightCurrentRow: true,
+ height: 450,
+ searchMenuSpan: 8,
+ column: [
+ {
+ label: '灞炴�у悕',
+ prop: 'id',
+ sortable: true,
+ search: true,
+ },
+ {
+ label: '灞炴�х被鍨�',
+ prop: 'attributeDataType',
+ sortable: true,
+ },
+ {
+ label: '鍒濆鍊�',
+ prop: 'defaultValue',
+ sortable: true,
+ },
+ {
+ label: '璇存槑',
+ prop: 'description',
+ sortable: true,
+ overHidden: true
+ }
+ ]
+ },
+ dialogAttrSaveData: [],
+ attrPollDialogVisible: false,
+ rules: {
+ id: [
+ {required: true, message: '璇疯緭绫诲瀷鍚嶇О', trigger: 'blur'},
+ {validator: this.validateEnglishOnly, trigger: 'blur'}
+ ],
+ revLevel: [
+ {required: true, message: '璇烽�夋嫨鐗堟湰瑙勫垯', trigger: 'blur'},
+ ],
+ lifeCycleId: [
+ {required: true, message: '璇烽�夋嫨鐢熷懡鍛ㄦ湡', trigger: 'blur'},
+ ]
+ },
+ dialogAttrData: [],
+ dialogAttrOption: {
+ ...basicOption,
+ editBtn: false,
+ refreshBtn: false,
+ selection: false,
+ height: 210,
+ addBtn: false,
+ // index:false,
+ column: [
+ {
+ label: '灞炴�у悕',
+ prop: 'id',
+ sortable: true,
+ },
+ {
+
+ prop: 'btmTypeId',
+ label: '涓氬姟绫诲瀷',
+ sortable: true
+ },
+ {
+ label: '灞炴�х被鍨�',
+ prop: 'attributeDataType',
+ sortable: true,
+ },
+ {
+ label: '鍒濆鍊�',
+ prop: 'defaultValue',
+ sortable: true,
+ },
+ {
+ label: '璇存槑',
+ prop: 'description',
+ overHidden: true
+ }
+ ]
+ },
+ title: '',
+ visible: false,
+ attrData: [],
+ attrOption: {
+ ...basicOption,
+ calcHeight: -40,
+ addBtn: false,
+ menu: false,
+ index: false,
+ selection: false,
+ refreshBtn: false,
+ column: [
+ {
+ prop: 'id',
+ label: '灞炴�у悕',
+ sortable: true
+ },
+ {
+ prop: 'btmTypeId',
+ label: '涓氬姟绫诲瀷',
+ sortable: true
+ },
+ {
+ prop: 'attributeDataType',
+ label: '灞炴�х被鍨�',
+ sortable: true
+ },
+ {
+ prop: 'defaultValue',
+ label: '榛樿鍊�',
+ sortable: true
+ },
+ {
+ prop: 'description',
+ label: '璇存槑',
+ overHidden: true
+ }
+ ]
+ },
+ form: {
+ id: '', // 绫诲瀷鍚嶇О
+ name: '', // 鏍囩
+ fName: '', // 缁ф壙鑷�
+ implClass: '', // 瀹炵幇绫�
+ description: '', // 鎻忚堪
+ revLevel: '', // 鐗堟湰瑙勫垯
+ revisionRuleId: '',// 鐗堟湰鍙疯鍒�
+ inputRevisionFlag: false, // 鎵嬪伐杈撳叆,
+ delimiter: '', // 鍒嗛殧绗�
+ versionRule: '0', // 鐗堟鍙疯鍒�
+ lifeCycleId: '', // 鐢熷懡鍛ㄦ湡
+ subLifeCycleId: '', // 鐢熷懡鍛ㄦ湡澶囬�夊垪琛�,
+ apNameArray: "", // 灞炴�ф睜鍒楄〃鈥欙紝鈥樺垎闅�
+ },
+ nodeRow: {},
+ treeOption: {
+ height: 'auto',
+ defaultExpandedKeys: ['topNode'],
+ menu: false,
+ addBtn: false,
+ props: {
+ label: 'TreeName',
+ value: 'id',
+ children: 'children',
+ name: 'name'
+ }
+ },
+ treeData: [
+ {
+ TreeName: '涓氬姟绫诲瀷鏍�',
+ id: 'topNode',
+ children: []
+ }
+ ],
+ descriptionOption: {
+ labelStyle: 'text-align:center;width:100px;',
+ contentStyle: 'max-width:200px;text-align:center;word-break;break-all;'
+ },
+ icons: {
+ id: 'el-icon-finished',
+ name: 'el-icon-tickets',
+ desc: 'el-icon-chat-line-square'
+ },
+ treeLoading: false
+ }
+ },
+ created() {
+ this.getTreeList();
+ },
+ mounted() {
+ },
+ methods: {
+ //鏍戣〃鏌ヨ
+ getTreeList() {
+ this.treeLoading = true;
+ getBizTypes().then(res => {
+ const data = res.data.data.map(item => {
+ this.processChildren(item); // 澶勭悊姣忎釜鑺傜偣
+ item.attributes.TreeName = item.attributes.id;
+ return item.attributes; // 杩斿洖澶勭悊鍚庣殑 attributes
+ });
+ this.treeData[0].children = data;
+ this.inheritTreeData = data;
+ this.treeLoading = false;
+ });
+ },
+
+ // 澶勭悊鏍戝舰缁撴瀯
+ processChildren(item) {
+ if (item.children && item.children.length > 0) {
+ item.attributes.children = item.children.map(child => {
+ child.attributes.TreeName = child.attributes.id;
+ this.processChildren(child); // 閫掑綊澶勭悊姣忎釜瀛愯妭鐐�
+ return child.attributes; // 鍙繑鍥炲瓙鑺傜偣鐨� attributes
+ });
+ }
+ },
+
+ // 鏍戠偣鍑�
+ nodeClick(row) {
+ this.attrData = row.attributes ? JSON.parse(row.attributes) : [];
+ this.nodeRow = row;
+ },
+
+ // 鍒涘缓鎸夐挳
+ addClickHandler() {
+ if (func.isEmptyObject(this.nodeRow)) {
+ this.$message.error('璇烽�夋嫨瑕佹坊鍔犵殑鑺傜偣');
+ return;
+ }
+ this.title = 'add';
+ this.form.fName = this.nodeRow.id === 'topNode' ? "" : this.nodeRow.id;
+ console.log(this.nodeRow);
+ this.form.inputRevisionFlag = JSON.parse(this.form.inputRevisionFlag); // 瀛楃涓瞗alse杞崲涓哄竷灏斿��
+ this.visible = true;
+ },
+
+ // 鍏抽棴缁ф壙瀵硅瘽妗�
+ inheritClose() {
+ this.dialogInheritVisible = false;
+ this.$refs.inheritTree.setCurrentKey(null); // 鍙栨秷褰撳墠閫変腑鐨勮妭鐐�
+ },
+
+ // 缁ф壙鎸夐挳
+ inheritClickHandler() {
+ this.dialogInheritVisible = true;
+ },
+
+ // 缁ф壙鏍戣鐐瑰嚮
+ inheritNodeClick(row) {
+ this.inheritNodeRow = row;
+ },
+
+ // 缁ф壙鏍戜繚瀛�
+ inheritSaveClickHandler() {
+ this.form.fName = this.inheritNodeRow.id;
+ this.dialogInheritVisible = false;
+ },
+
+ // 瀵硅瘽妗� 灞炴�ф睜鍒楄〃澧炲姞鎸夐挳
+ addDialogClickHandler() {
+ this.dialogAttrLoading = true;
+ this.attrPollDialogVisible = true;
+ this.dialogAttrReload = Math.random(); // 寮哄埗鍒锋柊琛ㄦ牸 瑙e喅琛ㄦ牸閿欒
+ this.getAttrDialogDta();
+ },
+
+ // 鏌ヨ灞炴�ф睜鍒楄〃鏁版嵁
+ getAttrDialogDta() {
+ gridAttribute(this.attrPage.currentPage, this.attrPage.pageSize, this.searchAttrParams).then(res => {
+ const data = res.data.data;
+ this.dialogAttrSaveData = data;
+ this.attrPage.total = res.data.total;
+ this.dialogAttrLoading = false;
+ }).catch(err => {
+ this.$message.error(err);
+ });
+ },
+
+ // 鏂板灞炴�ф睜鍒楄〃鍏抽棴瀵硅瘽妗�
+ dialogAttrClose() {
+ this.attrPollDialogVisible = false;
+ this.searchAttrParams = {};
+ },
+
+ // 娣诲姞灞炴�ф睜琛ㄦ牸閫夋嫨妗�
+ dialogAttrSelectChange(row) {
+ this.dialogAttrSelectList = row;
+ },
+
+ // 娣诲姞灞炴�ф睜 琛岀偣鍑�
+ dialogAttrRowClickHandler(row) {
+
+ func.rowClickHandler(
+ row,
+ this.$refs.dialogAttrCrud,
+ this.attrLastIndex,
+ (newIndex) => {
+ this.attrLastIndex = newIndex;
+ },
+ () => {
+ this.selectList = [];
+ }
+ );
+ },
+
+ //娣诲姞灞炴�ф睜 鏉℃暟
+ attrSizeChange(val) {
+ this.attrPage.pageSize = val;
+ this.getAttrDialogDta()
+ },
+
+ //娣诲姞灞炴�ф睜 椤电爜
+ attrCurrentChange(val) {
+ this.attrPage.currentPage = val;
+ this.getAttrDialogDta();
+ },
+
+ //娣诲姞灞炴�ф睜 鎼滅储
+ attrHandleSearch(params, done) {
+ if (func.isEmptyObject(params)) {
+ this.searchAttrParams = {};
+ } else {
+ this.searchAttrParams = {
+ "conditionMap[id]": "*" + params.id + "*"
+ };
+ }
+
+ this.getAttrDialogDta();
+ done();
+ },
+
+ //娣诲姞灞炴�ф睜 娓呯┖鎼滅储
+ attrHandleReset() {
+ this.searchAttrParams = {};
+ this.getAttrDialogDta();
+ },
+
+ // 娣诲姞灞炴�ф睜 淇濆瓨
+ dialogAttrAddClickHandler() {
+ let hasDuplicate = false;
+
+ // 鍏堝垱寤轰竴涓复鏃舵暟缁勬潵瀛樺偍涓嶉噸澶嶇殑椤�
+ const newItems = [];
+
+ this.dialogAttrSelectList.forEach(item => {
+ const exists = this.dialogAttrData.some(existingItem => existingItem.id === item.id);
+
+ if (exists) {
+ hasDuplicate = true;
+ return;
+ }
+
+ // 濡傛灉娌℃湁閲嶅椤癸紝鍒欏皢璇ラ」娣诲姞鍒颁复鏃舵暟缁勪腑
+ newItems.push({
+ id: item.id,
+ attributeDataType: item.attributeDataType,
+ defaultValue: item.defaultValue,
+ description: item.description
+ });
+ });
+
+ if (hasDuplicate) {
+ this.$message.error('璇锋鏌ユ槸鍚︽湁娣诲姞閲嶅椤癸紒');
+ } else {
+ // 濡傛灉娌℃湁閲嶅椤癸紝灏嗘柊椤规坊鍔犲埌 dialogAttrData
+ this.dialogAttrData.push(...newItems);
+ this.attrPollDialogVisible = false;
+ }
+ },
+
+ // 灞炴�ф睜鍒犻櫎
+ dialogBottomAttrDel(form, index) {
+ this.dialogAttrData.splice(index, 1);
+ },
+
+ // 鐗堟湰瑙勫垯绠$悊娣诲姞
+ versionAddHandler() {
+ this.dialogVersionVisible = true;
+ this.dialogVersionKey = Math.random(); // 鎵撳紑鏃跺埛鏂拌〃鏍奸伩鍏嶈〃鏍奸敊琛�
+ this.dialogVersionLoading = true;
+ getVersionRuleAllList().then(res => {
+ const data = res.data.data.map(item => {
+ return {
+ id: item.id
+ }
+ });
+ this.dialogVersionData = data;
+ this.dialogVersionDefalutData = data;
+ this.dialogVersionLoading = false;
+ }).catch(err => {
+ this.$message.error(err)
+ });
+ },
+
+ // 鐗堟湰瑙勫垯琛岀偣鍑�
+ dialogVersionRowClick(row) {
+ this.dialogVersionSaveRow = row;
+ },
+
+ // 鐗堟湰瑙勫垯鎼滅储
+ versionHandleSearch(params, done) {
+ const {id} = params;
+
+ if (!params.id) {
+ this.dialogVersionData = this.dialogVersionDefalutData;
+ return done();
+ }
+ ;
+
+ this.dialogVersionData = this.dialogVersionDefalutData.filter(item => {
+ return item.id && item.id.includes(id);
+ });
+
+ done();
+
+ },
+
+ // 鐗堟湰绠$悊缃┖
+ versionHandleReset() {
+ this.dialogVersionData = this.dialogVersionDefalutData;
+ },
+
+ // 鐗堟湰鍙疯鍒欎繚瀛�
+ dialogVersionAddClickHandler() {
+ if (func.isEmptyObject(this.dialogVersionSaveRow)) {
+ this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
+ return;
+ }
+ this.form.revisionRuleId = this.dialogVersionSaveRow.id;
+ this.dialogVersionVisible = false;
+ },
+
+ // 鐢熷懡鍛ㄦ湡鏂板
+ lifeAddHandler(val) {
+ this.dialogLfeVisible = true;
+ this.dialogLifeKey = Math.random(); // 鎵撳紑鏃跺埛鏂拌〃鏍奸伩鍏嶈〃鏍奸敊琛�
+ this.dialogLifeLoading = true;
+ this.lifeType = val;
+ gridLifeCycle().then(res => {
+ const data = res.data.data.map(item => {
+ return {
+ id: item.id
+ }
+ });
+ this.dialogLifeData = data;
+ this.dialogLifeDefalutData = data;
+ this.dialogLifeLoading = false
+ }).catch(err => {
+ this.$message.error(err)
+ });
+ },
+
+ // 鐢熷懡鍛ㄦ湡琛岀偣鍑�
+ dialogLifeRowClick(row) {
+ this.dialogLifeSaveRow = row;
+ },
+
+ // 鐢熷懡鍛ㄦ湡淇濆瓨
+ dialogLifeAddClickHandler() {
+ if (func.isEmptyObject(this.dialogLifeSaveRow)) {
+ this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
+ return;
+ }
+ if (this.lifeType === 'input') {
+ this.form.lifeCycleId = this.dialogLifeSaveRow.id;
+ } else {
+ const flag = this.dialogLifeTable.some(item => item.id === this.dialogLifeSaveRow.id);
+
+ if (flag) {
+ this.$message.error('宸插瓨鍦ㄧ浉鍚岀殑鏁版嵁锛岃娣诲姞鍏朵粬鏁版嵁');
+ return;
+ }
+ this.dialogLifeTable.push(this.dialogLifeSaveRow);
+ }
+ this.dialogLfeVisible = false;
+ },
+
+ // 鐢熷懡鍛ㄦ湡澶囬�夊垪琛ㄧЩ闄�
+ dialogDeleteLifeTable(index) {
+ this.dialogLifeTable.splice(index, 1)
+ },
+
+ // 鐢熷懡鍛ㄦ湡鎼滅储
+ lifeHandleSearch(params, done) {
+ const {id} = params;
+
+ if (!params.id) {
+ this.dialogLifeData = this.dialogLifeDefalutData;
+ return done();
+ }
+ ;
+
+ this.dialogLifeData = this.dialogLifeDefalutData.filter(item => {
+ return item.id && item.id.includes(id);
+ });
+
+ done();
+
+ },
+
+ // 鐢熷懡鍛ㄦ湡閲嶇疆
+ lifeHandleReset() {
+ this.dialogLifeData = this.dialogLifeDefalutData;
+ },
+
+ // 鍙兘杈撳叆鑻辨枃姝e垯鏍¢獙
+ validateEnglishOnly(rule, value, callback) {
+ if (!value) {
+ return callback(new Error('璇疯緭鍏ョ被鍨嬪悕绉�'));
+ }
+ if (!/^[A-Za-z]+$/.test(value)) {
+ return callback(new Error('鍙兘杈撳叆鑻辨枃瀛楁瘝'));
+ }
+ callback(); // 楠岃瘉閫氳繃
+ },
+
+ // 娓呯┖琛ㄥ崟
+ resetForm() {
+ const form = {
+ id: '', // 绫诲瀷鍚嶇О
+ name: '', // 鏍囩
+ fName: '', // 缁ф壙鑷�
+ implClass: '', // 瀹炵幇绫�
+ description: '', // 鎻忚堪
+ revLevel: '', // 鐗堟湰瑙勫垯
+ revisionRuleId: '',// 鐗堟湰鍙疯鍒�
+ inputRevisionFlag: 'false', // 鎵嬪伐杈撳叆
+ delimiter: '', // 鍒嗛殧绗�
+ versionRule: '0', // 鐗堟鍙疯鍒�
+ lifeCycleId: '', // 鐢熷懡鍛ㄦ湡
+ subLifeCycleId: '', // 鐢熷懡鍛ㄦ湡澶囬�夊垪琛�,
+ apNameArray: "", // 灞炴�ф睜鍒楄〃鈥欙紝鈥樺垎闅�
+ };
+ this.dialogLifeTable = []; // 灏嗙敓鍛藉懆鏈熻〃鏍肩疆绌�
+ this.dialogAttrData = []; // 灏嗗睘鎬ф睜琛ㄦ牸缃┖
+ this.form = {...form};
+ this.$refs.form.clearValidate();
+ },
+
+ // 鏂板缂栬緫瀵硅瘽妗嗗彇娑�
+ addDialogClose() {
+ this.resetForm();
+ this.visible = false;
+ },
+
+ // 鐗堟湰瑙勫垯鍒囨崲 缃┖鍏朵粬鏉′欢
+ revLevelChange() {
+ this.form.versionRule = "";
+ this.form.inputRevisionFlag = false;
+ this.form.delimiter = "";
+ this.form.versionRule = "0";
+ this.form.revisionRuleId = "";
+ },
+
+ // 鏂板缂栬緫淇濆瓨
+ addDialogSavaHandler() {
+ if (this.form.revLevel !== '0' &&!this.form.inputRevisionFlag && (!this.form.revisionRuleId || this.form.revisionRuleId === "")) {
+ this.$message.error('璇锋鏌ョ増鏈彿瑙勫垯涓嶈兘涓虹┖');
+ return;
+ }
+ this.form.subLifeCycleId = this.dialogLifeTable ? this.dialogLifeTable.map(item => item.id).join(',') : "";
+ this.form.apNameArray = this.dialogAttrData ? this.dialogAttrData.map(item => item.id).join(',') : "";
+ this.$refs.form.validate((valid) => {
+ const saveFunction = this.title === 'add' ? addLifeCycle : updateLifeCycle;
+ if (valid) {
+ if (this.form.revLevel === 0) {
+ this.form.versionRule = "";
+ }
+ saveFunction(this.form).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success(res.data.obj);
+ this.getTreeList();
+ this.resetForm();
+ this.visible = false;
+ }
+ })
+ } else {
+ return false;
+ }
+ });
+ },
+
+ // 缂栬緫鎸夐挳鐐瑰嚮浜嬩欢
+ editClickHandler() {
+ /**
+ * id 鍚嶇О
+ * name 鏍囩
+ * implClass 瀹炵幇绫�
+ * fName 缁ф壙鑷�
+ * description 鎻忚堪
+ * revLevel 鐗堟湰瑙勫垯
+ * revisionRuleId 鐗堟湰鍙疯鍒�
+ * inputRevisionFlag 鎵嬪伐杈撳叆
+ * delimiter 鍒嗛殧绗�
+ * versionRule 鐗堟鍙疯鍒�
+ * lifeCycleId 鐢熷懡鍛ㄦ湡
+ * lifeCycleIds 鐢熷懡鍛ㄦ湡鍒楄〃
+ * attributes 灞炴�ф睜鍒楄〃
+ */
+ if (func.isEmptyObject(this.nodeRow)) {
+ this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
+ return;
+ }
+ if (this.nodeRow.id === 'topNode') {
+ this.$message.error('璇烽�夋嫨瀛愯妭鐐硅繘琛屼慨鏀�')
+ return;
+ }
+ this.form = {...this.nodeRow};
+ this.form.inputRevisionFlag = JSON.parse(this.form.inputRevisionFlag); // 瀛楃涓瞗alse杞崲涓哄竷灏斿��
+ // this.form.fName = this.nodeRow.id === 'topNode' ? "" : this.nodeRow.id;
+ this.dialogLifeTable = (this.nodeRow.lifeCycleIds && this.nodeRow.lifeCycleIds.trim())
+ ? this.nodeRow.lifeCycleIds.split(',').map(item => ({id: item.trim()}))
+ : [];
+ this.dialogAttrData = this.nodeRow.attributes ? JSON.parse(this.nodeRow.attributes) : [];
+ this.title = 'edit';
+ this.visible = true;
+ console.log(this.form);
+ },
+
+ // 鍒犻櫎鎸夐挳
+ deleteClickHandler() {
+ if (func.isEmptyObject(this.nodeRow)) {
+ this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
+ return;
+ }
+ ;
+ this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ const {id, oid, ts} = this.nodeRow;
+ const obj = {id, oid, ts};
+ deleteBtmType(obj).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success(res.data.obj);
+ this.getTreeList();
+ }
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堝垹闄�'
+ });
+ });
+ },
+
+ // 鍒涘缓瑙嗗浘
+ createViewClickHandler() {
+ this.createViewLoading = true;
+ createView().then(res => {
+ if (res.data.code === 200) {
+ this.createViewLoading = false;
+ this.$message.success(res.data.obj);
+ }
+ }).catch(err => {
+ this.createViewLoading = false;
+ })
+ },
+
+ // 瀵煎嚭
+ exportClickHandler() {
+ if (func.isEmptyObject(this.nodeRow)) {
+ this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
+ return;
+ }
+ let name = this.nodeRow.id;
+ expData({name: name}).then(res => {
+ func.downloadFileByBlobHandler(res);
+ this.$message.success('瀵煎嚭鎴愬姛');
+ }).catch(err => {
+ this.$message.error(err);
+ });
+ },
+
+ // 瀵煎叆
+ upLoadClickHandler() {
+ this.$refs.upload.visible = true;
+ },
+
+ // 鏌ョ湅浣跨敤鑼冨洿鎸夐挳
+ checkViewClickHandler() {
+ if (func.isEmptyObject(this.nodeRow)) {
+ this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒');
+ return;
+ }
+ getUsedBtmLinkList({btmName: this.nodeRow.id}).then(res => {
+ if (res.data.code === 200) {
+ this.checkViewVisible = true;
+ const data = res.data.data.map(item => {
+ return {
+ name: this.nodeRow.id,
+ source: item
+ }
+ });
+ this.checkViewData = data;
+ this.checkViewDataSearch = data;
+ }
+ })
+ },
+
+ // 鏌ョ湅浣跨敤鑼冨洿鏌ヨ
+ checkHandleSearch(params, done) {
+ const {source} = params;
+
+ if (!params.source) {
+ this.checkViewData = this.checkViewDataSearch;
+ return done();
+ }
+ ;
+
+ this.checkViewData = this.checkViewDataSearch.filter(item => {
+ return item.source && item.source.includes(source);
+ });
+
+ done();
+
+ },
+
+ // 鏌ョ湅浣跨敤鑼冨洿閲嶇疆
+ checkHandleReset() {
+ this.checkViewData = this.checkViewDataSearch;
+ },
+
+ // 涓�鑷存�ф鏌ユ寜閽偣鍑�
+ checkClickHandler() {
+ this.createViewLoading = true;
+ checkBtmConsistency().then(res => {
+ this.createViewLoading = false;
+ if (res && res.data && res.data.data) {
+ this.conCheckVisible = true;
+ this.conCheckLoading = true;
+ if (res.data.code === 200) {
+ const data = res.data.data[0];
+ this.conDefaultCheckData = data; // 淇濈暀涓�浠藉師濮嬫暟鎹�
+ this.conCheckLoading = false;
+ const outputData = [];
+ Object.entries(data).forEach(([id, methods]) => {
+ let action;
+
+ switch (methods) {
+ case '_CREATE':
+ action = '鍒涘缓琛�';
+ break;
+ case '_ADD':
+ action = '澧炲姞鍒�';
+ break;
+ case '_DROP':
+ action = '绉婚櫎鍒�';
+ break;
+ default:
+ action = '鏈煡';
+ }
+ outputData.push({
+ id: id,
+ methods: action,
+ status: '鏈慨澶�'
+ })
+ })
+ this.conCheckData = outputData;
+ }
+ } else {
+ this.$message.success(res.data.msg);
+ }
+ })
+ },
+
+ // 淇涓�鑷存�ф鏌�
+ repairClickHandler() {
+ const params = this.conDefaultCheckData;
+ executeRepair(params).then(res => {
+ if (res.data.obj) {
+ this.$message.success('淇鎴愬姛');
+ this.conCheckData = [];
+ } else {
+ this.$message.error('淇澶辫触锛岃閲嶆柊灏濊瘯锛�');
+ }
+ this.conCheckVisible = false;
+ })
+ },
+
+ // 鍒涘缓绱㈠紩鎸夐挳鐐瑰嚮
+ indexClickHandler() {
+ if (func.isEmptyObject(this.nodeRow)) {
+ this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
+ return;
+ }
+ this.getLeftIndex();
+ this.indexVisible = true;
+ },
+
+ // 宸︿晶鏍戞洿鏂�
+ getLeftIndex() {
+ const params = {
+ "conditionMap[typename]": this.nodeRow.id
+ }
+ getIndexByCondition(params).then(res => {
+ if (res.data.code === 200) {
+ const data = res.data.data.map(item => {
+ return {
+ indexName: item.indexName,
+ name: `${item.indexName} ${item.attrNames}`,
+ id: item.oid
+ }
+ })
+ this.indexLeftData = data;
+ }
+ })
+ },
+
+ // 绱㈠紩宸︿晶鏍戠偣鍑�
+ indexLeftNodeClick(row) {
+ this.indexLeftNodeRow = row;
+ },
+
+ // 鍒犻櫎宸︿晶鏍戠储寮�
+ deleteIndexLeftTreeClickHandler() {
+ if (func.isEmptyObject(this.indexLeftNodeRow)) {
+ this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹繘琛屽垹闄�');
+ return;
+ }
+ const params = {
+ btmName: this.nodeRow.id,
+ indexName: this.indexLeftNodeRow.indexName
+ };
+ delIndex(params).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success('鍒犻櫎绱㈠紩鎴愬姛');
+ this.getLeftIndex();
+ }
+ })
+ },
+
+ //鍙充晶琛ㄦ牸娣诲姞灞炴��
+ indexAttrClickAddHandler() {
+ if (func.isEmptyObject(this.indexAttrRow)) {
+ this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
+ return;
+ }
+ this.indexData.push(
+ {
+ typeName: this.nodeRow.id,
+ attrNames: this.indexAttrRow.id,
+ indexName: this.indexForm.name,
+ desc: this.indexForm.desc
+ }
+ )
+ this.indexFormRead = true;
+ this.indexAttrVisible = false;
+ },
+
+ // 鍙充晶灞炴�ц〃鏍艰鐐瑰嚮
+ indexAttrRowClick(row) {
+ this.indexAttrRow = row;
+ },
+
+ // 鍙充晶琛ㄦ牸澧炲姞
+ rightIndexAddClick() {
+ if (!this.indexForm.name) {
+ this.$message.error('璇疯緭鍏ョ储寮曞悕绉�');
+ return;
+ }
+
+ // 妫�鏌ユ槸鍚︿负鑻辨枃瀛楃
+ const englishRegex = /^[A-Za-z]+$/;
+ if (!englishRegex.test(this.indexForm.name)) {
+ this.$message.error('绱㈠紩鍚嶇О鍙兘鍖呭惈鑻辨枃瀛楃');
+ return;
+ }
+ this.indexLoading = true;
+ getAllAttributesByBtmId({btmId: this.nodeRow.id}).then(res => {
+ if (res.data.code === 200) {
+ const data = res.data.data.map(item => {
+ return {
+ id: item.id
+ }
+ })
+ this.indexAttrData = data;
+ }
+ this.indexLoading = false;
+ this.indexAttrVisible = true;
+ })
+ },
+
+ // 鍒涘缓淇濆瓨绱㈠紩
+ indexClickAddHandler() {
+ const params = {
+ typeName: this.nodeRow.id,
+ attrNames: this.indexData.map(item => item.attrNames).join(','),
+ indexName: this.indexForm.name,
+ }
+ addIndex([params]).then(res => {
+ console.log(res)
+ this.$message.success('鍒涘缓鎴愬姛');
+ this.indexDialogClose();
+ }).catch(err => {
+ this.indexDialogClose();
+ })
+ },
+
+ // 绱㈠紩瀵硅瘽妗嗗彇娑�
+ indexDialogClose() {
+ this.indexFormRead = false;
+ this.indexForm = {};
+ this.indexData = [];
+ this.indexVisible = false;
+ }
+ }
}
</script>
-<style scoped>
+<style lang="scss" scoped>
+::v-deep {
+ .avue-dialog .el-dialog__body {
+ padding: 20px 20px 0px 20px; // 涓婂彸涓嬪乏
+ margin-bottom: 10px !important;
+ }
+
+ .el-scrollbar__wrap {
+ overflow: auto !important;
+ }
+
+ .el-form-item .el-select {
+ width: 100%;
+ }
+}
+
+.descBox {
+ width: 32%;
+ margin-left: 20px;
+}
+
+.dialogForm {
+ display: flex;
+ justify-content: space-around;
+}
+
+.dialogForm > div {
+ width: 29%;
+ border: 1px solid #eee;
+ padding: 25px 20px 5px 10px; /* 涓� 鍙� 涓� 宸� */
+ box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* 娣诲姞闃村奖鏁堟灉 */
+}
+
</style>
--
Gitblit v1.9.3