| | |
| | | .flex_box{ |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | align-items: center; |
| | | |
| | | } |
| | | .table_box { |
| | |
| | | "userRoleAuthorization_resize1" |
| | | ); |
| | | let left = document.getElementsByClassName("userRoleAuthorization_left1"); |
| | | let left1 = document.getElementsByClassName("userRoleAuthorization_left"); |
| | | let left1 = document.getElementsByClassName("userRoleAuthorization_left"); |
| | | let mid = document.getElementsByClassName("userRoleAuthorization_mid1"); |
| | | let box = document.getElementsByClassName("userRoleAuthorization1"); |
| | | console.log(resize) |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="contenttable"> |
| | | <div class="table_box" style="height:calc(100% - 89px)"> |
| | | <el-table |
| | | ref="filterTable" |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | height="100%" |
| | | height="calc(100% - 57px)" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | min-width="120" |
| | | |
| | | :label="$t('common.operate')" |
| | | > |
| | | <template slot-scope="scope"> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | <div |
| | | style="margin-top: 20px; " |
| | | class="pagination_box" |
| | | > |
| | | <el-pagination |
| | |
| | | padding: 1%; |
| | | .spatialContent { |
| | | width: 100%; |
| | | height: 92%; |
| | | height: calc(100% - 75px); |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .spatial_leftTree { |
| | | width: calc(15% - 0px); |
| | | width: calc(23% - 0px); |
| | | height: 100%; |
| | | |
| | | padding: 10px; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | max-height: 670px; |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | | } |
| | | .spatial_rightContent { |
| | | // width: 80%; |
| | | // height: 91%; |
| | | |
| | | .contentshuju { |
| | | width: 75%; |
| | | height: 100%; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | overflow-y: auto; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | border: 1px solid #dcdfe6; |
| | | } |
| | | } |
| | | } |
| | | .contentshuju{ |
| | | width: 80%; |
| | | height: 91%; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | max-height: 670px; |
| | | border: 1px solid #dcdfe6; |
| | | } |
| | | .contentshujutou{ |
| | | height: 50px; |
| | | padding: 1%; |
| | | |
| | | .contentshujutou { |
| | | padding: 8px; |
| | | // margin-top: 10px; |
| | | border-radius: 5px; |
| | | border: 1px solid #dcdfe6; |
| | | } |
| | | .contenttable{ |
| | | min-height: 520px; |
| | | height: 530px; |
| | | margin-top: 10px; |
| | | } |
| | | /deep/ .el-table__body{ |
| | | min-height: 525px; |
| | | margin-bottom: 20px; |
| | | .el-form-item { |
| | | margin: 5px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="subpage_Box"> |
| | | <My-bread :list="[ |
| | | `${$t('dataManage.dataManage')}`, |
| | | `${$t('dataManage.catalogueManage')}`, |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | <div class="cataLogContent"> |
| | | <div class="cataLog_leftTree subpage_Div"> |
| | | <div style="min-width:450px"> |
| | | <My-bread |
| | | :list="[ |
| | | `${$t('dataManage.dataManage')}`, |
| | | `${$t('dataManage.catalogueManage')}`, |
| | | ]" |
| | | ></My-bread> |
| | | <el-divider /> |
| | | <div style="min-width: 450px"> |
| | | <el-tree |
| | | ref="tree" |
| | | :props="defaultProps" |
| | |
| | | :default-expanded-keys="expandData" |
| | | @node-click="handleNodeClick" |
| | | > |
| | | |
| | | </el-tree> |
| | | </div> |
| | | </div> |
| | | <div class="cataLog_rightContent subpage_Div"> |
| | | <div style="align-items: center;display:flex;justify-content:space-between"> |
| | | <div |
| | | style=" |
| | | align-items: center; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | " |
| | | > |
| | | <el-breadcrumb separator="/"> |
| | | <el-breadcrumb-item :to="{ path: '/' }">{{ |
| | | $t('dataManage.dictionaryManageObj.particulars') |
| | | }}</el-breadcrumb-item> |
| | | $t("dataManage.dictionaryManageObj.particulars") |
| | | }}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | <div style="margin-right: -5px;"> |
| | | |
| | | <div style="margin-right: -5px"> |
| | | <div class="menuTop"> |
| | | <el-form |
| | | :inline="true" |
| | | class="demo-form-inline" |
| | | > |
| | | <el-form :inline="true" class="demo-form-inline"> |
| | | <el-form-item> |
| | | |
| | | <el-upload |
| | | action |
| | | accept=".xlsx, .xls" |
| | |
| | | :on-change="handleChange" |
| | | :file-list="fileList" |
| | | > |
| | | <el-button |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | >上传文件</el-button> |
| | | <el-button type="success" icon="el-icon-plus" size="small" |
| | | >上传文件</el-button |
| | | > |
| | | </el-upload> |
| | | |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | >新增同级</el-button> |
| | | >新增同级</el-button |
| | | > |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | >新增子级</el-button> |
| | | >新增子级</el-button |
| | | > |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | >删除</el-button> |
| | | >删除</el-button |
| | | > |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | |
| | | type="info" |
| | | icon="el-icon-top" |
| | | size="small" |
| | | >向上移动</el-button> |
| | | >向上移动</el-button |
| | | > |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | |
| | | type="info" |
| | | icon="el-icon-bottom" |
| | | size="small" |
| | | >向下移动</el-button> |
| | | >向下移动</el-button |
| | | > |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <el-divider /> |
| | | <el-form |
| | | :model="itemdetail" |
| | | ref="itemdetail" |
| | | :rules="rules" |
| | | > |
| | | <el-form :model="itemdetail" ref="itemdetail" :rules="rules"> |
| | | <el-form-item |
| | | prop="name" |
| | | :label="$t('dataManage.dataUpObj.directoryName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="itemdetail.name" style="max-width: 400px;"/> |
| | | <el-input v-model="itemdetail.name" style="max-width: 400px" /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.catalogDescription')" |
| | |
| | | v-model="itemdetail.descr" |
| | | type="textarea" |
| | | resize="none" |
| | | style="height: 100%; overflow: auto;max-width: 400px;" |
| | | style="height: 100%; overflow: auto; max-width: 400px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | v-model="itemdetail.bak" |
| | | type="textarea" |
| | | resize="none" |
| | | style="max-width: 400px;" |
| | | style="max-width: 400px" |
| | | /> |
| | | </el-form-item> |
| | | <div class="btnBox"> |
| | |
| | | class="primary" |
| | | size="small" |
| | | @click="updCata('itemdetail')" |
| | | >{{ |
| | | $t('common.preservation') |
| | | }}</el-button> |
| | | >{{ $t("common.preservation") }}</el-button |
| | | > |
| | | <el-button |
| | | v-if="menuStatus.update" |
| | | type="info" |
| | | size="small" |
| | | @click="reset" |
| | | >{{ |
| | | $t('common.cancel') |
| | | }}</el-button> |
| | | >{{ $t("common.cancel") }}</el-button |
| | | > |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | |
| | | :visible.sync="dialogFormVisible" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-form |
| | | :model="ruleForm" |
| | | ref="ruleForm" |
| | | :rules="rules" |
| | | > |
| | | <el-form :model="ruleForm" ref="ruleForm" :rules="rules"> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.directoryName')" |
| | | prop="name" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.name" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="ruleForm.name" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.catalogDescription')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.descr" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="ruleForm.descr" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.catalogRemarks')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.bak" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="ruleForm.bak" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="resetForm('ruleForm')">{{ |
| | | $t('common.cancel') |
| | | $t("common.cancel") |
| | | }}</el-button> |
| | | <el-button |
| | | class="primary" |
| | | @click="submitForm('ruleForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading" |
| | | >{{ $t('common.preservation') }}</el-button> |
| | | >{{ $t("common.preservation") }}</el-button |
| | | > |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | insertDir, |
| | | deleteDir, |
| | | getPerms, |
| | | } from '../../api/api'; |
| | | import * as XSLX from 'xlsx'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | import clone from '@turf/clone'; |
| | | } from "../../api/api"; |
| | | import * as XSLX from "xlsx"; |
| | | import MyBread from "../../components/MyBread.vue"; |
| | | import clone from "@turf/clone"; |
| | | export default { |
| | | name: 'catalogueManage', |
| | | name: "catalogueManage", |
| | | components: { |
| | | MyBread, |
| | | }, |
| | | data() { |
| | | let validName = (rule, value, callback) => { |
| | | if (value === '' || value === null || value === undefined) { |
| | | return callback(new Error('目录名称不能为空')); |
| | | if (value === "" || value === null || value === undefined) { |
| | | return callback(new Error("目录名称不能为空")); |
| | | } else { |
| | | callback(); |
| | | } |
| | |
| | | update: false, |
| | | }, |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'name', |
| | | children: "children", |
| | | label: "name", |
| | | }, |
| | | fullscreenLoading: false, |
| | | oriData: [], //原始树数据 |
| | |
| | | newData: [], //拖动后原始数据 |
| | | itemdetail: {}, |
| | | itemaName: null, |
| | | backUpData: '', |
| | | formLabelWidth: '150px', |
| | | delChildID: '', |
| | | backUpData: "", |
| | | formLabelWidth: "150px", |
| | | delChildID: "", |
| | | delChildIDs: [], |
| | | dialogFormVisible: false, |
| | | ruleForm: { |
| | | level: null, |
| | | orderNum: null, |
| | | pid: null, |
| | | name: '', |
| | | descr: '', |
| | | bak: '', |
| | | name: "", |
| | | descr: "", |
| | | bak: "", |
| | | }, |
| | | rules: { |
| | | name: [{ required: true, validator: validName, trigger: 'blur' }], |
| | | name: [{ required: true, validator: validName, trigger: "blur" }], |
| | | }, |
| | | newNode: null, |
| | | expandData: [], |
| | |
| | | } |
| | | const XLSX = require("xlsx"); |
| | | const wb = XLSX.read(binary, { |
| | | type: "binary" |
| | | type: "binary", |
| | | }); |
| | | const outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]], { defval: null }); // 默认第一行下为空也能解析出第一四行 |
| | | const outdata = XLSX.utils.sheet_to_json( |
| | | wb.Sheets[wb.SheetNames[0]], |
| | | { defval: null } |
| | | ); // 默认第一行下为空也能解析出第一四行 |
| | | var data = [...outdata]; |
| | | const arr = []; |
| | | data.map(v => { |
| | | data.map((v) => { |
| | | const obj = {}; |
| | | obj.name = v.name; |
| | | obj.pname = v.pname; |
| | |
| | | obj.pid = null; |
| | | arr.push(obj); |
| | | }); |
| | | that.tableData = arr |
| | | that.setInsertData(that.tableData) |
| | | } |
| | | that.tableData = arr; |
| | | that.setInsertData(that.tableData); |
| | | }; |
| | | } |
| | | }, |
| | | setInsertData(res) { |
| | |
| | | |
| | | if (list.length != 0) { |
| | | if (list[0].pname != null) { |
| | | return this.$message.error('上传数据错误,第一条数据不为空'); |
| | | return this.$message.error("上传数据错误,第一条数据不为空"); |
| | | } |
| | | |
| | | this.getAllNodeId(list) |
| | | this.getAllNodeId(list); |
| | | } |
| | | }, |
| | | async getAllNodeId(res) { |
| | | for (let i = 0; i < res.length; i++) { |
| | | |
| | | var val = res[i]; |
| | | |
| | | if (val.pname == null) { |
| | |
| | | } else { |
| | | this.tableData.filter((child) => { |
| | | if (child.name == val.pname) { |
| | | |
| | | val.pid = child.id; |
| | | val.orderNum = i + 1; |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | const data = await insertDir(val); |
| | | if (data.code != 200) { |
| | | |
| | | } |
| | | this.tableData.filter((child) => { |
| | | if (child.name == val.name && child.pname == val.pname) { |
| | | child.id = data.result; |
| | | } |
| | | }) |
| | | }); |
| | | this.itemaName = data.result; |
| | | this.getDirTree(); |
| | | |
| | | |
| | | |
| | | if (res[i].children) { |
| | | this.getAllNodeId(res[i].children) |
| | | this.getAllNodeId(res[i].children); |
| | | } |
| | | } |
| | | }, |
| | |
| | | // 循环所有项 |
| | | let branchArr = cloneData.filter((child) => father.name == child.pname); // 对比ID,分别上下级菜单,并返回数据 |
| | | |
| | | branchArr.length > 0 ? (father.children = branchArr) : ''; // 给父级添加一个children属性,并赋值 |
| | | branchArr.length > 0 ? (father.children = branchArr) : ""; // 给父级添加一个children属性,并赋值 |
| | | // 属于同一对象问题,例如:令 a=b、c=1 ,然后再令 b.c=c , 那么 a.c=b.c=c=1 ;同理,后续令 c.d=2 ,那么 a.c.d 也是=2; |
| | | // 由此循环多次后,就能形成相应的树形数据结构 |
| | | return father.pname == null; // 返回一级菜单 |
| | |
| | | }, |
| | | readFile(file) { |
| | | //文件读取 |
| | | return new Promise(resolve => { |
| | | return new Promise((resolve) => { |
| | | let reader = new FileReader(); |
| | | reader.readAsBinaryString(file); //以二进制的方式读取 |
| | | reader.onload = ev => { |
| | | reader.onload = (ev) => { |
| | | resolve(ev.target.result); |
| | | }; |
| | | }); |
| | |
| | | // }); |
| | | if (this.itemaName != null) { |
| | | this.$nextTick(() => { |
| | | |
| | | this.expandData = [this.itemaName] |
| | | this.expandData = [this.itemaName]; |
| | | this.$refs.tree.setCurrentKey(this.itemaName); |
| | | |
| | | }); |
| | | } |
| | | |
| | | |
| | | } else { |
| | | console.log('接口报错'); |
| | | console.log("接口报错"); |
| | | } |
| | | }); |
| | | }, |
| | | handleClose() { |
| | | this.$confirm('确认关闭?') |
| | | this.$confirm("确认关闭?") |
| | | .then((_) => { |
| | | this.resetForm(); |
| | | }) |
| | | .catch((_) => { }); |
| | | .catch((_) => {}); |
| | | }, |
| | | treeData(source) { |
| | | let cloneData = JSON.parse(JSON.stringify(source)); // 对源数据深度克隆 |
| | | return cloneData.filter((father) => { |
| | | // 循环所有项 |
| | | let branchArr = cloneData.filter((child) => father.id == child.pid); // 对比ID,分别上下级菜单,并返回数据 |
| | | branchArr.length > 0 ? (father.children = branchArr) : ''; // 给父级添加一个children属性,并赋值 |
| | | branchArr.length > 0 ? (father.children = branchArr) : ""; // 给父级添加一个children属性,并赋值 |
| | | // 属于同一对象问题,例如:令 a=b、c=1 ,然后再令 b.c=c , 那么 a.c=b.c=c=1 ;同理,后续令 c.d=2 ,那么 a.c.d 也是=2; |
| | | // 由此循环多次后,就能形成相应的树形数据结构 |
| | | return father.pid == 0; // 返回一级菜单 |
| | |
| | | } |
| | | } |
| | | switch (res) { |
| | | case 1://向上移动 |
| | | case 1: //向上移动 |
| | | if (currentId != 0) { |
| | | const tempChildrenNodex1 = pchildNodes[currentId - 1]; |
| | | const tempChildrenNodex2 = pchildNodes[currentId]; |
| | | tempChildrenNodex2.orderNum = pchildNodes[currentId - 1].data.orderNum; |
| | | tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum |
| | | var arr = []; |
| | | this.oriData.filter(res => { |
| | | if (res.id == tempChildrenNodex2.data.id) { |
| | | res.orderNum = tempChildrenNodex2.orderNum; |
| | | arr.push(res) |
| | | } else if (res.id == tempChildrenNodex1.data.id) { |
| | | res.orderNum = tempChildrenNodex1.orderNum; |
| | | arr.push(res) |
| | | } |
| | | |
| | | }) |
| | | this.newData = arr; |
| | | this.sendChange(); |
| | | } else { |
| | | this.$message({ |
| | | message: '处于顶端,不能继续上移', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | break; |
| | | case 2://向下移动 |
| | | if (currentId < (pchildNodes.length - 1)) { |
| | | const tempChildrenNodex1 = pchildNodes[currentId + 1]; |
| | | const tempChildrenNodex2 = pchildNodes[currentId]; |
| | | tempChildrenNodex2.orderNum = pchildNodes[currentId + 1].data.orderNum; |
| | | tempChildrenNodex2.orderNum = |
| | | pchildNodes[currentId - 1].data.orderNum; |
| | | tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum; |
| | | var arr = []; |
| | | this.oriData.filter(res => { |
| | | this.oriData.filter((res) => { |
| | | if (res.id == tempChildrenNodex2.data.id) { |
| | | res.orderNum = tempChildrenNodex2.orderNum; |
| | | arr.push(res) |
| | | arr.push(res); |
| | | } else if (res.id == tempChildrenNodex1.data.id) { |
| | | res.orderNum = tempChildrenNodex1.orderNum; |
| | | arr.push(res) |
| | | arr.push(res); |
| | | } |
| | | }) |
| | | }); |
| | | this.newData = arr; |
| | | this.sendChange(); |
| | | } else { |
| | | this.$message({ |
| | | message: '处于底端,不能继续下移', |
| | | type: 'warning' |
| | | message: "处于顶端,不能继续上移", |
| | | type: "warning", |
| | | }); |
| | | |
| | | } |
| | | break; |
| | | |
| | | case 2: //向下移动 |
| | | if (currentId < pchildNodes.length - 1) { |
| | | const tempChildrenNodex1 = pchildNodes[currentId + 1]; |
| | | const tempChildrenNodex2 = pchildNodes[currentId]; |
| | | tempChildrenNodex2.orderNum = |
| | | pchildNodes[currentId + 1].data.orderNum; |
| | | tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum; |
| | | var arr = []; |
| | | this.oriData.filter((res) => { |
| | | if (res.id == tempChildrenNodex2.data.id) { |
| | | res.orderNum = tempChildrenNodex2.orderNum; |
| | | arr.push(res); |
| | | } else if (res.id == tempChildrenNodex1.data.id) { |
| | | res.orderNum = tempChildrenNodex1.orderNum; |
| | | arr.push(res); |
| | | } |
| | | }); |
| | | this.newData = arr; |
| | | this.sendChange(); |
| | | } else { |
| | | this.$message({ |
| | | message: "处于底端,不能继续下移", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | break; |
| | | } |
| | | }, |
| | | setDelNode() { |
| | | this.$confirm('此操作将永久删除该目录, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.remove(this.newNode, this.itemdetail) |
| | | }).catch(() => { |
| | | this.$confirm("此操作将永久删除该目录, 是否继续?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | this.remove(this.newNode, this.itemdetail); |
| | | }) |
| | | .catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | type: "info", |
| | | message: "已取消删除", |
| | | }); |
| | | }); |
| | | }, |
| | | setNewNode(res) { |
| | | var id, lever, orderNum; |
| | | if (res == 1) {//新增同级 |
| | | if (res == 1) { |
| | | //新增同级 |
| | | id = this.itemdetail.pid; |
| | | orderNum = this.getMaxOrderNum(this.newNode.parent.childNodes) |
| | | orderNum = this.getMaxOrderNum(this.newNode.parent.childNodes); |
| | | lever = this.itemdetail.level; |
| | | } else if (res == 2) {//新增子级 |
| | | } else if (res == 2) { |
| | | //新增子级 |
| | | id = this.itemdetail.id; |
| | | orderNum = this.getMaxOrderNum(this.newNode.childNodes) |
| | | orderNum = this.getMaxOrderNum(this.newNode.childNodes); |
| | | lever = this.itemdetail.level + 1; |
| | | } |
| | | |
| | | this.ruleForm.pid = id; |
| | | this.ruleForm.level = lever; |
| | | this.ruleForm.orderNum = orderNum |
| | | this.ruleForm.orderNum = orderNum; |
| | | this.dialogFormVisible = true; |
| | | }, |
| | | getMaxOrderNum(res) { |
| | | var val = -100; |
| | | for (var i in res) { |
| | | if (res[i].data.orderNum > val) { |
| | | val = res[i].data.orderNum |
| | | val = res[i].data.orderNum; |
| | | } |
| | | } |
| | | val = val + 1; |
| | | return val; |
| | | }, |
| | | |
| | | |
| | | |
| | | append(node, data) { |
| | | this.dialogFormVisible = true; |
| | |
| | | |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | message: '添加成功', |
| | | type: 'success', |
| | | message: "添加成功", |
| | | type: "success", |
| | | }); |
| | | this.itemaName = res.result; |
| | | this.itemdetail = {}; |
| | |
| | | }) |
| | | .catch((res) => { |
| | | this.itemdetail = {}; |
| | | this.$message.error('添加失败'); |
| | | this.$message.error("添加失败"); |
| | | this.fullscreenLoading = false; |
| | | console.log(res); |
| | | }); |
| | |
| | | remove(node, data) { |
| | | this.itemaName = node.parent.data.id; |
| | | |
| | | this.$confirm('此操作将删除该节点, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | this.$confirm("此操作将删除该节点, 是否继续?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | //兄弟重新排序 |
| | |
| | | .then((res) => { |
| | | if (res[0].code == 200 && res[1].code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功!', |
| | | type: "success", |
| | | message: "删除成功!", |
| | | }); |
| | | this.itemdetail = {}; |
| | | |
| | | this.getDirTree(); |
| | | } else if (res[0].code == 200) { |
| | | this.$message.error('删除成功,位置调整失败'); |
| | | this.$message.error("删除成功,位置调整失败"); |
| | | } else if (res[1].code == 200) { |
| | | this.$message.error('删除失败,位置调整成功'); |
| | | this.$message.error("删除失败,位置调整成功"); |
| | | } else { |
| | | this.$message.error('删除失败'); |
| | | this.$message.error("删除失败"); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | this.$message.error('删除失败'); |
| | | this.$message.error("删除失败"); |
| | | this.itemdetail = {}; |
| | | }); |
| | | //重置要删除的子ID |
| | | this.delChildIDs = []; |
| | | }) |
| | | .catch(() => { |
| | | this.$message('已取消删除'); |
| | | this.$message("已取消删除"); |
| | | }); |
| | | // this.dialogMessage="是否删除" |
| | | // this.dialogFlag = 1; |
| | |
| | | this.old_dirDat = JSON.parse(JSON.stringify(this.dirList)); //将备份的dir重新赋值 |
| | | }, |
| | | handleDrop(draggingNode, dropNode, dropType, ev) { |
| | | this.$confirm('此操作将保存目录更改, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | this.$confirm("此操作将保存目录更改, 是否继续?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | //父节点 |
| | | let data = dropType != 'inner' ? dropNode.parent.data : dropNode.data; |
| | | let data = dropType != "inner" ? dropNode.parent.data : dropNode.data; |
| | | // 父节点中全部子节点 |
| | | let nodeData = |
| | | dropNode.level == 1 && dropType != 'inner' ? data : data.children; |
| | | dropNode.level == 1 && dropType != "inner" ? data : data.children; |
| | | //变更节点 |
| | | nodeData.forEach((item, i) => { |
| | | if (dropType != 'inner') { |
| | | if (dropType != "inner") { |
| | | if (draggingNode.data.pid === dropNode.data.pid) { |
| | | item.pid = item.pid; |
| | | } else { |
| | |
| | | this.sendChange(); |
| | | }) |
| | | .catch(() => { |
| | | this.$message('已取消更改'); |
| | | this.$message("已取消更改"); |
| | | this.dirList = this.old_dirDat; //将备份的dir重新赋值 |
| | | }); |
| | | }, |
| | |
| | | this.getDirTree(); |
| | | return; |
| | | } else { |
| | | this.$message.error('修改失败,请重试!'); |
| | | this.$message.error("修改失败,请重试!"); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | this.$message.error('修改失败,请重试!'); |
| | | this.$message.error("修改失败,请重试!"); |
| | | }); |
| | | }, |
| | | handleNodeClick(data, node) { |
| | |
| | | }, 500); |
| | | }) |
| | | .catch((res) => { |
| | | this.$message.error('修改失败,请重试!'); |
| | | this.$message.error("修改失败,请重试!"); |
| | | this.fullscreenLoading = false; |
| | | }); |
| | | } else { |
| | |
| | | reset(formName) { |
| | | this.itemdetail = {}; |
| | | // this.$refs[formName].resetFields(); |
| | | if (this.backUpData != '') { |
| | | if (this.backUpData != "") { |
| | | this.itemdetail = JSON.parse(this.backUpData); |
| | | } |
| | | }, |
| | | showPermsMenu(res) { |
| | | |
| | | switch (res.tag) { |
| | | case '/delete': |
| | | case "/delete": |
| | | this.menuStatus.delete = true; |
| | | break; |
| | | case '/insert': |
| | | case "/insert": |
| | | this.menuStatus.insert = true; |
| | | break; |
| | | case '/update': |
| | | case "/update": |
| | | this.menuStatus.update = true; |
| | | break; |
| | | } |
| | |
| | | } |
| | | for (var i = 0; i < permsEntity.length; i++) { |
| | | if (val === permsEntity[i].perms) { |
| | | |
| | | this.showPermsMenu(permsEntity[i]); |
| | | } |
| | | } |
| | |
| | | |
| | | <style lang="less" scoped> |
| | | .subpage_Box { |
| | | height: 98%; |
| | | height: 96%; |
| | | width: 98%; |
| | | padding: 1%; |
| | | padding: 1%; |
| | | border-radius: 10px; |
| | | .cataLogContent { |
| | | width: 100%; |
| | | height: 100%; |
| | | max-height: 670px; |
| | | display: flex; |
| | | align-items: center; |
| | | // align-items: center; |
| | | justify-content: space-between; |
| | | .cataLog_leftTree { |
| | | width: 15%; |
| | | height: 100%; |
| | | width: 30%; |
| | | height: 98%; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | padding: 10px; |
| | | overflow-y: auto; |
| | | } |
| | | .cataLog_rightContent { |
| | | width: 80%; |
| | | height: 100%; |
| | | max-height: 670px; |
| | | width: 66%; |
| | | height: 98%; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | padding: 10px; |
| | | .menuTop { |
| | | /deep/ .el-form-item { |
| | | margin-bottom: 0px; |
| | |
| | | } |
| | | } |
| | | } |
| | | .btnBox{ |
| | | text-align: right; |
| | | } |
| | | </style> |
| | |
| | | :label="$t('dataManage.dataUpObj.uploaddata')" |
| | | name="first" |
| | | > |
| | | <div class="subpage_Iquery subpage_Div"> |
| | | <div class="inquire subpage_Div" ref="container"> |
| | | <el-form |
| | | :inline="true" |
| | | :model="formInline" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <!-- 选择数据 --> |
| | | <el-form-item> |
| | | <el-link |
| | | :disabled="tableData.length == 0 ? false : true" |
| | | v-show="formInline.specialtyData == '请选择数据'" |
| | | @click="setSelectFile" |
| | | :underline="false" |
| | | type="primary" |
| | | >{{$t('dataManage.dataUpObj.selectData') }}</el-link> |
| | | <el-link |
| | | v-show="formInline.specialtyData != '请选择数据'" |
| | | @click="restSelectFile" |
| | | :underline="false" |
| | | type="primary" |
| | | >{{$t('common.reset') }}</el-link> |
| | | <input |
| | | id="selectDataFile" |
| | | type="file" |
| | | name="file" |
| | | multiple="multiple" |
| | | :accept="formInline.selectFileType" |
| | | @change="handleSelectFileChange" |
| | | style="display: none" |
| | | ></input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-input |
| | | placeholder="请输入内容" |
| | | v-model="formInline.specialtyData" |
| | | style="width:210px;" |
| | | disabled |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | <!-- 选择元数据 --> |
| | | <el-form-item v-show="uploadFlag"> |
| | | <el-link |
| | | :disabled="tableData.length == 0 ? false : true" |
| | | v-show="formInline.metaData == '请选择元数据'" |
| | | @click="setMetaFile" |
| | | :underline="false" |
| | | type="primary" |
| | | >{{$t('dataManage.dataUpObj.selectMetadata') }}</el-link> |
| | | <el-link |
| | | v-show="formInline.metaData != '请选择元数据'" |
| | | @click="restMetaFile" |
| | | :underline="false" |
| | | type="primary" |
| | | >{{$t('common.reset') }}</el-link> |
| | | <input |
| | | id="metaDataFile" |
| | | type="file" |
| | | name="file" |
| | | multiple="multiple" |
| | | accept=".xls,.xlsx" |
| | | style="display: none" |
| | | @change="handleMetaFileChange" |
| | | ></input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-show="uploadFlag" |
| | | style="margin-left: 0.7%;" |
| | | > |
| | | <el-input |
| | | placeholder="请输入内容" |
| | | v-model="formInline.metaData" |
| | | style="width:210px;" |
| | | disabled |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | <!-- 选择WBS数据 --> |
| | | <el-form-item v-show="!uploadFlag"> |
| | | <div class="flex_box"> |
| | | <div style="margin-right: auto"> |
| | | <!-- 选择数据 --> |
| | | <el-form-item> |
| | | <el-link |
| | | :disabled="tableData.length == 0 ? false : true" |
| | | v-show="formInline.specialtyData == '请选择数据'" |
| | | @click="setSelectFile" |
| | | :underline="false" |
| | | type="primary" |
| | | >{{$t('dataManage.dataUpObj.selectData') }}</el-link> |
| | | <el-link |
| | | v-show="formInline.specialtyData != '请选择数据'" |
| | | @click="restSelectFile" |
| | | :underline="false" |
| | | type="primary" |
| | | >{{$t('common.reset') }}</el-link> |
| | | <input |
| | | id="selectDataFile" |
| | | type="file" |
| | | name="file" |
| | | multiple="multiple" |
| | | :accept="formInline.selectFileType" |
| | | @change="handleSelectFileChange" |
| | | style="display: none" |
| | | ></input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-input |
| | | placeholder="请输入内容" |
| | | v-model="formInline.specialtyData" |
| | | style="width:210px;" |
| | | disabled |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | <!-- 选择元数据 --> |
| | | <el-form-item v-show="uploadFlag"> |
| | | <el-link |
| | | :disabled="tableData.length == 0 ? false : true" |
| | | v-show="formInline.metaData == '请选择元数据'" |
| | | @click="setMetaFile" |
| | | :underline="false" |
| | | type="primary" |
| | | >{{$t('dataManage.dataUpObj.selectMetadata') }}</el-link> |
| | | <el-link |
| | | v-show="formInline.metaData != '请选择元数据'" |
| | | @click="restMetaFile" |
| | | :underline="false" |
| | | type="primary" |
| | | >{{$t('common.reset') }}</el-link> |
| | | <input |
| | | id="metaDataFile" |
| | | type="file" |
| | | name="file" |
| | | multiple="multiple" |
| | | accept=".xls,.xlsx" |
| | | style="display: none" |
| | | @change="handleMetaFileChange" |
| | | ></input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-show="uploadFlag" |
| | | > |
| | | <el-input |
| | | placeholder="请输入内容" |
| | | v-model="formInline.metaData" |
| | | style="width:210px;" |
| | | disabled |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | <!-- 选择WBS数据 --> |
| | | <el-form-item v-show="!uploadFlag"> |
| | | <el-link |
| | | :disabled="tableData.length == 0 ? false : true" |
| | | v-show="formInline.wbsData == '请选择WBS数据'" |
| | |
| | | style="display: none" |
| | | @change="handleWBSFileChange" |
| | | ></input> |
| | | </el-form-item> |
| | | <el-form-item v-show="!uploadFlag"> |
| | | </el-form-item> |
| | | <el-form-item v-show="!uploadFlag"> |
| | | <el-input |
| | | placeholder="请选择WBS数据" |
| | | v-model="formInline.wbsData" |
| | |
| | | disabled |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item style="float: right;"> |
| | | </el-form-item> |
| | | </div> |
| | | <div> |
| | | <el-form-item> |
| | | <!-- 上传 --> |
| | | <el-button |
| | | v-if="menuStatus.upload" |
| | |
| | | >{{$t('common.quayTest')}} |
| | | </el-button> |
| | | |
| | | </el-form-item> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </el-form> |
| | | </el-form> |
| | | |
| | | </div> |
| | | <!-- 上传数据列表 --> |
| | | <div class="subpage_Content subpage_Div"> |
| | | <div class="table_box" :style="styleVar"> |
| | | <el-table |
| | | style="min-height: 470px;" |
| | | style="width:100%" |
| | | :data="tableData" |
| | | @selection-change="handleSelectionChange" |
| | | height="calc(100% - 57px)" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | |
| | | :label="$t('dataManage.dataUpObj.receiptdata')" |
| | | name="second" |
| | | > |
| | | <div class="subpage_Iquery subpage_Div"> |
| | | <div class="inquire subpage_Div" ref="container1"> |
| | | <el-form |
| | | :inline="true" |
| | | :model="formWarehousing" |
| | | class="demo-form-inline" |
| | | > |
| | | <div class="flex_box"> |
| | | <div style="margin-right: auto"> |
| | | <el-form-item :label="$t('dataManage.dataUpObj.describe')"> |
| | | <el-input |
| | | v-model="formWarehousing.name" |
| | |
| | | style="width: 200px;" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="float: right;"> |
| | | </div> |
| | | <div> |
| | | <el-form-item> |
| | | <el-button |
| | | v-if="menuStatus.delete" |
| | | @click="setWarehouseDel" |
| | |
| | | type="info" |
| | | >{{ $t('common.reset') }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item style="float: right;"> |
| | | <el-form-item> |
| | | <el-button |
| | | v-if="menuStatus.upload" |
| | | :disabled="multipleDelete.length == 0 ? true : false" |
| | |
| | | size="small" |
| | | >{{ $t('common.enclosure') }}</el-button> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </el-form> |
| | | </div> |
| | | <!-- 入库 --> |
| | | <div class="bottom"> |
| | | <div class="rightTable subpage_Div"> |
| | | <div class="table_box"> |
| | | |
| | | <div class="table_box" :style="styleVar1"> |
| | | <el-table |
| | | ref="filterTable" |
| | | :data="waretableData" |
| | | style="width: 100%" |
| | | height="99%" |
| | | height="calc(100% - 57px)" |
| | | @selection-change="handleDelteChange" |
| | | > |
| | | <el-table-column |
| | |
| | | width="100" |
| | | /> |
| | | </el-table> |
| | | </div> |
| | | <div class="pagination_box"> |
| | | <div class="pagination_box"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <!-- 质检弹窗 --> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import $ from 'jquery'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | import { getToken } from '@/utils/auth'; |
| | | import $ from "jquery"; |
| | | import MyBread from "../../components/MyBread.vue"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import { |
| | | dataUploadSelectPath, |
| | | selectdirTab, |
| | |
| | | dataUpload_insertFiles, |
| | | dataUpload_selectFields, |
| | | dataUpload_selectDbData, |
| | | } from '../../api/api'; |
| | | } from "../../api/api"; |
| | | export default { |
| | | name: 'dataUpdata', |
| | | name: "dataUpdata", |
| | | components: { |
| | | MyBread, |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | coordinateOption: [], |
| | | disOptions: [{ |
| | | name: '崩塌治理', |
| | | value: '崩塌治理', |
| | | }, { |
| | | name: '不稳定斜坡治理', |
| | | value: '不稳定斜坡治理', |
| | | }, { |
| | | name: '地面塌陷治理', |
| | | value: '地面塌陷治理', |
| | | }, { |
| | | name: '高陡边坡治理', |
| | | value: '高陡边坡治理', |
| | | }, { |
| | | name: '泥石流治理', |
| | | value: '泥石流治理', |
| | | }, { |
| | | name: '水毁治理', |
| | | value: '水毁治理', |
| | | }, { |
| | | name: '滑坡治理', |
| | | value: '滑坡治理', |
| | | }], |
| | | disOptions: [ |
| | | { |
| | | name: "崩塌治理", |
| | | value: "崩塌治理", |
| | | }, |
| | | { |
| | | name: "不稳定斜坡治理", |
| | | value: "不稳定斜坡治理", |
| | | }, |
| | | { |
| | | name: "地面塌陷治理", |
| | | value: "地面塌陷治理", |
| | | }, |
| | | { |
| | | name: "高陡边坡治理", |
| | | value: "高陡边坡治理", |
| | | }, |
| | | { |
| | | name: "泥石流治理", |
| | | value: "泥石流治理", |
| | | }, |
| | | { |
| | | name: "水毁治理", |
| | | value: "水毁治理", |
| | | }, |
| | | { |
| | | name: "滑坡治理", |
| | | value: "滑坡治理", |
| | | }, |
| | | ], |
| | | testQuayVisible: false, |
| | | formCheckAll: { |
| | | names: null, |
| | |
| | | xmmc: null, |
| | | names: null, |
| | | sjzy: null, |
| | | tolerance: '0.001', |
| | | gcdOffset: '20', |
| | | rangeOffset: '200', |
| | | kzdOffset: '100', |
| | | xgMax: '0.005', |
| | | coordinateSystem: 'CGCS2000/degree', |
| | | imgResolution: '0.2', |
| | | demTolerance: '5', |
| | | demChangeRate: '200', |
| | | lazDensity: '1', |
| | | imgResolution: '0.2', |
| | | tolerance: "0.001", |
| | | gcdOffset: "20", |
| | | rangeOffset: "200", |
| | | kzdOffset: "100", |
| | | xgMax: "0.005", |
| | | coordinateSystem: "CGCS2000/degree", |
| | | imgResolution: "0.2", |
| | | demTolerance: "5", |
| | | demChangeRate: "200", |
| | | lazDensity: "1", |
| | | imgResolution: "0.2", |
| | | }, |
| | | quayTestShow: { |
| | | checkOsgb: false, |
| | |
| | | name: null, |
| | | }, |
| | | count: 0, |
| | | formWarehousing: { name: '' }, |
| | | formWarehousing: { name: "" }, |
| | | multipleSelection: [], |
| | | tableData: [], |
| | | entryOption: [], |
| | |
| | | verOption: [], |
| | | catalogOption: [], |
| | | activeTabName: "first", |
| | | uploadOption: [{ |
| | | value: 'v1', |
| | | label: '单文件上传' |
| | | }, { |
| | | value: 'v2', |
| | | label: '项目整体上传' |
| | | }], |
| | | uploadOption: [ |
| | | { |
| | | value: "v1", |
| | | label: "单文件上传", |
| | | }, |
| | | { |
| | | value: "v2", |
| | | label: "项目整体上传", |
| | | }, |
| | | ], |
| | | formInline: { |
| | | uploadType: 'v1', |
| | | uploadType: "v1", |
| | | dirid: null, |
| | | verid: null, |
| | | specialtyId: '测量专业', |
| | | specialtyData: '请选择数据', |
| | | metaData: '请选择元数据', |
| | | wbsData: '请选择WBS数据', |
| | | specialtyId: "测量专业", |
| | | specialtyData: "请选择数据", |
| | | metaData: "请选择元数据", |
| | | wbsData: "请选择WBS数据", |
| | | entryId: null, |
| | | selectFileType: '*.*', |
| | | selectFileType: "*.*", |
| | | coordinateId: null, |
| | | path: null, |
| | | }, |
| | | cascader: { |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'children', |
| | | label: "name", |
| | | value: "id", |
| | | children: "children", |
| | | emitPath: false, |
| | | }, |
| | | specialtyOption: [{ |
| | | value: '测量专业', |
| | | label: '测量专业' |
| | | }, { |
| | | value: '勘察专业', |
| | | label: '勘察专业' |
| | | }, { |
| | | value: '地灾专业', |
| | | label: '地灾专业' |
| | | }, { |
| | | value: '洞库专业', |
| | | label: '洞库专业' |
| | | }], |
| | | specialtyOption: [ |
| | | { |
| | | value: "测量专业", |
| | | label: "测量专业", |
| | | }, |
| | | { |
| | | value: "勘察专业", |
| | | label: "勘察专业", |
| | | }, |
| | | { |
| | | value: "地灾专业", |
| | | label: "地灾专业", |
| | | }, |
| | | { |
| | | value: "洞库专业", |
| | | label: "洞库专业", |
| | | }, |
| | | ], |
| | | fileType: [], |
| | | pathBak: null, |
| | | progress: 0, |
| | |
| | | tableWareThree: [], |
| | | wareSelectOne: null, |
| | | wareSelectTwo: null, |
| | | activeName: '', |
| | | activeName2: '', |
| | | activeName3: '', |
| | | activeName: "", |
| | | activeName2: "", |
| | | activeName3: "", |
| | | wareTableFlag: null, |
| | | insertWareList: null, |
| | | loading: false, |
| | |
| | | update: false, |
| | | upload: false, |
| | | download: false, |
| | | |
| | | }, |
| | | jindutiao: 0, |
| | | jindudialogVisible: false, |
| | | jindutiaoname: [], |
| | | enclosureData: [], |
| | | enclosureVisible: false, |
| | | enclosureTitle: '', |
| | | } |
| | | enclosureTitle: "", |
| | | tableHeight: 0, |
| | | timer: 0, |
| | | styleVar: { |
| | | height: "calc(100% - 109px)", |
| | | }, |
| | | styleVar1: { |
| | | height: "calc(100% - 109px)", |
| | | }, |
| | | }; |
| | | }, |
| | | |
| | | mounted() { |
| | |
| | | this.getFilePath(); |
| | | //权限获取 |
| | | this.getPerms(); |
| | | window.addEventListener("resize", this.onResize); |
| | | this.calHeight(); |
| | | }, |
| | | watch: { |
| | | |
| | | beforeDestroy() { |
| | | this.timer && clearTimeout(this.timer); |
| | | window.removeEventListener("resize", this.onResize); |
| | | }, |
| | | watch: {}, |
| | | methods: { |
| | | onResize() { |
| | | this.timer && clearTimeout(this.timer); |
| | | this.timer = setTimeout(() => { |
| | | this.calHeight(); |
| | | }, 500); |
| | | }, |
| | | calHeight() { |
| | | this.$nextTick(() => { |
| | | const rect = this.$refs.container.getBoundingClientRect(); |
| | | const rect1 = this.$refs.container1.getBoundingClientRect(); |
| | | console.log(rect) |
| | | console.log(rect1) |
| | | this.tableHeight = `${rect.height + 40}px`; |
| | | this.styleVar["height"] = `calc(100% - ${rect.height + 40}px)`; |
| | | this.styleVar1["height"] = `calc(100% - ${rect1.height + 40}px)`; |
| | | }); |
| | | }, |
| | | editFromDataClose() { |
| | | this.updateFormdialog = false; |
| | | this.$nextTick(() => { |
| | | this.editForm = JSON.parse(this.initialForm); |
| | | }); |
| | | }, |
| | | //附件变化 |
| | | uploadAnFilesChange() { |
| | | var formData = new FormData(); |
| | | var fs = document.getElementById("editimageFile"); |
| | | if (fs.files.length == 0) { |
| | | this.$message.error('请选择要上传的文件'); |
| | | this.$message.error("请选择要上传的文件"); |
| | | return; |
| | | } |
| | | for (var i = 0, c = fs.files.length; i < c; i++) { |
| | | formData.append("file", fs.files[i]); // fs.files[i].name,file |
| | | } |
| | | for (var i in this.enclosureData) { |
| | | formData.append('ids', this.enclosureData[i]) |
| | | formData.append("ids", this.enclosureData[i]); |
| | | } |
| | | const that = this |
| | | that.jindudialogVisible = true |
| | | that.$set(this, 'jindutiaoname', "附件上传") |
| | | that.$set(this, 'jindutiao', 0) |
| | | const that = this; |
| | | that.jindudialogVisible = true; |
| | | that.$set(this, "jindutiaoname", "附件上传"); |
| | | that.$set(this, "jindutiao", 0); |
| | | this.loading = true; |
| | | $.ajax(BASE_URL + "/dataUpload/uploadXlsAnnex?token=" + getToken() + "&path=" + this.formInline.path, { |
| | | type: "post", |
| | | data: formData, |
| | | async: true, |
| | | cache: false, |
| | | processData: false, |
| | | contentType: false, |
| | | success: (rs) => { |
| | | this.loading = false; |
| | | if (rs.code != 200) { |
| | | return this.$message.error('附件上传失败'); |
| | | } |
| | | $.ajax( |
| | | BASE_URL + |
| | | "/dataUpload/uploadXlsAnnex?token=" + |
| | | getToken() + |
| | | "&path=" + |
| | | this.formInline.path, |
| | | { |
| | | type: "post", |
| | | data: formData, |
| | | async: true, |
| | | cache: false, |
| | | processData: false, |
| | | contentType: false, |
| | | success: (rs) => { |
| | | this.loading = false; |
| | | if (rs.code != 200) { |
| | | return this.$message.error("附件上传失败"); |
| | | } |
| | | |
| | | this.$set(this, 'jindutiao', 100) |
| | | this.$message({ |
| | | message: '附件上传成功', |
| | | type: 'success' |
| | | }); |
| | | |
| | | }, |
| | | error: (rs) => { |
| | | this.loading = false; |
| | | this.$message.error('附件上传失败'); |
| | | }, |
| | | xhr: function () { |
| | | var myXhr = $.ajaxSettings.xhr(); |
| | | if (myXhr.upload) { //检查upload属性是否存在 |
| | | myXhr.upload.addEventListener('progress', that.progressHandlingFunction, false); //绑定progress事件的回调函数 |
| | | } |
| | | return myXhr; //xhr对象返回给jQuery使用 |
| | | this.$set(this, "jindutiao", 100); |
| | | this.$message({ |
| | | message: "附件上传成功", |
| | | type: "success", |
| | | }); |
| | | }, |
| | | error: (rs) => { |
| | | this.loading = false; |
| | | this.$message.error("附件上传失败"); |
| | | }, |
| | | xhr: function () { |
| | | var myXhr = $.ajaxSettings.xhr(); |
| | | if (myXhr.upload) { |
| | | //检查upload属性是否存在 |
| | | myXhr.upload.addEventListener( |
| | | "progress", |
| | | that.progressHandlingFunction, |
| | | false |
| | | ); //绑定progress事件的回调函数 |
| | | } |
| | | return myXhr; //xhr对象返回给jQuery使用 |
| | | }, |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ); |
| | | }, |
| | | //选择上传附件的文件 |
| | | uploadAnFiles() { |
| | | $('#editimageFile').click(); |
| | | $("#editimageFile").click(); |
| | | }, |
| | | //上传附件 |
| | | uploadAnnex() { |
| | | |
| | | }, |
| | | uploadAnnex() {}, |
| | | //附件上传 |
| | | setEnclosure() { |
| | | var enclosureData = [ |
| | | 'bd.b_pac_hydrogeology', |
| | | 'bd.b_pac_frozensoil', |
| | | 'bd.b_pac_geologic_hazard', |
| | | 'bd.b_pac_marine_meteorological', |
| | | 'bd.b_pac_meteorological', |
| | | 'bs.m_equipment_nameplate', |
| | | 'bs.m_hydraulic_protection', |
| | | 'bs.m_marker', |
| | | 'bs.s_borehole' |
| | | "bd.b_pac_hydrogeology", |
| | | "bd.b_pac_frozensoil", |
| | | "bd.b_pac_geologic_hazard", |
| | | "bd.b_pac_marine_meteorological", |
| | | "bd.b_pac_meteorological", |
| | | "bs.m_equipment_nameplate", |
| | | "bs.m_hydraulic_protection", |
| | | "bs.m_marker", |
| | | "bs.s_borehole", |
| | | ]; |
| | | var std = []; |
| | | this.enclosureData = []; |
| | |
| | | var row = this.multipleDelete[i]; |
| | | |
| | | if (row.tab && row.rows && enclosureData.indexOf(row.tab) > -1) { |
| | | |
| | | this.enclosureData.push(row.id) |
| | | this.enclosureData.push(row.id); |
| | | } else { |
| | | std.push(row.name) |
| | | std.push(row.name); |
| | | } |
| | | } |
| | | if (std.length != 0) { |
| | | this.enclosureTitle = std.toString() |
| | | this.enclosureTitle = std.toString(); |
| | | this.enclosureVisible = true; |
| | | } else { |
| | | this.uploadAnFiles(); |
| | |
| | | }, |
| | | //权限配置 |
| | | showPermsMenu(res) { |
| | | |
| | | switch (res.tag) { |
| | | case '/delete': |
| | | case "/delete": |
| | | this.menuStatus.delete = true; |
| | | break; |
| | | case '/insert': |
| | | case "/insert": |
| | | this.menuStatus.insert = true; |
| | | break; |
| | | case '/update': |
| | | case "/update": |
| | | this.menuStatus.update = true; |
| | | break; |
| | | case '/upload': |
| | | case "/upload": |
| | | this.menuStatus.upload = true; |
| | | break; |
| | | case '/download': |
| | | case "/download": |
| | | this.menuStatus.download = true; |
| | | break; |
| | | } |
| | |
| | | } |
| | | for (var i = 0; i < permsEntity.length; i++) { |
| | | if (val === permsEntity[i].perms) { |
| | | |
| | | this.showPermsMenu(permsEntity[i]); |
| | | } |
| | | } |
| | |
| | | var val = res.tab.split("."); |
| | | const data = await dataUpload_selectFields({ |
| | | ns: val[0], |
| | | tab: val[1] |
| | | }) |
| | | tab: val[1], |
| | | }); |
| | | if (data.code != 200) { |
| | | this.$message.error('字段列表调用失败'); |
| | | return |
| | | this.$message.error("字段列表调用失败"); |
| | | return; |
| | | } |
| | | var val_data = data.result; |
| | | for (var i in val_data) { |
| | | if (val_data[i].alias.indexOf('ID') != -1) { |
| | | val_data[i].alias = val_data[i].alias.replace('ID', '') |
| | | if (val_data[i].alias.indexOf("ID") != -1) { |
| | | val_data[i].alias = val_data[i].alias.replace("ID", ""); |
| | | } |
| | | } |
| | | this.dialogVisible = true; |
| | |
| | | id: res.id, |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | } |
| | | }; |
| | | this.getDataLoaderSelectDbData(); |
| | | }, |
| | | async getDataLoaderSelectDbData() { |
| | | const data1 = await dataUpload_selectDbData(this.listLoader); |
| | | if (data1.code != 200) { |
| | | this.$message.error('字段列表调用失败'); |
| | | return |
| | | this.$message.error("字段列表调用失败"); |
| | | return; |
| | | } |
| | | var val = data1.result; |
| | | for (var i in val) { |
| | |
| | | val[i].verid = val[i].verName; |
| | | val[i].updateuser = val[i].updateName; |
| | | if (val[i].createtime != null) { |
| | | val[i].createtime = this.changetimeLayer(val[i].createtime) |
| | | val[i].createtime = this.changetimeLayer(val[i].createtime); |
| | | } |
| | | if (val[i].updatetime != null) { |
| | | val[i].updatetime = this.changetimeLayer(val[i].updatetime) |
| | | val[i].updatetime = this.changetimeLayer(val[i].updatetime); |
| | | } |
| | | } |
| | | this.dbTableData = data1.result; |
| | |
| | | //自动匹配取消 |
| | | setInsrtWareTableClose() { |
| | | this.dialogWarehousing = false; |
| | | this.activeName = ''; |
| | | this.activeName2 = ''; |
| | | this.activeName3 = ''; |
| | | this.activeName = ""; |
| | | this.activeName2 = ""; |
| | | this.activeName3 = ""; |
| | | this.tableWareThree = []; |
| | | this.tableWareTwo = []; |
| | | this.tableWareOne = []; |
| | |
| | | } |
| | | |
| | | this.loading = true; |
| | | const res = await dataUpload_insertFiles(JSON.stringify(this.insertWareList)); |
| | | this.loading = false |
| | | const res = await dataUpload_insertFiles( |
| | | JSON.stringify(this.insertWareList) |
| | | ); |
| | | this.loading = false; |
| | | if (res.code != 200) { |
| | | this.$message.error('数据入库失败'); |
| | | this.$message.error("数据入库失败"); |
| | | return; |
| | | } |
| | | this.$message({ |
| | | message: '数据入库成功', |
| | | type: 'success' |
| | | message: "数据入库成功", |
| | | type: "success", |
| | | }); |
| | | this.setInsrtWareTableClose(); |
| | | }, |
| | |
| | | var val2 = this.tableWareTwo; |
| | | var std = []; |
| | | for (var i = 0; i < val1.length; i++) { |
| | | const stdTab = this.setSplitWare(val1[i].tab) |
| | | const stdTab = this.setSplitWare(val1[i].tab); |
| | | for (var j = 0; j < val2.length; j++) { |
| | | if (val2[j].tab == stdTab) { |
| | | std.push(val1[i].tab) |
| | | std.push(val1[i].tab); |
| | | val1[i].entity = val2[j].entity; |
| | | val1[i].tabDesc = val2[j].tabDesc; |
| | | val1[i].tabs = val2[j].tab; |
| | |
| | | } |
| | | } |
| | | } |
| | | std.forEach(item => { |
| | | this.tableWareOne = this.tableWareOne.filter(items => items.tab !== item); |
| | | std.forEach((item) => { |
| | | this.tableWareOne = this.tableWareOne.filter( |
| | | (items) => items.tab !== item |
| | | ); |
| | | }); |
| | | }, |
| | | setSplitWare(res) { |
| | |
| | | if (this.tableWareOne.indexOf(value1) != -1) { |
| | | } else { |
| | | this.tableWareOne.push(value1); |
| | | this.tableWareThree.splice(res, 1) |
| | | this.activeName = ''; |
| | | this.activeName2 = ''; |
| | | this.activeName3 = ''; |
| | | this.tableWareThree.splice(res, 1); |
| | | this.activeName = ""; |
| | | this.activeName2 = ""; |
| | | this.activeName3 = ""; |
| | | } |
| | | }, |
| | | //数据匹配向右 |
| | | setWareTableChangeRight() { |
| | | this.wareSelectOne.entity = this.wareSelectTwo.entity; |
| | | this.wareSelectOne.tabDesc = this.wareSelectTwo.tabDesc; |
| | | this.wareSelectOne.tabs = this.wareSelectTwo.ns + "." + this.wareSelectTwo.tab; |
| | | this.wareSelectOne.tabs = |
| | | this.wareSelectTwo.ns + "." + this.wareSelectTwo.tab; |
| | | if (this.tableWareThree.indexOf(this.wareSelectOne) != -1) { |
| | | |
| | | } else { |
| | | this.tableWareThree.push(this.wareSelectOne) |
| | | this.tableWareThree.push(this.wareSelectOne); |
| | | this.tableWareOne.forEach((value, index, array) => { |
| | | if (value.tab == this.wareSelectOne.tab) { |
| | | this.tableWareOne.splice(index, 1) |
| | | this.tableWareOne.splice(index, 1); |
| | | } |
| | | }) |
| | | this.activeName = ''; |
| | | this.activeName2 = ''; |
| | | this.activeName3 = ''; |
| | | }); |
| | | this.activeName = ""; |
| | | this.activeName2 = ""; |
| | | this.activeName3 = ""; |
| | | } |
| | | }, |
| | | //查询所有的表 |
| | | async getDataLoaderSelectTabs() { |
| | | const res = await dataUpload_selectTabs(); |
| | | if (res.code != 200) { |
| | | this.$message.error('数据请求失败'); |
| | | this.$message.error("数据请求失败"); |
| | | return; |
| | | } |
| | | this.tableWareTwo = res.result; |
| | |
| | | //数据匹配左侧点击事件 |
| | | singleElection(row) { |
| | | this.wareSelectOne = row; |
| | | this.activeName = row.eventid |
| | | this.activeName = row.eventid; |
| | | }, |
| | | //数据匹配左侧中间点击事件 |
| | | singleElection2(row) { |
| | | this.wareSelectTwo = row; |
| | | this.activeName2 = row.entity |
| | | this.activeName2 = row.entity; |
| | | }, |
| | | //数据匹配左侧右侧点击事件 |
| | | singleElection3(res) { |
| | |
| | | }, |
| | | //开启数据匹配 |
| | | showWareHousing() { |
| | | this.getDataLoaderSelectTabs() |
| | | this.getDataLoaderSelectTabs(); |
| | | this.dialogWarehousing = true; |
| | | |
| | | }, |
| | | //数据入库 |
| | | async setFileWare() { |
| | | if (this.pathBak != null) {//是否有质检方案 |
| | | if (this.formInline.uploadType == 'v1') {//单文件上传 |
| | | if (this.pathBak != null) { |
| | | //是否有质检方案 |
| | | if (this.formInline.uploadType == "v1") { |
| | | //单文件上传 |
| | | var std = []; |
| | | for (var i in this.tableData) { |
| | | if (this.tableData[i].name.indexOf('.zip') != -1) { |
| | | if (this.tableData[i].name.indexOf(".zip") != -1) { |
| | | if (this.tableData[i].code != null) { |
| | | std.push(this.tableData[i].name); |
| | | } |
| | | } |
| | | } |
| | | if (std.length != 0) { |
| | | return this.$message.error(std.toString() + ",未质检或质检失败,不能入库"); |
| | | return this.$message.error( |
| | | std.toString() + ",未质检或质检失败,不能入库" |
| | | ); |
| | | } |
| | | } else if (this.formInline.uploadType == 'v2') {//整体项目上传 |
| | | } else if (this.formInline.uploadType == "v2") { |
| | | //整体项目上传 |
| | | |
| | | if (this.tableData.length != 2) { |
| | | return this.$message.error("请保留一个zip数据,一个WBS数据进行入库"); |
| | |
| | | } |
| | | } |
| | | if (std.length != 0) { |
| | | return this.$message.error(std.toString() + ",未质检或质检失败,不能入库"); |
| | | return this.$message.error( |
| | | std.toString() + ",未质检或质检失败,不能入库" |
| | | ); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | var obj = { |
| | | dirid: this.formInline.dirid, |
| | | epsgCode: this.formInline.coordinateId, |
| | | path: this.formInline.path, |
| | | verid: this.formInline.verid, |
| | | } |
| | | }; |
| | | //查询映射 |
| | | const data = await dataUpload_selectMappers(obj) |
| | | const data = await dataUpload_selectMappers(obj); |
| | | if (data.code != 200) { |
| | | return this.$message.error("数据映射失败"); |
| | | } |
| | |
| | | this.insertWareList = data.result; |
| | | for (var i in result) { |
| | | if (result[i].type == "shp" || result[i].type == "gdb") { |
| | | std.push(result[i]) |
| | | std.push(result[i]); |
| | | } |
| | | } |
| | | if (std.length != 0) { |
| | | this.tableWareOne = std; |
| | | this.showWareHousing() |
| | | this.showWareHousing(); |
| | | } else { |
| | | this.setInsrtWareTable(); |
| | | } |
| | | |
| | | }, |
| | | //下载日志 |
| | | handerLogClick(res) { |
| | | |
| | | for (var i in res.code) { |
| | | var url = BASE_URL + '/dataUpload/downloadResult?token=' + getToken() + "&id=" + res.code[i]; |
| | | var url = |
| | | BASE_URL + |
| | | "/dataUpload/downloadResult?token=" + |
| | | getToken() + |
| | | "&id=" + |
| | | res.code[i]; |
| | | $("#downFrame").attr("src", url).click(); |
| | | } |
| | | |
| | | }, |
| | | //整体文件质检提交 |
| | | commonTestQuay() { |
| | | this.testQuayVisible = false; |
| | | if (this.formCheckAll.diZaiType != "NO") { |
| | | this.formCheckAll.isDiZai = "YES" |
| | | this.formCheckAll.isDiZai = "YES"; |
| | | } |
| | | this.loading = true; |
| | | this.getStartTestQuayTaskStatus(); |
| | | }, |
| | | //整体文件多条数据质检 |
| | | async getStartTestQuayTaskStatus() { |
| | | if (this.multipleSelection == 0 || this.taskStatus == this.multipleSelection.length) { |
| | | if ( |
| | | this.multipleSelection == 0 || |
| | | this.taskStatus == this.multipleSelection.length |
| | | ) { |
| | | this.loading = false; |
| | | return; |
| | | } |
| | |
| | | var name = this.multipleSelection[i].name; |
| | | var path = this.multipleSelection[i].path; |
| | | if (name.indexOf(".zip") != -1) { |
| | | this.formCheckAll.zipPath = path |
| | | this.formCheckAll.zipPath = path; |
| | | } else if (name.indexOf(".xls") != -1) { |
| | | this.formCheckAll.wbsPath = path |
| | | this.formCheckAll.wbsPath = path; |
| | | } else if (name.indexOf(".xlsx") != -1) { |
| | | this.formCheckAll.wbsPath = path |
| | | this.formCheckAll.wbsPath = path; |
| | | } |
| | | } |
| | | const data = await dataUpload_uploadChecks(this.formCheckAll); |
| | | if (data.code != 200) { |
| | | this.$message.error('数据质检提交失败'); |
| | | this.$message.error("数据质检提交失败"); |
| | | this.taskStatus++; |
| | | this.getStartTestQuayTaskStatus(); |
| | | return; |
| | |
| | | var reset = data.result; |
| | | this.progress = 0; |
| | | this.setIntel = setInterval(() => { |
| | | this.sendTaskStatus(reset) |
| | | }, 5000) |
| | | |
| | | this.sendTaskStatus(reset); |
| | | }, 5000); |
| | | }, |
| | | |
| | | //单文件数据质检提交 |
| | |
| | | }, |
| | | //单文件多条数据质检 |
| | | async getStartTaskStatus() { |
| | | if (this.multipleSelection == 0 || this.taskStatus == this.multipleSelection.length) { |
| | | if ( |
| | | this.multipleSelection == 0 || |
| | | this.taskStatus == this.multipleSelection.length |
| | | ) { |
| | | this.loading = false; |
| | | return; |
| | | } |
| | |
| | | this.getStartTaskStatus(); |
| | | } else { |
| | | this.quayTestForms.names = this.pathBak; |
| | | var value = this.$refs['selectcascader'].getCheckedNodes(); |
| | | var value = this.$refs["selectcascader"].getCheckedNodes(); |
| | | var bak = value[0].data.fullName.split("\\"); |
| | | this.quayTestForms.xmmc = bak[this.taskStatus]; |
| | | this.quayTestForms.sjzy = this.formInline.specialtyId; |
| | | this.quayTestForms.zipPath = this.multipleSelection[this.taskStatus].path; |
| | | this.quayTestForms.zipPath = |
| | | this.multipleSelection[this.taskStatus].path; |
| | | const data = await dataUpload_uploadChecks(this.quayTestForms); |
| | | if (data.code != 200) { |
| | | this.$message.error('数据质检提交失败'); |
| | | this.$message.error("数据质检提交失败"); |
| | | this.taskStatus++; |
| | | this.getStartTaskStatus(); |
| | | return; |
| | |
| | | var reset = data.result; |
| | | this.progress = 0; |
| | | this.setIntel = setInterval(() => { |
| | | this.getselectTaskStatus(reset) |
| | | }, 5000) |
| | | this.getselectTaskStatus(reset); |
| | | }, 5000); |
| | | } |
| | | |
| | | }, |
| | | async getselectTaskStatus(res) { |
| | | var std = 0; |
| | | for (var i = 0; i < res.length; i++) { |
| | | const data = await dataUpload_selectTaskStatus({ id: res[i] }) |
| | | const data = await dataUpload_selectTaskStatus({ id: res[i] }); |
| | | |
| | | std += data.progress |
| | | std += data.progress; |
| | | |
| | | if (data.status == 5) { |
| | | |
| | | } else { |
| | | if (data.status == 1 && data.resultFile == null) {//质检成功 |
| | | if (data.status == 1 && data.resultFile == null) { |
| | | //质检成功 |
| | | for (var i in this.tableData) { |
| | | if (this.tableData[i].path == this.multipleSelection[this.taskStatus].path) { |
| | | if ( |
| | | this.tableData[i].path == |
| | | this.multipleSelection[this.taskStatus].path |
| | | ) { |
| | | this.tableData[i].status = "质检成功"; |
| | | } |
| | | } |
| | | if (this.progress == 1) { |
| | | clearInterval(this.setIntel) |
| | | clearInterval(this.setIntel); |
| | | this.setIntel = null; |
| | | this.taskStatus++; |
| | | this.getStartTaskStatus() |
| | | this.getStartTaskStatus(); |
| | | } |
| | | } else {//任务失败 |
| | | } else { |
| | | //任务失败 |
| | | for (var i in this.tableData) { |
| | | if (this.tableData[i].path == this.multipleSelection[this.taskStatus].path) { |
| | | if ( |
| | | this.tableData[i].path == |
| | | this.multipleSelection[this.taskStatus].path |
| | | ) { |
| | | this.tableData[i].status = "质检失败"; |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | clearInterval(this.setIntel) |
| | | clearInterval(this.setIntel); |
| | | this.setIntel = null; |
| | | this.taskStatus++; |
| | | this.getStartTaskStatus() |
| | | this.getStartTaskStatus(); |
| | | } |
| | | } |
| | | } |
| | | this.progress = std / (res.length * 100); |
| | | for (var i in this.tableData) { |
| | | if (this.tableData[i].path == this.multipleSelection[this.taskStatus].path) { |
| | | if ( |
| | | this.tableData[i].path == this.multipleSelection[this.taskStatus].path |
| | | ) { |
| | | this.tableData[i].status = parseInt(this.progress * 100) + "%"; |
| | | } |
| | | } |
| | |
| | | async sendTaskStatus(res) { |
| | | var std = 0; |
| | | for (var i = 0; i < res.length; i++) { |
| | | const data = await dataUpload_selectTaskStatus({ id: res[i] }) |
| | | const data = await dataUpload_selectTaskStatus({ id: res[i] }); |
| | | std += data.progress; |
| | | |
| | | if (data.status == 5) { |
| | | } else { |
| | | if (data.status == 1 && data.resultFile == null) {//质检成功 |
| | | if (data.status == 1 && data.resultFile == null) { |
| | | //质检成功 |
| | | for (var i in this.tableData) { |
| | | for (var j in this.multipleSelection) { |
| | | if (this.tableData[i].path == this.multipleSelection[j].path) { |
| | |
| | | } |
| | | } |
| | | if (this.progress == 1) { |
| | | clearInterval(this.setIntel) |
| | | clearInterval(this.setIntel); |
| | | this.setIntel = null; |
| | | this.loading = false; |
| | | } |
| | | } else {//任务失败 |
| | | } else { |
| | | //任务失败 |
| | | for (var i in this.tableData) { |
| | | for (var j in this.multipleSelection) { |
| | | if (this.tableData[i].path == this.multipleSelection[j].path) { |
| | |
| | | } |
| | | } |
| | | |
| | | clearInterval(this.setIntel) |
| | | clearInterval(this.setIntel); |
| | | this.setIntel = null; |
| | | this.loading = false; |
| | | // this.taskStatus++; |
| | |
| | | // } |
| | | // clearInterval(this.setIntel) |
| | | // this.setIntel = null; |
| | | |
| | | |
| | | |
| | | }, |
| | | //删除上传的文件 |
| | | async setFileDelete() { |
| | | var data = JSON.stringify(this.multipleSelection); |
| | | const res = await dataUploadDeleteFiles(data); |
| | | if (res.code != 200) { |
| | | this.$message.error('删除失败'); |
| | | this.$message.error("删除失败"); |
| | | return; |
| | | } |
| | | this.getFileLength(); |
| | |
| | | async getFileLength() { |
| | | const res = await dataUploadSelectFiles(this.formInline.path); |
| | | if (res.code != 200) { |
| | | this.$message.error('文件上传数据获取失败'); |
| | | this.$message.error("文件上传数据获取失败"); |
| | | return; |
| | | } |
| | | if (res.result == null) { |
| | |
| | | res.result[i].status = "--"; |
| | | res.result[i].code = null; |
| | | } |
| | | this.tableData = res.result |
| | | this.tableData = res.result; |
| | | } |
| | | |
| | | }, |
| | | //上传文件 |
| | | setFileUpload() { |
| | |
| | | var formData = new FormData(); |
| | | var fs1 = document.getElementById("selectDataFile"); |
| | | if (fs1.files.length == 0) { |
| | | return this.$message.error('请选择需要上传的数据文件'); |
| | | return this.$message.error("请选择需要上传的数据文件"); |
| | | } |
| | | var fs2 = null; |
| | | if (this.formInline.uploadType == 'v1') {//单文件项目上传 |
| | | if (this.formInline.uploadType == "v1") { |
| | | //单文件项目上传 |
| | | fs2 = document.getElementById("metaDataFile"); |
| | | if (this.pathBak != null && this.pathBak.indexOf("checkMain") > -1) { |
| | | if (fs2.files.length == 0) { |
| | | return this.$message.error('请选择需要上传的元数据文件'); |
| | | return this.$message.error("请选择需要上传的元数据文件"); |
| | | } |
| | | } |
| | | } else if (this.formInline.uploadType == 'v2') {//整体项目上传 |
| | | } else if (this.formInline.uploadType == "v2") { |
| | | //整体项目上传 |
| | | fs2 = document.getElementById("wbsDataFile"); |
| | | if (fs2.files.length == 0) { |
| | | return this.$message.error('请选择需要上传的WBS数据文件'); |
| | | return this.$message.error("请选择需要上传的WBS数据文件"); |
| | | } |
| | | } |
| | | for (var i = 0, c = fs1.files.length; i < c; i++) { |
| | | formData.append(fs1.files[i].name, fs1.files[i]); |
| | | this.fileType.push({ name: fs1.files[i].name, type: "selectData" }) |
| | | this.fileType.push({ name: fs1.files[i].name, type: "selectData" }); |
| | | } |
| | | if (fs2 != null) { |
| | | for (var i = 0, c = fs2.files.length; i < c; i++) { |
| | | formData.append(fs2.files[i].name, fs2.files[i]); |
| | | if (this.formInline.uploadType == 'v1') { |
| | | this.fileType.push({ name: fs2.files[i].name, type: "metaData" }) |
| | | } else if (this.formInline.uploadType == 'v2') { |
| | | this.fileType.push({ name: fs2.files[i].name, type: "wbsData" }) |
| | | if (this.formInline.uploadType == "v1") { |
| | | this.fileType.push({ name: fs2.files[i].name, type: "metaData" }); |
| | | } else if (this.formInline.uploadType == "v2") { |
| | | this.fileType.push({ name: fs2.files[i].name, type: "wbsData" }); |
| | | } |
| | | } |
| | | } |
| | | const that = this |
| | | that.jindudialogVisible = true |
| | | let listval = [] |
| | | const that = this; |
| | | that.jindudialogVisible = true; |
| | | let listval = []; |
| | | formData.forEach((key, val) => { |
| | | listval.push({ |
| | | name: val |
| | | }) |
| | | }) |
| | | that.$set(this, 'jindutiaoname', listval) |
| | | that.$set(this, 'jindutiao', 0) |
| | | this.loading = true; |
| | | $.ajax(BASE_URL + "/dataUpload/uploadFiles?token=" + token + "&path=" + this.formInline.path, { |
| | | type: "post", |
| | | data: formData, |
| | | async: true, |
| | | cache: false, |
| | | processData: false, |
| | | contentType: false, |
| | | success: (rs) => { |
| | | this.loading = false; |
| | | if (rs.code != 200) { |
| | | return this.$message.error('数据上传失败'); |
| | | } |
| | | this.getFileLength(); |
| | | this.$set(this, 'jindutiao', 100) |
| | | this.$message({ |
| | | message: '上传成功', |
| | | type: 'success' |
| | | }); |
| | | this.clearFileSelect(); |
| | | }, |
| | | error: (rs) => { |
| | | this.loading = false; |
| | | this.$message.error('数据上传失败'); |
| | | }, |
| | | xhr: function () { |
| | | var myXhr = $.ajaxSettings.xhr(); |
| | | |
| | | if (myXhr.upload) { //检查upload属性是否存在 |
| | | myXhr.upload.addEventListener('progress', that.progressHandlingFunction, false); //绑定progress事件的回调函数 |
| | | } |
| | | return myXhr; //xhr对象返回给jQuery使用 |
| | | } |
| | | name: val, |
| | | }); |
| | | }); |
| | | that.$set(this, "jindutiaoname", listval); |
| | | that.$set(this, "jindutiao", 0); |
| | | this.loading = true; |
| | | $.ajax( |
| | | BASE_URL + |
| | | "/dataUpload/uploadFiles?token=" + |
| | | token + |
| | | "&path=" + |
| | | this.formInline.path, |
| | | { |
| | | type: "post", |
| | | data: formData, |
| | | async: true, |
| | | cache: false, |
| | | processData: false, |
| | | contentType: false, |
| | | success: (rs) => { |
| | | this.loading = false; |
| | | if (rs.code != 200) { |
| | | return this.$message.error("数据上传失败"); |
| | | } |
| | | this.getFileLength(); |
| | | this.$set(this, "jindutiao", 100); |
| | | this.$message({ |
| | | message: "上传成功", |
| | | type: "success", |
| | | }); |
| | | this.clearFileSelect(); |
| | | }, |
| | | error: (rs) => { |
| | | this.loading = false; |
| | | this.$message.error("数据上传失败"); |
| | | }, |
| | | xhr: function () { |
| | | var myXhr = $.ajaxSettings.xhr(); |
| | | |
| | | if (myXhr.upload) { |
| | | //检查upload属性是否存在 |
| | | myXhr.upload.addEventListener( |
| | | "progress", |
| | | that.progressHandlingFunction, |
| | | false |
| | | ); //绑定progress事件的回调函数 |
| | | } |
| | | return myXhr; //xhr对象返回给jQuery使用 |
| | | }, |
| | | } |
| | | ); |
| | | }, |
| | | progressHandlingFunction(event) { |
| | | var loaded = event.loaded;//已上传 |
| | | var loaded = event.loaded; //已上传 |
| | | var loaded = Math.floor(100 * (event.loaded / event.total) - 1); //计算已经上传的百分比 |
| | | $("#prog").html(loaded + "%"); //应用到显示UI,可根据自己需要修改 |
| | | this.jindutiao = loaded |
| | | this.$set(this, 'jindutiao', loaded) |
| | | this.jindutiao = loaded; |
| | | this.$set(this, "jindutiao", loaded); |
| | | }, |
| | | format(percentage) { |
| | | return percentage === 100 ? '上传完毕' : `${percentage}%`; |
| | | return percentage === 100 ? "上传完毕" : `${percentage}%`; |
| | | }, |
| | | //获取文件上传路径 |
| | | async getFilePath() { |
| | | const res = await dataUploadSelectPath(); |
| | | if (res.code != 200) { |
| | | this.$message.error('文件上传路径获取失败'); |
| | | this.$message.error("文件上传路径获取失败"); |
| | | return; |
| | | } |
| | | this.formInline.path = res.result; |
| | | }, |
| | | //项目名称切换 |
| | | entryNameChange(res) { |
| | | var val = this.entryOption.filter(rs => { |
| | | var val = this.entryOption.filter((rs) => { |
| | | if (rs.name == res) { |
| | | return rs; |
| | | } |
| | | }); |
| | | this.pathBak = val[0].bak; |
| | | this.formInline.dirid = val[0].id |
| | | this.formInline.dirid = val[0].id; |
| | | this.getselectVerByDirid(); |
| | | }, |
| | | //获取项目名称 |
| | | async setProjectName() { |
| | | const data = await dataUpload_selectProject() |
| | | const data = await dataUpload_selectProject(); |
| | | if (data.code != 200) { |
| | | this.$message.error('项目列表获取失败'); |
| | | return |
| | | this.$message.error("项目列表获取失败"); |
| | | return; |
| | | } |
| | | this.entryOption = data.result; |
| | | this.formInline.entryId = this.entryOption[0].name; |
| | |
| | | }, |
| | | //获取所有坐标系 |
| | | async setCoordinateSystem() { |
| | | const data = await dataUpload_selectCoords() |
| | | const data = await dataUpload_selectCoords(); |
| | | if (data.code != 200) { |
| | | this.$message.error('坐标系列表获取失败'); |
| | | return |
| | | this.$message.error("坐标系列表获取失败"); |
| | | return; |
| | | } |
| | | this.coordinateOption = data.result; |
| | | this.formInline.coordinateId = this.coordinateOption[0].epsgcode; |
| | |
| | | }, |
| | | //重置WPS选择 |
| | | restWBSFile() { |
| | | this.formInline.wbsData = '请选择WBS数据'; |
| | | this.formInline.wbsData = "请选择WBS数据"; |
| | | document.getElementById("wbsDataFile").value = ""; |
| | | }, |
| | | //WBS数据Change事件 |
| | |
| | | var len = event.currentTarget.files.length; |
| | | for (var i = 0; i < len; i++) { |
| | | var f = event.currentTarget.files[i]; |
| | | std.push(f.name) |
| | | std.push(f.name); |
| | | } |
| | | this.formInline.wbsData = std.toString(); |
| | | }, |
| | | //数据质检弹窗关闭--项目整体 |
| | | handleTestQuayCloseDown() { |
| | | this.$confirm('确认关闭?') |
| | | .then(_ => { |
| | | this.closeTestQuayCloseDialog() |
| | | this.$confirm("确认关闭?") |
| | | .then((_) => { |
| | | this.closeTestQuayCloseDialog(); |
| | | }) |
| | | .catch(_ => { }); |
| | | .catch((_) => {}); |
| | | }, |
| | | closeTestQuayCloseDialog() { |
| | | this.testQuayVisible = false; |
| | | }, |
| | | //数据质检弹窗关闭--单文件 |
| | | handleQuayTestCloseDown() { |
| | | this.$confirm('确认关闭?') |
| | | .then(_ => { |
| | | this.closeQuayTestCloseDialog() |
| | | this.$confirm("确认关闭?") |
| | | .then((_) => { |
| | | this.closeQuayTestCloseDialog(); |
| | | }) |
| | | .catch(_ => { }); |
| | | .catch((_) => {}); |
| | | }, |
| | | closeQuayTestCloseDialog() { |
| | | this.quayTestVisible = false; |
| | |
| | | //数据质检点击事件 |
| | | handleQuayTestClick() { |
| | | if (this.pathBak == null) { |
| | | return this.$message('无质检方案'); |
| | | return this.$message("无质检方案"); |
| | | } |
| | | if (this.multipleSelection.length == 0) { |
| | | return this.$message('请选择需要质检的文件'); |
| | | return this.$message("请选择需要质检的文件"); |
| | | } |
| | | if (this.formInline.uploadType == "v1") { |
| | | var value = this.$refs['selectcascader'].getCheckedNodes(); |
| | | var value = this.$refs["selectcascader"].getCheckedNodes(); |
| | | var fileType = value[0].data.fullName; |
| | | this.quayTestForms.names = fileType; |
| | | this.quayTestForms.sjzy = this.formInline.specialtyId; |
| | | this.quayTestVisible = true; |
| | | |
| | | } else if (this.formInline.uploadType == "v2") { |
| | | var fileZip = []; |
| | | var fileExcel = []; |
| | | for (var i in this.multipleSelection) { |
| | | if (this.multipleSelection[i].name.indexOf('.zip') != -1) { |
| | | if (this.multipleSelection[i].name.indexOf(".zip") != -1) { |
| | | fileZip.push(this.multipleSelection[i].name); |
| | | } else if (this.multipleSelection[i].name.indexOf('.xls') != -1) { |
| | | } else if (this.multipleSelection[i].name.indexOf(".xls") != -1) { |
| | | fileExcel.push(this.multipleSelection[i].name); |
| | | } else if (this.multipleSelection[i].name.indexOf('.xlsx') != -1) { |
| | | } else if (this.multipleSelection[i].name.indexOf(".xlsx") != -1) { |
| | | fileExcel.push(this.multipleSelection[i].name); |
| | | } |
| | | } |
| | | |
| | | if (fileZip.length != 1) { |
| | | return this.$message('请选择一个整体项目文件'); |
| | | return this.$message("请选择一个整体项目文件"); |
| | | } |
| | | if (fileExcel.length != 1) { |
| | | return this.$message('请选择一个WBS文件'); |
| | | return this.$message("请选择一个WBS文件"); |
| | | } |
| | | this.formCheckAll.names = this.pathBak; |
| | | var val = this.entryOption.filter(res => { |
| | | var val = this.entryOption.filter((res) => { |
| | | if (res.id == this.formInline.dirid) { |
| | | return res; |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | this.formCheckAll.xmmc = val[0].name |
| | | this.formCheckAll.sjzy = this.formInline.specialtyId |
| | | this.formCheckAll.xmmc = val[0].name; |
| | | this.formCheckAll.sjzy = this.formInline.specialtyId; |
| | | if (this.formCheckAll.sjzy.indexOf("地灾") != -1) { |
| | | this.formCheckAll.isDiZai = true; |
| | | this.formCheckAll.diZaiType = this.disOptions[0].value |
| | | this.formCheckAll.diZaiType = this.disOptions[0].value; |
| | | } else { |
| | | this.formCheckAll.isDiZai = false; |
| | | this.formCheckAll.diZaiType = "NO" |
| | | this.formCheckAll.diZaiType = "NO"; |
| | | } |
| | | this.testQuayVisible = true; |
| | | } |
| | |
| | | std.push(this.multipleDelete[i].id); |
| | | } |
| | | |
| | | const res = await dataUpload_deleteMetas({ ids: std.toString() }) |
| | | const res = await dataUpload_deleteMetas({ ids: std.toString() }); |
| | | this.loading = false; |
| | | if (res.code != 200) { |
| | | this.$message.error('删除失败'); |
| | | this.$message.error("删除失败"); |
| | | } else { |
| | | this.$message({ |
| | | message: '删除成功', |
| | | type: 'success' |
| | | message: "删除成功", |
| | | type: "success", |
| | | }); |
| | | this.setStartWareTable(); |
| | | } |
| | |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | name: this.formWarehousing.name, |
| | | } |
| | | }; |
| | | this.getAllWareTable(); |
| | | }, |
| | | //上传数据列表重置 |
| | | setWarehouseReset() { |
| | | this.formWarehousing.name = ''; |
| | | this.formWarehousing.name = ""; |
| | | this.listData = { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | name: null, |
| | | } |
| | | }; |
| | | this.getAllWareTable(); |
| | | }, |
| | | //格式化时间 |
| | |
| | | var s = time.getSeconds(); |
| | | return ( |
| | | y + |
| | | '-' + |
| | | "-" + |
| | | this.add0(m) + |
| | | '-' + |
| | | "-" + |
| | | this.add0(d) + |
| | | ' ' + |
| | | " " + |
| | | h + |
| | | ':' + |
| | | ":" + |
| | | mm + |
| | | ':' + |
| | | ":" + |
| | | s |
| | | ); |
| | | }, |
| | | //格式化时间 |
| | | add0(m) { |
| | | return m < 10 ? '0' + m : m; |
| | | return m < 10 ? "0" + m : m; |
| | | }, |
| | | //大小值改变 |
| | | changeSizeFile(row, column, cellValue, index) { |
| | | if (cellValue >= 1024) { |
| | | return parseFloat(cellValue / 1204).toFixed(3) + "GB" |
| | | return parseFloat(cellValue / 1204).toFixed(3) + "GB"; |
| | | } else { |
| | | return cellValue + "MB" |
| | | return cellValue + "MB"; |
| | | } |
| | | }, |
| | | //上传数据列表清单选择 |
| | |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | name: null, |
| | | } |
| | | }; |
| | | this.getAllWareTable(); |
| | | }, |
| | | //获取数据上传列表清单 |
| | | async getAllWareTable() { |
| | | const res = await dataUpload_selectByPageForUpload(this.listData); |
| | | if (res.code != 200) { |
| | | this.$message.error('列表数据获取失败'); |
| | | this.$message.error("列表数据获取失败"); |
| | | return; |
| | | } |
| | | this.count = res.count; |
| | |
| | | this.listData.pageSize = val; |
| | | this.getAllWareTable(); |
| | | }, |
| | | |
| | | |
| | | //数据上传列表清单page切换 |
| | | handleCurrentChange(val) { |
| | |
| | | var len = event.currentTarget.files.length; |
| | | for (var i = 0; i < len; i++) { |
| | | var f = event.currentTarget.files[i]; |
| | | std.push(f.name) |
| | | std.push(f.name); |
| | | } |
| | | this.formInline.specialtyData = std.toString(); |
| | | }, |
| | |
| | | }, |
| | | //重置元数据 |
| | | restMetaFile() { |
| | | this.formInline.metaData = '请选择元数据'; |
| | | this.formInline.metaData = "请选择元数据"; |
| | | document.getElementById("metaDataFile").value = ""; |
| | | }, |
| | | //选择元数据文件切换 |
| | |
| | | var len = event.currentTarget.files.length; |
| | | for (var i = 0; i < len; i++) { |
| | | var f = event.currentTarget.files[i]; |
| | | std.push(f.name) |
| | | std.push(f.name); |
| | | } |
| | | this.formInline.metaData = std.toString(); |
| | | }, |
| | | |
| | | //From表单初始化 |
| | | setFromStart() { |
| | | this.formInline.verid = null |
| | | this.formInline.specialtyId = '测量专业' |
| | | this.formInline.specialtyData = '请选择数据' |
| | | this.formInline.metaData = '请选择元数据' |
| | | this.formInline.entryId = null |
| | | this.formInline.selectFileType = '*.*' |
| | | this.formInline.verid = null; |
| | | this.formInline.specialtyId = "测量专业"; |
| | | this.formInline.specialtyData = "请选择数据"; |
| | | this.formInline.metaData = "请选择元数据"; |
| | | this.formInline.entryId = null; |
| | | this.formInline.selectFileType = "*.*"; |
| | | this.formInline.coordinateId = this.coordinateOption[0].epsgcode; |
| | | }, |
| | | //选择数据 |
| | |
| | | }, |
| | | //重置数据 |
| | | restSelectFile() { |
| | | this.formInline.specialtyData = '请选择数据'; |
| | | this.formInline.specialtyData = "请选择数据"; |
| | | document.getElementById("selectDataFile").value = ""; |
| | | |
| | | }, |
| | | //入库类型切换 |
| | | uploadTypeChange(res) { |
| | | this.setFromStart(); |
| | | if (res == "v2") { |
| | | this.uploadFlag = false |
| | | this.formInline.selectFileType = '.zip' |
| | | this.formInline.entryId = this.entryOption[0].name |
| | | this.uploadFlag = false; |
| | | this.formInline.selectFileType = ".zip"; |
| | | this.formInline.entryId = this.entryOption[0].name; |
| | | this.formInline.dirid = this.entryOption[0].id; |
| | | this.getselectVerByDirid(); |
| | | this.pathBak = this.entryOption[0].bak; |
| | | } else { |
| | | this.getStartDirChecked(this.catalogOption); |
| | | this.getselectVerByDirid(); |
| | | this.uploadFlag = true |
| | | this.uploadFlag = true; |
| | | } |
| | | this.formInline.uploadType = res; |
| | | }, |
| | |
| | | async getselectVerByDirid() { |
| | | this.verOption = []; |
| | | this.formInline.verid = ""; |
| | | const res = await dataUploadSelectVerByDirid({ dirid: this.formInline.dirid }); |
| | | const res = await dataUploadSelectVerByDirid({ |
| | | dirid: this.formInline.dirid, |
| | | }); |
| | | if (res.code != 200) { |
| | | this.$message.error('版本列表获取失败'); |
| | | this.$message.error("版本列表获取失败"); |
| | | return; |
| | | } |
| | | this.verOption = res.result; |
| | |
| | | async getSelectdirTab() { |
| | | const res = await selectdirTab(); |
| | | if (res.code != 200) { |
| | | this.$message.error('目录列表获取失败'); |
| | | this.$message.error("目录列表获取失败"); |
| | | return; |
| | | } |
| | | this.catalogOption = this.treeData(res.result); |
| | | this.formInline.dirName = this.catalogOption[0].name |
| | | this.formInline.dirName = this.catalogOption[0].name; |
| | | this.getStartDirChecked(this.catalogOption); |
| | | this.getselectVerByDirid() |
| | | this.getselectVerByDirid(); |
| | | }, |
| | | |
| | | getStartDirChecked(res) { |
| | | if (res.length != 0) { |
| | | if (res[0].children == null || res[0].children == undefined) { |
| | | this.formInline.dirid = res[0].id |
| | | this.formInline.dirid = res[0].id; |
| | | } else { |
| | | this.getStartDirChecked(res[0].children) |
| | | this.getStartDirChecked(res[0].children); |
| | | } |
| | | } |
| | | }, |
| | | //单文件质检弹窗初始化 |
| | | startQuayTestForms() { |
| | | this.quayTestForms = { |
| | | tolerance: '0.001', |
| | | gcdOffset: '20', |
| | | rangeOffset: '200', |
| | | kzdOffset: '100', |
| | | xgMax: '0.005', |
| | | coordinateSystem: 'CGCS2000/degree', |
| | | imgResolution: '0.2', |
| | | demTolerance: '5', |
| | | demChangeRate: '200', |
| | | lazDensity: '1', |
| | | imgResolution: '0.2', |
| | | }, |
| | | this.quayTestShow = { |
| | | (this.quayTestForms = { |
| | | tolerance: "0.001", |
| | | gcdOffset: "20", |
| | | rangeOffset: "200", |
| | | kzdOffset: "100", |
| | | xgMax: "0.005", |
| | | coordinateSystem: "CGCS2000/degree", |
| | | imgResolution: "0.2", |
| | | demTolerance: "5", |
| | | demChangeRate: "200", |
| | | lazDensity: "1", |
| | | imgResolution: "0.2", |
| | | }), |
| | | (this.quayTestShow = { |
| | | checkOsgb: false, |
| | | checkXls: false, |
| | | checkLaz: false, |
| | |
| | | checkMath: false, |
| | | checkMeta: false, |
| | | checkMain: false, |
| | | } |
| | | }); |
| | | }, |
| | | //目录切换 |
| | | catalogChange(data, node, nodeData) { |
| | |
| | | } |
| | | var fileType = node.data.code; |
| | | if (fileType == null) { |
| | | fileType = "*.*" |
| | | fileType = "*.*"; |
| | | } |
| | | this.formInline.selectFileType = fileType; |
| | | this.formInline.dirid = node.data.id; |
| | | this.formInline.dirName = node.data.name |
| | | this.formInline.dirName = node.data.name; |
| | | this.getselectVerByDirid(); |
| | | }, |
| | | //Tabsq切换 |
| | |
| | | if (tab.name == "second") { |
| | | this.setStartWareTable(); |
| | | } |
| | | this.calHeight(); |
| | | }, |
| | | //树列表生成 |
| | | treeData(source) { |
| | |
| | | return cloneData.filter((father) => { |
| | | // 循环所有项 |
| | | let branchArr = cloneData.filter((child) => father.id == child.pid); // 对比ID,分别上下级菜单,并返回数据 |
| | | branchArr.length > 0 ? (father.children = branchArr) : ''; // 给父级添加一个children属性,并赋值 |
| | | branchArr.length > 0 ? (father.children = branchArr) : ""; // 给父级添加一个children属性,并赋值 |
| | | return father.pid == 0; // 返回一级菜单 |
| | | }); |
| | | }, |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="less" scoped> |
| | |
| | | } |
| | | } |
| | | } |
| | | .inquire { |
| | | padding: 8px; |
| | | margin-top: 20px; |
| | | |
| | | border-radius: 5px; |
| | | |
| | | margin-bottom: 20px; |
| | | .el-form-item { |
| | | margin: 5px; |
| | | } |
| | | } |
| | | .el-tabs { |
| | | height: calc(100% - 70px); |
| | | } |
| | | /deep/ .el-tabs__content { |
| | | height: calc(100% - 49px); |
| | | } |
| | | /deep/ .el-tab-pane { |
| | | height: 100%; |
| | | } |
| | | .text-center { |
| | | text-align: center; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="dictionaryBox"> |
| | | <My-bread :list="[ |
| | | <My-bread |
| | | :list="[ |
| | | `${$t('dataManage.dataManage')}`, |
| | | `${$t('dataManage.dictionaryManage')}`, |
| | | ]"></My-bread> |
| | | ]" |
| | | ></My-bread> |
| | | <el-divider /> |
| | | <div class="mainBox"> |
| | | <div class="dictionaryContent"> |
| | | |
| | | <div class="dictionary_leftTree subpage_Div"> |
| | | <ul> |
| | | <li |
| | | @click="getTableDesc(item)" |
| | | v-for="item in optionCount" |
| | | :class="{ active: activeName == item.tab }" |
| | | > |
| | | {{ item.tabDesc }} |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | <ul> |
| | | <li |
| | | @click="getTableDesc(item)" |
| | | v-for="(item, i) in optionCount" |
| | | :class="{ active: activeName == item.tab }" |
| | | :key="i" |
| | | > |
| | | {{ item.tabDesc }} |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | |
| | | <div class="right subpage_Div"> |
| | | <div class="inquire"> |
| | | <el-form |
| | | :inline="true" |
| | | :model="formInline" |
| | | class="demo-form-inline" |
| | | > |
| | | <el-form-item :label="$t('dataManage.dictionaryManageObj.tableName')"> |
| | | <el-input |
| | | v-model="formInline.tab" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | style="width:200px" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="float:right"> |
| | | <el-button |
| | | v-if="btnStatus.insert" |
| | | icon="el-icon-edit" |
| | | size="small" |
| | | @click="InsertFormdialog = true" |
| | | type="success" |
| | | >{{ $t('common.append') }}</el-button> |
| | | <el-button |
| | | v-if="btnStatus.delete" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | @click="DelFormData" |
| | | type="danger" |
| | | >{{ |
| | | $t('common.delete') |
| | | }}</el-button> |
| | | <el-button |
| | | icon="el-icon-search" |
| | | size="small" |
| | | @click="getSelectDictTab" |
| | | class="primary" |
| | | >{{ $t('common.iquery') }}</el-button> |
| | | <el-button |
| | | icon="el-icon-refresh" |
| | | size="small" |
| | | @click="getRemoveForm" |
| | | type="info" |
| | | >{{ $t('common.reset') }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form :inline="true" :model="formInline" class="demo-form-inline"> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.tableName')" |
| | | > |
| | | <el-input |
| | | v-model="formInline.tab" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | style="width: 200px" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="float: right"> |
| | | <el-button |
| | | v-if="btnStatus.insert" |
| | | icon="el-icon-edit" |
| | | size="small" |
| | | @click="InsertFormdialog = true" |
| | | type="success" |
| | | >{{ $t("common.append") }}</el-button |
| | | > |
| | | <el-button |
| | | v-if="btnStatus.delete" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | @click="DelFormData" |
| | | type="danger" |
| | | >{{ $t("common.delete") }}</el-button |
| | | > |
| | | <el-button |
| | | icon="el-icon-search" |
| | | size="small" |
| | | @click="getSelectDictTab" |
| | | class="primary" |
| | | >{{ $t("common.iquery") }}</el-button |
| | | > |
| | | <el-button |
| | | icon="el-icon-refresh" |
| | | size="small" |
| | | @click="getRemoveForm" |
| | | type="info" |
| | | >{{ $t("common.reset") }}</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table_box"> |
| | | <div class="table_box" style="height:calc(100% - 89px)"> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange" |
| | | height="100%" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | /> |
| | | <el-table-column |
| | | prop="orderNum" |
| | | :label="$t('dataManage.dictionaryManageObj.number')" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="field" |
| | | :label="$t('dataManage.dictionaryManageObj.fieldName')" |
| | | /> |
| | | <el-table-column |
| | | min-width="90" |
| | | prop="alias" |
| | | :label="$t('dataManage.dictionaryManageObj.fieldAliasName')" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="type" |
| | | :label="$t('dataManage.dictionaryManageObj.fieldType')" |
| | | /> |
| | | <el-table-column |
| | | min-width="60" |
| | | prop="len" |
| | | :label="$t('dataManage.dictionaryManageObj.fieldLength')" |
| | | /> |
| | | <el-table-column |
| | | min-width="60" |
| | | prop="precision" |
| | | :label="$t('dataManage.dictionaryManageObj.FieldPrecision')" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="tab" |
| | | :label="$t('dataManage.dictionaryManageObj.rangeAssociationTable')" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="bak" |
| | | :label="$t('dataManage.dictionaryManageObj.remark')" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="createTime" |
| | | :label="$t('dataManage.dictionaryManageObj.creationTime')" |
| | | :formatter="formatData" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="createUser" |
| | | :label="$t('dataManage.dictionaryManageObj.createPersonnel')" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="updateTime" |
| | | :label="$t('dataManage.dictionaryManageObj.updateTime')" |
| | | :formatter="formatData" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="updateUser" |
| | | :label="$t('dataManage.dictionaryManageObj.updatePersonnel')" |
| | | /> |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange" |
| | | height="calc(100% - 57px)" |
| | | > |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column |
| | | prop="orderNum" |
| | | :label="$t('dataManage.dictionaryManageObj.number')" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="field" |
| | | :label="$t('dataManage.dictionaryManageObj.fieldName')" |
| | | /> |
| | | <el-table-column |
| | | min-width="90" |
| | | prop="alias" |
| | | :label="$t('dataManage.dictionaryManageObj.fieldAliasName')" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="type" |
| | | :label="$t('dataManage.dictionaryManageObj.fieldType')" |
| | | /> |
| | | <el-table-column |
| | | min-width="60" |
| | | prop="len" |
| | | :label="$t('dataManage.dictionaryManageObj.fieldLength')" |
| | | /> |
| | | <el-table-column |
| | | min-width="60" |
| | | prop="precision" |
| | | :label="$t('dataManage.dictionaryManageObj.FieldPrecision')" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="tab" |
| | | :label=" |
| | | $t('dataManage.dictionaryManageObj.rangeAssociationTable') |
| | | " |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="bak" |
| | | :label="$t('dataManage.dictionaryManageObj.remark')" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="createTime" |
| | | :label="$t('dataManage.dictionaryManageObj.creationTime')" |
| | | :formatter="formatData" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="createUser" |
| | | :label="$t('dataManage.dictionaryManageObj.createPersonnel')" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="updateTime" |
| | | :label="$t('dataManage.dictionaryManageObj.updateTime')" |
| | | :formatter="formatData" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | prop="updateUser" |
| | | :label="$t('dataManage.dictionaryManageObj.updatePersonnel')" |
| | | /> |
| | | |
| | | <el-table-column |
| | | min-width="100" |
| | | :label="$t('dataManage.dictionaryManageObj.operation')" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-link |
| | | v-if="btnStatus.select" |
| | | @click="showDetail(scope.$index, scope.row)" |
| | | >{{ $t('dataManage.dictionaryManageObj.lookOver') }}</el-link> |
| | | <el-link |
| | | v-if="btnStatus.update" |
| | | @click="handleEdit(scope.$index, scope.row)" |
| | | style="margin-left: 10px; " |
| | | >{{ $t('dataManage.dictionaryManageObj.revamp') }}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div |
| | | class="pagination_box" |
| | | style="margin-top: 20px" |
| | | > |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="listData.pageIndex" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :page-size="listData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="count" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | <el-table-column |
| | | min-width="100" |
| | | :label="$t('dataManage.dictionaryManageObj.operation')" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-link |
| | | v-if="btnStatus.select" |
| | | @click="showDetail(scope.$index, scope.row)" |
| | | >{{ $t("dataManage.dictionaryManageObj.lookOver") }}</el-link |
| | | > |
| | | <el-link |
| | | v-if="btnStatus.update" |
| | | @click="handleEdit(scope.$index, scope.row)" |
| | | style="margin-left: 10px" |
| | | >{{ $t("dataManage.dictionaryManageObj.revamp") }}</el-link |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="pagination_box"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="listData.pageIndex" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :page-size="listData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="count" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div |
| | | class="infoBox box_div " |
| | | v-show="showinfoBox" |
| | | > |
| | | |
| | | <div |
| | | slot="header" |
| | | class="clearfix" |
| | | > |
| | | <span>{{ $t('dataManage.dictionaryManageObj.particulars') }}</span> |
| | | <div |
| | | style="float: right; cursor: pointer" |
| | | @click="closeDetial" |
| | | > |
| | | <div class="infoBox box_div" v-show="showinfoBox"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>{{ $t("dataManage.dictionaryManageObj.particulars") }}</span> |
| | | <div style="float: right; cursor: pointer" @click="closeDetial"> |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | </div> |
| | | <el-divider></el-divider> |
| | | <div class="contentBox"> |
| | | <p> |
| | | {{ $t('dataManage.dictionaryManageObj.tableName') }}:{{ |
| | | itemdetail.tab |
| | | }} |
| | | {{ $t("dataManage.dictionaryManageObj.tableName") }}:{{ |
| | | itemdetail.tab |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.dictionaryManageObj.tableAliasName') }}:{{ |
| | | itemdetail.tabDesc |
| | | }} |
| | | {{ $t("dataManage.dictionaryManageObj.tableAliasName") }}:{{ |
| | | itemdetail.tabDesc |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | |
| | | <p> |
| | | {{ $t('dataManage.dictionaryManageObj.fieldName') }}:{{ |
| | | itemdetail.field |
| | | }} |
| | | {{ $t("dataManage.dictionaryManageObj.fieldName") }}:{{ |
| | | itemdetail.field |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.dictionaryManageObj.fieldAliasName') }}:{{ |
| | | itemdetail.alias |
| | | }} |
| | | {{ $t("dataManage.dictionaryManageObj.fieldAliasName") }}:{{ |
| | | itemdetail.alias |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.dictionaryManageObj.fieldType') }}:{{ |
| | | itemdetail.type |
| | | }} |
| | | {{ $t("dataManage.dictionaryManageObj.fieldType") }}:{{ |
| | | itemdetail.type |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.dictionaryManageObj.fieldLength') }}:{{ |
| | | itemdetail.len |
| | | }} |
| | | {{ $t("dataManage.dictionaryManageObj.fieldLength") }}:{{ |
| | | itemdetail.len |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.dictionaryManageObj.FieldPrecision') }}:{{ |
| | | itemdetail.precision |
| | | }} |
| | | {{ $t("dataManage.dictionaryManageObj.FieldPrecision") }}:{{ |
| | | itemdetail.precision |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | |
| | | <p> |
| | | {{ $t('dataManage.dictionaryManageObj.remark') }}:{{ |
| | | itemdetail.bak |
| | | }} |
| | | {{ $t("dataManage.dictionaryManageObj.remark") }}:{{ |
| | | itemdetail.bak |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.dictionaryManageObj.creationTime') }}:{{ |
| | | itemdetail.createTime |
| | | }} |
| | | {{ $t("dataManage.dictionaryManageObj.creationTime") }}:{{ |
| | | itemdetail.createTime |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.dictionaryManageObj.createPersonnel') }}:{{ |
| | | itemdetail.createUser |
| | | }} |
| | | {{ $t("dataManage.dictionaryManageObj.createPersonnel") }}:{{ |
| | | itemdetail.createUser |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.dictionaryManageObj.updateTime') }}:{{ |
| | | itemdetail.updateTime |
| | | }} |
| | | {{ $t("dataManage.dictionaryManageObj.updateTime") }}:{{ |
| | | itemdetail.updateTime |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.dictionaryManageObj.updatePersonnel') }}:{{ |
| | | itemdetail.updateUser |
| | | }} |
| | | {{ $t("dataManage.dictionaryManageObj.updatePersonnel") }}:{{ |
| | | itemdetail.updateUser |
| | | }} |
| | | </p> |
| | | </div> |
| | | |
| | | </div> |
| | | <el-dialog |
| | | top="3vh" |
| | |
| | | :label="$t('dataManage.dictionaryManageObj.number')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.orderNum" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="upform.orderNum" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.tableName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.tab" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="upform.tab" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.tableAliasName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.tabDesc" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="upform.tabDesc" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.field" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="upform.field" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldAliasName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.alias" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="upform.alias" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldType')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.type" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="upform.type" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldLength')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.len" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="upform.len" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.FieldPrecision')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.precision" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="upform.precision" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.remark')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.bak" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="upform.bak" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button |
| | | type="info" |
| | | size="small" |
| | | @click="dialogFormVisible = false" |
| | | >{{ |
| | | $t('dataManage.dictionaryManageObj.cancel') |
| | | }}</el-button> |
| | | <el-button |
| | | class="primary" |
| | | size="small" |
| | | @click="updateForm" |
| | | >{{ |
| | | $t('dataManage.dictionaryManageObj.confirm') |
| | | >{{ $t("dataManage.dictionaryManageObj.cancel") }}</el-button |
| | | > |
| | | <el-button class="primary" size="small" @click="updateForm">{{ |
| | | $t("dataManage.dictionaryManageObj.confirm") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | :label="$t('dataManage.dictionaryManageObj.number')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.orderNum" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="insertform.orderNum" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.tableName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.tab" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="insertform.tab" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.tableAliasName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.tabDesc" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="insertform.tabDesc" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.field" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="insertform.field" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldAliasName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.alias" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="insertform.alias" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldType')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.type" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="insertform.type" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldLength')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.len" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="insertform.len" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.FieldPrecision')" |
| | |
| | | :label="$t('dataManage.dictionaryManageObj.remark')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.bak" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="insertform.bak" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button |
| | | type="info" |
| | | size="small" |
| | | @click="InsertFormdialog = false" |
| | | >{{ |
| | | $t('dataManage.dictionaryManageObj.cancel') |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="info" size="small" @click="InsertFormdialog = false">{{ |
| | | $t("dataManage.dictionaryManageObj.cancel") |
| | | }}</el-button> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | @click="insertFromData" |
| | | >{{ |
| | | $t('dataManage.dictionaryManageObj.confirm') |
| | | <el-button type="primary" size="small" @click="insertFromData">{{ |
| | | $t("dataManage.dictionaryManageObj.confirm") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | deleteDicts, |
| | | updateDict, |
| | | insertDict, |
| | | } from '../../api/api'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | } from "../../api/api"; |
| | | import MyBread from "../../components/MyBread.vue"; |
| | | export default { |
| | | name: 'dictionaryManage', |
| | | name: "dictionaryManage", |
| | | components: { MyBread }, |
| | | data() { |
| | | return { |
| | | activeName: '', |
| | | activeName: "", |
| | | formInline: [], |
| | | listData: { |
| | | ns: '', |
| | | tab: '', |
| | | ns: "", |
| | | tab: "", |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | }, |
| | |
| | | insertform: {}, |
| | | |
| | | multipleSelection: [], |
| | | formLabelWidth: '130px', |
| | | formLabelWidth: "130px", |
| | | btnStatus: { |
| | | select: false, |
| | | delete: false, |
| | |
| | | this.startQueryNameData(); |
| | | }, |
| | | async startQueryNameData() { |
| | | if (this.listData.tab == '') { |
| | | if (this.listData.tab == "") { |
| | | delete this.listData.tab; |
| | | } |
| | | const data = await selectByPageAndCount(this.listData); |
| | | |
| | | if (data.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | | this.$message.error("列表调用失败"); |
| | | } |
| | | |
| | | this.tableData = data.result; |
| | |
| | | async updateForm() { |
| | | const data = await updateDict(this.upform); |
| | | if (data.code != 200) { |
| | | this.$message.error('修改失败'); |
| | | this.$message.error("修改失败"); |
| | | return; |
| | | } |
| | | this.dialogFormVisible = false; |
| | |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | this.$confirm('此操作将永久删除该字段, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | this.$confirm("此操作将永久删除该字段, 是否继续?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(async () => { |
| | | const data = await deleteDicts({ ids: std.toString() }); |
| | | if (data.code != 200) { |
| | | this.$message.error('删除失败'); |
| | | this.$message.error("删除失败"); |
| | | } |
| | | this.listData.pageIndex = 1; |
| | | this.listData.pageSize = 10; |
| | | this.startQueryNameData(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功!' |
| | | type: "success", |
| | | message: "删除成功!", |
| | | }); |
| | | }).catch(() => { |
| | | }) |
| | | .catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | type: "info", |
| | | message: "已取消删除", |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | |
| | | var h = time.getHours(); |
| | | var mm = time.getMinutes(); |
| | | var s = time.getSeconds(); |
| | | return y + '-' + this.add0(m) + '-' + this.add0(d); |
| | | return y + "-" + this.add0(m) + "-" + this.add0(d); |
| | | }, |
| | | //格式化时间 |
| | | add0(m) { |
| | | return m < 10 ? '0' + m : m; |
| | | return m < 10 ? "0" + m : m; |
| | | }, |
| | | getRemoveForm() { |
| | | this.formInline.tab = null; |
| | |
| | | async getSelectDictTab() { |
| | | const data = await selectDictTab({ name: this.formInline.tab }); |
| | | if (data.code != 200) { |
| | | this.$message.error('下拉调用失败'); |
| | | this.$message.error("下拉调用失败"); |
| | | } |
| | | |
| | | this.optionCount = data.result; |
| | |
| | | height: 98%; |
| | | width: 98%; |
| | | padding: 1%; |
| | | .dictionaryContent { |
| | | width: 16.5%; |
| | | height: 92%; |
| | | // display: flex; |
| | | // justify-content: space-between; |
| | | .dictionary_leftTree { |
| | | width: 100%; |
| | | height: 80%; |
| | | min-height: 700px; |
| | | |
| | | width: calc(23% - 0px); |
| | | height: 100%; |
| | | padding: 10px; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | max-height: 670px; |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | | li { |
| | | border-bottom: 1px solid #dcdfe6; |
| | |
| | | padding: 1%; |
| | | overflow-y: auto; |
| | | } |
| | | } |
| | | |
| | | .infinite-list-item { |
| | | background: rgba(255, 255, 255, 0.3); |
| | | |
| | |
| | | } |
| | | } |
| | | .mainBox { |
| | | width: 100%; |
| | | height: 92%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .leftTree { |
| | | width: 15%; |
| | | height: 91%; |
| | | |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | max-height: 670px; |
| | | overflow-y: auto; |
| | | } |
| | | .right { |
| | | width: 80%; |
| | | height: 91%; |
| | | |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | max-height: 670px; |
| | | // overflow-y: auto; |
| | | .inquire { |
| | | // margin-bottom: 10px; |
| | | padding: 1%; |
| | | |
| | | border-radius: 5px; |
| | | border: 1px solid #dcdfe6; |
| | | .el-form-item { |
| | | margin: 5px; |
| | | } |
| | | } |
| | | .table_box { |
| | | width: 100%; |
| | | height: 80%; |
| | | margin: 0 auto; |
| | | // overflow: auto; |
| | | margin-top: 10px; |
| | | |
| | | .el-table /deep/ th.el-table__cell > .cell { |
| | | padding: 15px !important; |
| | | } |
| | | |
| | | .el-table--border::after, |
| | | .el-table--group::after { |
| | | width: 0; |
| | | } |
| | | .el-table::before { |
| | | height: 0; |
| | | } |
| | | } |
| | | } |
| | | width: 100%; |
| | | height: calc(100% - 75px); |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .leftTree { |
| | | width: calc(23% - 0px); |
| | | height: 100%; |
| | | padding: 10px; |
| | | border-radius: 5px; |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | | } |
| | | .right { |
| | | width: 75%; |
| | | height: 100%; |
| | | border-radius: 5px; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | border: 1px solid #dcdfe6; |
| | | .inquire { |
| | | // margin-bottom: 10px; |
| | | padding: 8px; |
| | | // margin-top: 10px; |
| | | border-radius: 5px; |
| | | border: 1px solid #dcdfe6; |
| | | margin-bottom: 20px; |
| | | .el-form-item { |
| | | margin: 5px; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="domainBox"> |
| | | <My-bread :list="[ |
| | | <My-bread |
| | | :list="[ |
| | | `${$t('dataManage.dataManage')}`, |
| | | `${$t('dataManage.rangeManage')}`, |
| | | ]"></My-bread> |
| | | ]" |
| | | ></My-bread> |
| | | <el-divider /> |
| | | <div class="mainBox"> |
| | | <div class="leftTree subpage_Div"> |
| | | <el-input |
| | | v-model="filterInput" |
| | | style="width:200px" |
| | | ></el-input> |
| | | <div style="width:450px"> |
| | | <el-input v-model="filterInput" style="width: 200px"></el-input> |
| | | <div style="width: 450px"> |
| | | <el-tree |
| | | :data="domainData" |
| | | :props="defaultProps" |
| | |
| | | </div> |
| | | <div class="right subpage_Div"> |
| | | <div class="inquire"> |
| | | <el-form |
| | | ref="queryForm" |
| | | :model="queryForm" |
| | | :inline="true" |
| | | > |
| | | <el-form-item |
| | | :label="$t('dataManage.vmobj.keyword')" |
| | | prop="name" |
| | | > |
| | | <el-form ref="queryForm" :model="queryForm" :inline="true"> |
| | | <el-form-item :label="$t('dataManage.vmobj.keyword')" prop="name"> |
| | | <el-input |
| | | v-model="queryForm.code" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | style="width:200px" |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item style="float: right;"> |
| | | <el-form-item style="float: right"> |
| | | <el-button |
| | | v-if="btnStatus.insert" |
| | | @click="showAddDialog" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | type="success" |
| | | >{{ $t('common.append') }}</el-button> |
| | | >{{ $t("common.append") }}</el-button |
| | | > |
| | | <el-button |
| | | v-if="btnStatus.delete" |
| | | @click="deleteInfo" |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | >{{ $t('common.delete') }}</el-button> |
| | | >{{ $t("common.delete") }}</el-button |
| | | > |
| | | <el-button |
| | | @click="queryInfo('queryForm')" |
| | | icon="el-icon-search" |
| | | size="small" |
| | | class="primary" |
| | | >{{ $t('common.iquery') }}</el-button> |
| | | >{{ $t("common.iquery") }}</el-button |
| | | > |
| | | <el-button |
| | | @click="resetInfo('queryForm')" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | type="info" |
| | | >{{ $t('common.empty') }}</el-button> |
| | | >{{ $t("common.empty") }}</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table_box"> |
| | | <div class="table_box" style="height: calc(100% - 89px)"> |
| | | <el-table |
| | | :data="tableData" |
| | | @selection-change="handleSelectionChange" |
| | | height="100%" |
| | | height="calc(100% - 57px)" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="50" |
| | | /> |
| | | <el-table-column type="selection" width="50" /> |
| | | <el-table-column |
| | | align="center" |
| | | type="index" |
| | |
| | | :label="$t('dataManage.domainManage.bak')" |
| | | /> |
| | | |
| | | <el-table-column |
| | | min-width="150" |
| | | :label="$t('common.operate')" |
| | | > |
| | | <el-table-column min-width="150" :label="$t('common.operate')"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | class="primary" |
| | | @click="showDetail(scope.row)" |
| | | size="small" |
| | | >{{ $t('common.details') }}</el-button> |
| | | >{{ $t("common.details") }}</el-button |
| | | > |
| | | <el-button |
| | | v-if="btnStatus.update" |
| | | type="warning" |
| | | @click="handleEdit(scope.$index, scope.row)" |
| | | size="small" |
| | | >{{ $t('common.update') }}</el-button> |
| | | >{{ $t("common.update") }}</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div |
| | | class="pagination_box" |
| | | style="margin-top: 20px" |
| | | > |
| | | <div class="pagination_box" style="margin-top: 20px"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div |
| | | class="infoBox subpage_Div box_div" |
| | | v-show="showinfoBox" |
| | | > |
| | | |
| | | <div |
| | | slot="header" |
| | | class="clearfix" |
| | | > |
| | | <span>{{ $t('common.details') }}</span> |
| | | <div |
| | | style="float: right; cursor: pointer" |
| | | @click="closeDetial" |
| | | > |
| | | <div class="infoBox subpage_Div box_div" v-show="showinfoBox"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>{{ $t("common.details") }}</span> |
| | | <div style="float: right; cursor: pointer" @click="closeDetial"> |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | </div> |
| | | <el-divider></el-divider> |
| | | <div class="contentBox"> |
| | | <p> |
| | | {{ $t('dataManage.domainManage.domName') }}:{{ |
| | | itemdetail.domName |
| | | }} |
| | | {{ $t("dataManage.domainManage.domName") }}:{{ itemdetail.domName }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.domainManage.domDesc') }}:{{ |
| | | itemdetail.domDesc |
| | | }} |
| | | {{ $t("dataManage.domainManage.domDesc") }}:{{ itemdetail.domDesc }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.domainManage.domCode') }}:{{ |
| | | itemdetail.domCode |
| | | }} |
| | | {{ $t("dataManage.domainManage.domCode") }}:{{ itemdetail.domCode }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.domainManage.codeDesc') }}:{{ |
| | | itemdetail.codeDesc |
| | | }} |
| | | {{ $t("dataManage.domainManage.codeDesc") }}:{{ |
| | | itemdetail.codeDesc |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>{{ $t('dataManage.domainManage.bsm') }}:{{ itemdetail.bsm }}</p> |
| | | <p>{{ $t("dataManage.domainManage.bsm") }}:{{ itemdetail.bsm }}</p> |
| | | <el-divider></el-divider> |
| | | <p>{{ $t("dataManage.domainManage.level") }}:{{ itemdetail.level }}</p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.domainManage.level') }}:{{ itemdetail.level }} |
| | | {{ $t("dataManage.domainManage.orderid") }}:{{ itemdetail.orderid }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.domainManage.orderid') }}:{{ |
| | | itemdetail.orderid |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>{{ $t('dataManage.domainManage.bak') }}:{{ itemdetail.bak }}</p> |
| | | <p>{{ $t("dataManage.domainManage.bak") }}:{{ itemdetail.bak }}</p> |
| | | </div> |
| | | |
| | | </div> |
| | | <el-dialog |
| | | width="510px" |
| | |
| | | :visible.sync="dialogFormVisible" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-form |
| | | :model="editForm" |
| | | ref="editForm" |
| | | > |
| | | <el-form :model="editForm" ref="editForm"> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.domName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | style="width:100%" |
| | | style="width: 100%" |
| | | v-model="editForm.domName" |
| | | placeholder="请选择" |
| | | > |
| | |
| | | :label="$t('dataManage.domainManage.domDesc')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.domDesc" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="editForm.domDesc" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.domCode')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.domCode" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="editForm.domCode" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.codeDesc')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.codeDesc" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="editForm.codeDesc" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.bsm')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.bsm" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="editForm.bsm" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.level')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.level" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="editForm.level" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.orderid')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.orderid" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="editForm.orderid" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.bak')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.bak" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="editForm.bak" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div |
| | | v-if="behavior == '修改信息'" |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button |
| | | size="small" |
| | | @click="cancelEdit()" |
| | | >{{ $t('common.reset') }}</el-button> |
| | | <div v-if="behavior == '修改信息'" slot="footer" class="dialog-footer"> |
| | | <el-button size="small" @click="cancelEdit()">{{ |
| | | $t("common.reset") |
| | | }}</el-button> |
| | | <el-button |
| | | size="small" |
| | | class="primary" |
| | | type="info" |
| | | @click="sendEdit('editForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading" |
| | | >{{ $t('common.confirm') }}</el-button> |
| | | >{{ $t("common.confirm") }}</el-button |
| | | > |
| | | </div> |
| | | <div |
| | | v-else |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button |
| | | type="info" |
| | | size="small" |
| | | @click="cancelAdd('editForm')" |
| | | >{{ |
| | | $t('common.reset') |
| | | <div v-else slot="footer" class="dialog-footer"> |
| | | <el-button type="info" size="small" @click="cancelAdd('editForm')">{{ |
| | | $t("common.reset") |
| | | }}</el-button> |
| | | <el-button |
| | | size="small" |
| | | class="primary" |
| | | @click="sendAdd('editForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading" |
| | | >{{ $t('common.confirm') }}</el-button> |
| | | >{{ $t("common.confirm") }}</el-button |
| | | > |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | deleteDomain, |
| | | updateDomain, |
| | | domain_selectDomainNames, |
| | | } from '../../api/api'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | } from "../../api/api"; |
| | | import MyBread from "../../components/MyBread.vue"; |
| | | export default { |
| | | name: 'domainManage', |
| | | name: "domainManage", |
| | | components: { MyBread }, |
| | | data() { |
| | | return { |
| | | filterInput: '', |
| | | filterInput: "", |
| | | domainOptions: [], |
| | | multipleSelection: [], |
| | | behavior: '', |
| | | formLabelWidth: '100px', |
| | | behavior: "", |
| | | formLabelWidth: "100px", |
| | | dialogFormVisible: false, |
| | | showinfoBox: false, |
| | | fullscreenLoading: false, |
| | | itemdetail: {}, |
| | | editForm: { |
| | | domName: '', |
| | | domName: "", |
| | | }, |
| | | queryForm: { |
| | | code: '', |
| | | code: "", |
| | | }, |
| | | insertform: {}, |
| | | initialForm: '', |
| | | initialForm: "", |
| | | |
| | | tableData: [], |
| | | count: 0, |
| | | rowFlag: null, |
| | | listData: { |
| | | ns: '', |
| | | tab: '', |
| | | ns: "", |
| | | tab: "", |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | }, |
| | |
| | | }, |
| | | domainData: [ |
| | | { |
| | | val: '基础数据', |
| | | val: "基础数据", |
| | | children: [], |
| | | }, |
| | | { |
| | | val: '业务数据', |
| | | val: "业务数据", |
| | | children: [], |
| | | }, |
| | | { |
| | | val: '元数据', |
| | | { |
| | | val: "元数据", |
| | | children: [], |
| | | }, |
| | | ], |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'val', |
| | | children: "children", |
| | | label: "val", |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | this.listData.pageSize = 10; |
| | | const res = await domain_selectDomainNames(data); |
| | | if (res.code != 200) { |
| | | this.$message.error('domain调用失败'); |
| | | this.$message.error("domain调用失败"); |
| | | } |
| | | var std = []; |
| | | for (var i = 0; i < res.result.length; i++) { |
| | |
| | | }, |
| | | getAllTabelData() { |
| | | getDomainTabs().then((res) => { |
| | | let bdres = res.result.filter((item) => item.ns == 'bd'); |
| | | let bsres = res.result.filter((item) => item.ns == 'bs'); |
| | | let mdres = res.result.filter((item) => item.ns == 'md'); |
| | | let bdres = res.result.filter((item) => item.ns == "bd"); |
| | | let bsres = res.result.filter((item) => item.ns == "bs"); |
| | | let mdres = res.result.filter((item) => item.ns == "md"); |
| | | for (var i in bdres) { |
| | | // bdres[i].val = bdres[i].tabDesc + '(' + bdres[i].tab + ')'; |
| | | bdres[i].val = bdres[i].tabDesc; |
| | |
| | | // bsres[i].val = bsres[i].tabDesc + '(' + bsres[i].tab + ')'; |
| | | bsres[i].val = bsres[i].tabDesc; |
| | | } |
| | | for (var i in mdres) { |
| | | for (var i in mdres) { |
| | | // bsres[i].val = bsres[i].tabDesc + '(' + bsres[i].tab + ')'; |
| | | mdres[i].val = mdres[i].tabDesc; |
| | | } |
| | | this.domainData[0].children = bdres; |
| | | this.domainData[1].children = bsres; |
| | | this.domainData[2].children = mdres; |
| | | this.domainData[2].children = mdres; |
| | | }); |
| | | }, |
| | | handleSelectionChange(val) { |
| | |
| | | resetInfo() { |
| | | this.queryForm = {}; |
| | | this.$store.state.verCateNode = {}; |
| | | this.$bus.$emit('clearTressLabel', true); |
| | | this.$bus.$emit("clearTressLabel", true); |
| | | this.listData.pageIndex = 1; |
| | | this.listData.pageSize = 10; |
| | | this.queryInfo(); |
| | | }, |
| | | // 删除多条 |
| | | deleteInfo() { |
| | | this.$confirm('确定是否删除所选内容?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | this.$confirm("确定是否删除所选内容?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | if (this.multipleSelection.length == 0) { |
| | | alert('请选择要删除的对象'); |
| | | alert("请选择要删除的对象"); |
| | | return; |
| | | } else { |
| | | var std = []; |
| | |
| | | console.log(res); |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功!', |
| | | type: "success", |
| | | message: "删除成功!", |
| | | }); |
| | | this.multipleSelection = []; |
| | | getSingleTab(this.listData).then((res) => { |
| | |
| | | }, 500); |
| | | }); |
| | | } else { |
| | | this.$message.error('删除失败'); |
| | | this.$message.error("删除失败"); |
| | | this.multipleSelection = []; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | this.$message('已取消删除'); |
| | | this.$message("已取消删除"); |
| | | }); |
| | | }, |
| | | showAddDialog() { |
| | | this.behavior = '新增用户'; |
| | | this.behavior = "新增用户"; |
| | | this.editForm = {}; |
| | | this.dialogFormVisible = true; |
| | | }, |
| | |
| | | this.fullscreenLoading = false; |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | message: '添加成功', |
| | | type: 'success', |
| | | message: "添加成功", |
| | | type: "success", |
| | | }); |
| | | getSingleTab(this.listData).then((res) => { |
| | | setTimeout(() => { |
| | |
| | | }, 500); |
| | | }) |
| | | .catch((res) => { |
| | | alert('添加失败,请重试!'); |
| | | alert("添加失败,请重试!"); |
| | | this.fullscreenLoading = false; |
| | | }); |
| | | } else { |
| | | console.log('error submit!!'); |
| | | console.log("error submit!!"); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | handleClose(done) { |
| | | this.$confirm('关闭后无法保存,是否关闭?') |
| | | this.$confirm("关闭后无法保存,是否关闭?") |
| | | .then((_) => { |
| | | this.editForm = {}; |
| | | done(); |
| | | }) |
| | | .catch((_) => { }); |
| | | .catch((_) => {}); |
| | | }, |
| | | // 查看界面 |
| | | showDetail(row) { |
| | |
| | | this.dialogFormVisible = true; |
| | | this.initialForm = JSON.stringify(row); //备份 |
| | | this.editForm = row; |
| | | this.behavior = '修改信息'; |
| | | this.behavior = "修改信息"; |
| | | }, |
| | | editFromDataClose() { |
| | | this.dialogFormVisible = false; |
| | |
| | | |
| | | // 提交修改 |
| | | sendEdit() { |
| | | this.$confirm('是否确定编辑?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | this.$confirm("是否确定编辑?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | this.dialogFormVisible = false; |
| | |
| | | }, 500); |
| | | }); |
| | | this.$message({ |
| | | message: '修改成功', |
| | | type: 'success', |
| | | message: "修改成功", |
| | | type: "success", |
| | | }); |
| | | this.editForm = {}; |
| | | } else { |
| | | alert('修改失败,请重试!'); |
| | | alert("修改失败,请重试!"); |
| | | this.fullscreenLoading = false; |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | alert('修改失败,请重试!'); |
| | | alert("修改失败,请重试!"); |
| | | this.fullscreenLoading = false; |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | alert('修改失败,请重试!'); |
| | | alert("修改失败,请重试!"); |
| | | this.fullscreenLoading = false; |
| | | }); |
| | | }, |
| | |
| | | watch: { |
| | | pathId: { |
| | | immediate: true, |
| | | handler(val) { }, |
| | | handler(val) {}, |
| | | }, |
| | | filterInput(val) { |
| | | this.$refs.tree.filter(val); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | padding: 1%; |
| | | .mainBox { |
| | | width: 100%; |
| | | height: 92%; |
| | | height: calc(100% - 75px); |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .leftTree { |
| | | width: 15%; |
| | | height: 91%; |
| | | width: calc(23% - 0px); |
| | | height: 100%; |
| | | |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | max-height: 670px; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | | } |
| | | .right { |
| | | width: 80%; |
| | | height: 91%; |
| | | |
| | | width: 75%; |
| | | height: 100%; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | max-height: 670px; |
| | | // overflow-y: auto; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | border: 1px solid #dcdfe6; |
| | | .inquire { |
| | | // margin-bottom: 10px; |
| | | padding: 1%; |
| | | |
| | | padding: 8px; |
| | | // margin-top: 10px; |
| | | border-radius: 5px; |
| | | border: 1px solid #dcdfe6; |
| | | margin-bottom: 20px; |
| | | .el-form-item { |
| | | margin: 5px; |
| | | } |
| | | } |
| | | .table_box { |
| | | width: 100%; |
| | | height: 80%; |
| | | margin: 0 auto; |
| | | overflow: auto; |
| | | margin-top: 10px; |
| | | |
| | | .el-table /deep/ th.el-table__cell > .cell { |
| | | padding: 15px !important; |
| | | } |
| | | |
| | | .el-table--border::after, |
| | | .el-table--group::after { |
| | | width: 0; |
| | | } |
| | | .el-table::before { |
| | | height: 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div class="authorityManagement_box"> |
| | | <My-bread :list="[ |
| | | <My-bread |
| | | :list="[ |
| | | `${$t('dataManage.dataManage')}`, |
| | | `${$t('dataManage.metadataManage')}`, |
| | | ]"></My-bread> |
| | | ]" |
| | | ></My-bread> |
| | | <el-divider /> |
| | | <div class="inquire subpage_Div"> |
| | | <el-form |
| | | ref="queryForm" |
| | | :model="queryForm" |
| | | :inline="true" |
| | | > |
| | | <el-form-item> |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="queryForm.depName" |
| | | > |
| | | <el-option |
| | | :value="queryForm.depid" |
| | | :label="queryForm.depName" |
| | | style=" height:auto" |
| | | > |
| | | <el-tree |
| | | ref="tree" |
| | | :data="companyOption1" |
| | | node-key="id" |
| | | :props="cascader" |
| | | @node-click="handleChange1" |
| | | /> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-cascader |
| | | <div class="inquire subpage_Div" ref="container"> |
| | | <el-form ref="queryForm" :model="queryForm" :inline="true"> |
| | | <div class="flex_box"> |
| | | <div style="margin-right: auto"> |
| | | <el-form-item> |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="queryForm.depName" |
| | | > |
| | | <el-option |
| | | :value="queryForm.depid" |
| | | :label="queryForm.depName" |
| | | style="height: auto" |
| | | > |
| | | <el-tree |
| | | ref="tree" |
| | | :data="companyOption1" |
| | | node-key="id" |
| | | :props="cascader" |
| | | @node-click="handleChange1" |
| | | /> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-cascader |
| | | v-model="queryForm.depid" |
| | | :show-all-levels="false" |
| | | :options="companyOption1" |
| | |
| | | emitPath: false, |
| | | }" |
| | | ></el-cascader> --> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="queryForm.dirName" |
| | | > |
| | | <el-option |
| | | :value="queryForm.dirid" |
| | | :label="queryForm.dirName" |
| | | style=" height:auto" |
| | | > |
| | | <el-tree |
| | | ref="tree" |
| | | :data="companyOption" |
| | | node-key="id" |
| | | :props="cascader" |
| | | @node-click="handleChange" |
| | | /> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-cascader |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="queryForm.dirName" |
| | | > |
| | | <el-option |
| | | :value="queryForm.dirid" |
| | | :label="queryForm.dirName" |
| | | style="height: auto" |
| | | > |
| | | <el-tree |
| | | ref="tree" |
| | | :data="companyOption" |
| | | node-key="id" |
| | | :props="cascader" |
| | | @node-click="handleChange" |
| | | /> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-cascader |
| | | v-model="queryForm.dirid" |
| | | :show-all-levels="false" |
| | | :options="companyOption" |
| | |
| | | emitPath: false, |
| | | }" |
| | | ></el-cascader> --> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="queryForm.verid" |
| | | placeholder="请选择" |
| | | @change="verHandleChange($event)" |
| | | > |
| | | <el-option |
| | | v-for="item in verOptions" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item prop="name"> |
| | | <el-input |
| | | v-model="queryForm.name" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | style="width:200px" |
| | | /> |
| | | </el-form-item> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="queryForm.verid" |
| | | placeholder="请选择" |
| | | @change="verHandleChange($event)" |
| | | > |
| | | <el-option |
| | | v-for="item in verOptions" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item prop="name"> |
| | | <el-input |
| | | v-model="queryForm.name" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | </div> |
| | | <div> |
| | | <el-form-item> |
| | | <el-button |
| | | @click="resetInfo('queryForm')" |
| | | icon="el-icon-refresh" |
| | | type="info" |
| | | size="small" |
| | | >{{ $t("common.reset") }}</el-button |
| | | > |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | @click="queryInfo()" |
| | | icon="el-icon-search" |
| | | class="primary" |
| | | size="small" |
| | | >{{ $t("common.iquery") }}</el-button |
| | | > |
| | | </el-form-item> |
| | | <el-form-item v-if="btnStatus.delete"> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | @click="deleteMetaInfo" |
| | | icon="el-icon-delete" |
| | | >{{ $t("common.delete") }}</el-button |
| | | > |
| | | </el-form-item> |
| | | <el-form-item v-if="btnStatus.download"> |
| | | <el-button |
| | | @click="downFormData" |
| | | icon="el-icon-download" |
| | | type="success" |
| | | size="small" |
| | | >{{ $t("common.download") }}</el-button |
| | | > |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- <el-form-item style="float:right"> |
| | | <el-button |
| | | @click="queryInfo()" |
| | |
| | | size="small" |
| | | >{{ $t('common.download') }}</el-button> |
| | | </el-form-item> --> |
| | | <el-form-item style="float:right"> |
| | | <el-button |
| | | @click="resetInfo('queryForm')" |
| | | icon="el-icon-refresh" |
| | | type="info" |
| | | size="small" |
| | | >{{ $t('common.reset') }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item style="float:right"> |
| | | <el-button |
| | | @click="queryInfo()" |
| | | icon="el-icon-search" |
| | | class="primary" |
| | | size="small" |
| | | >{{ $t('common.iquery') }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item v-if="btnStatus.delete" style="float:right"> |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | @click="deleteMetaInfo" |
| | | icon="el-icon-delete" |
| | | >{{ $t('common.delete') }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item v-if="btnStatus.download" style="float:right"> |
| | | <el-button |
| | | @click="downFormData" |
| | | icon="el-icon-download" |
| | | type="success" |
| | | size="small" |
| | | >{{ $t('common.download') }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="bottom"> |
| | | |
| | | <div class="rightTable subpage_Div"> |
| | | <div class="table_box"> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange" |
| | | height="95%" |
| | | <div class="table_box subpage_Div" :style="styleVar"> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange" |
| | | height="calc(100% - 57px)" |
| | | > |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column |
| | | :label="$t('dataManage.dictionaryManageObj.number')" |
| | | type="index" |
| | | width="50" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | /> |
| | | <el-table-column |
| | | :label="$t('dataManage.dictionaryManageObj.number')" |
| | | type="index" |
| | | width="50" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | :label="$t('dataManage.vmobj.name')" |
| | | /> |
| | | <el-table-column |
| | | prop="type" |
| | | :label="$t('dataManage.vmobj.format')" |
| | | /> |
| | | <el-table-column |
| | | prop="sizes" |
| | | :label="$t('dataManage.vmobj.size')" |
| | | :formatter="stateFormatSizes" |
| | | /> |
| | | <el-table-column |
| | | prop="depName" |
| | | :label="$t('dataManage.vmobj.depName')" |
| | | /> |
| | | <el-table-column |
| | | prop="dirName" |
| | | :label="$t('dataManage.vmobj.dirName')" |
| | | width="200" |
| | | /> |
| | | <el-table-column |
| | | prop="verName" |
| | | :label="$t('dataManage.vmobj.versionNumber')" |
| | | /> |
| | | <el-table-column :label="$t('dataManage.dataUpObj.tableName')"> |
| | | <template slot-scope="scope"> |
| | | <a @click="detail(scope.row)">{{ |
| | | scope.row.tab |
| | | }}</a> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | <el-table-column prop="name" :label="$t('dataManage.vmobj.name')" /> |
| | | <el-table-column prop="type" :label="$t('dataManage.vmobj.format')" /> |
| | | <el-table-column |
| | | prop="sizes" |
| | | :label="$t('dataManage.vmobj.size')" |
| | | :formatter="stateFormatSizes" |
| | | /> |
| | | <el-table-column |
| | | prop="depName" |
| | | :label="$t('dataManage.vmobj.depName')" |
| | | /> |
| | | <el-table-column |
| | | prop="dirName" |
| | | :label="$t('dataManage.vmobj.dirName')" |
| | | width="200" |
| | | /> |
| | | <el-table-column |
| | | prop="verName" |
| | | :label="$t('dataManage.vmobj.versionNumber')" |
| | | /> |
| | | <el-table-column :label="$t('dataManage.dataUpObj.tableName')"> |
| | | <template slot-scope="scope"> |
| | | <a @click="detail(scope.row)">{{ scope.row.tab }}</a> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <!-- <el-table-column |
| | | <!-- <el-table-column |
| | | prop="tab" |
| | | :label="$t('dataManage.vmobj.tab')" |
| | | :formatter="formatData" |
| | | /> --> |
| | | <el-table-column |
| | | prop="rows" |
| | | :label="$t('dataManage.vmobj.row')" |
| | | /> |
| | | <el-table-column |
| | | prop="uname" |
| | | :label="$t('dataManage.vmobj.createonuser')" |
| | | /> |
| | | <el-table-column |
| | | prop="createTime" |
| | | :label="$t('dataManage.vmobj.createontime')" |
| | | :formatter="formatData" |
| | | /> |
| | | <el-table-column |
| | | min-width="100" |
| | | :label="$t('common.operate')" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-link @click="showDetail(scope.row)">{{ |
| | | $t('common.details') |
| | | }}</el-link> |
| | | <el-link |
| | | v-if="btnStatus.update" |
| | | @click="editInfo(scope.row)" |
| | | style="margin-left: 10px; " |
| | | >{{ $t('common.edit') }}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div |
| | | style="margin-top: 0px" |
| | | class="pagination_box" |
| | | > |
| | | <el-table-column prop="rows" :label="$t('dataManage.vmobj.row')" /> |
| | | <el-table-column |
| | | prop="uname" |
| | | :label="$t('dataManage.vmobj.createonuser')" |
| | | /> |
| | | <el-table-column |
| | | prop="createTime" |
| | | :label="$t('dataManage.vmobj.createontime')" |
| | | :formatter="formatData" |
| | | /> |
| | | <el-table-column min-width="100" :label="$t('common.operate')"> |
| | | <template slot-scope="scope"> |
| | | <el-link @click="showDetail(scope.row)">{{ |
| | | $t("common.details") |
| | | }}</el-link> |
| | | <el-link |
| | | v-if="btnStatus.update" |
| | | @click="editInfo(scope.row)" |
| | | style="margin-left: 10px" |
| | | >{{ $t("common.edit") }}</el-link |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="pagination_box"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div |
| | | class="infoBox" |
| | | v-show="showinfoBox" |
| | | > |
| | | |
| | | <div class="infoBox" v-show="showinfoBox"> |
| | | <el-card class="box-card"> |
| | | <div |
| | | slot="header" |
| | | class="clearfix" |
| | | > |
| | | <span>{{ $t('common.details') }}</span> |
| | | <div |
| | | style="float: right; cursor: pointer" |
| | | @click="closeDetial" |
| | | > |
| | | <div slot="header" class="clearfix"> |
| | | <span>{{ $t("common.details") }}</span> |
| | | <div style="float: right; cursor: pointer" @click="closeDetial"> |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | </div> |
| | | <div |
| | | class="contentBox" |
| | | style="padding:1%" |
| | | > |
| | | <p>{{ $t('dataManage.vmobj.name') }}:{{ itemdetail.name }}</p> |
| | | <div class="contentBox" style="padding: 1%"> |
| | | <p>{{ $t("dataManage.vmobj.name") }}:{{ itemdetail.name }}</p> |
| | | <el-divider></el-divider> |
| | | <p>{{ $t('dataManage.vmobj.format') }}:{{ itemdetail.type }}</p> |
| | | <p>{{ $t("dataManage.vmobj.format") }}:{{ itemdetail.type }}</p> |
| | | <el-divider></el-divider> |
| | | <p>{{ $t('common.size') }}:{{ setInfoBoxSize(itemdetail.sizes) }}</p> |
| | | <p>{{ $t("common.size") }}:{{ setInfoBoxSize(itemdetail.sizes) }}</p> |
| | | <el-divider></el-divider> |
| | | <p>{{ $t('dataManage.vmobj.depName') }}:{{ itemdetail.depName }}</p> |
| | | <p>{{ $t("dataManage.vmobj.depName") }}:{{ itemdetail.depName }}</p> |
| | | <el-divider></el-divider> |
| | | <p>{{ $t("dataManage.vmobj.dirName") }}:{{ itemdetail.dirName }}</p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.vmobj.dirName') }}:{{ |
| | | itemdetail.dirName |
| | | }} |
| | | {{ $t("dataManage.vmobj.versionNumber") }}:{{ itemdetail.verName }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>{{ $t("dataManage.vmobj.tab") }}:{{ itemdetail.tab }}</p> |
| | | <el-divider></el-divider> |
| | | <p>{{ $t("dataManage.vmobj.row") }}:{{ itemdetail.row }}</p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t("dataManage.vmobj.createonuser") }}:{{ itemdetail.uname }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.vmobj.versionNumber') }}:{{ itemdetail.verName }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.vmobj.tab') }}:{{ itemdetail.tab }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.vmobj.row') }}:{{ itemdetail.row }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.vmobj.createonuser') }}:{{ itemdetail.uname }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.vmobj.createontime') }}:{{ |
| | | {{ $t("dataManage.vmobj.createontime") }}:{{ |
| | | setInfoBoxTime(itemdetail.createTime) |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.vmobj.updateonuser') }}:{{ |
| | | {{ $t("dataManage.vmobj.updateonuser") }}:{{ |
| | | itemdetail.updateUser |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.vmobj.updateontime') }}:{{ |
| | | {{ $t("dataManage.vmobj.updateontime") }}:{{ |
| | | setInfoBoxTime(itemdetail.updateTime) |
| | | }} |
| | | </p> |
| | |
| | | :visible.sync="dialogFormVisible" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-form |
| | | :model="editForm" |
| | | ref="editForm" |
| | | > |
| | | <el-form :model="editForm" ref="editForm"> |
| | | <el-form-item |
| | | :label="$t('dataManage.vmobj.name')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.name" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="editForm.name" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.vmobj.format')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.type" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="editForm.type" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.vmobj.size')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.sizes" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="editForm.sizes" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.vmobj.depName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | style="width:100%" |
| | | style="width: 100%" |
| | | :popper-append-to-body="false" |
| | | v-model="editForm.depName" |
| | | > |
| | | <el-option |
| | | :value="editForm.depid" |
| | | :label="editForm.depName" |
| | | style=" height:auto" |
| | | style="height: auto" |
| | | > |
| | | <el-tree |
| | | ref="tree" |
| | |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | style="width:100%" |
| | | style="width: 100%" |
| | | :popper-append-to-body="false" |
| | | v-model="editForm.dirName" |
| | | > |
| | | <el-option |
| | | :value="editForm.dirid" |
| | | :label="editForm.dirName" |
| | | style=" height:auto" |
| | | style="height: auto" |
| | | > |
| | | <el-tree |
| | | ref="tree" |
| | |
| | | :label="$t('dataManage.vmobj.describe')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.describe" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-input v-model="editForm.describe" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item |
| | | :label="$t('dataManage.vmobj.gather')" |
| | |
| | | <el-input v-model="editForm.gather" autocomplete="off"></el-input> |
| | | </el-form-item> --> |
| | | </el-form> |
| | | <div |
| | | v-if="behavior == '修改信息'" |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button |
| | | size="small" |
| | | @click="cancelEdit()" |
| | | >{{ |
| | | $t('common.reset') |
| | | <div v-if="behavior == '修改信息'" slot="footer" class="dialog-footer"> |
| | | <el-button size="small" @click="cancelEdit()">{{ |
| | | $t("common.reset") |
| | | }}</el-button> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click="sendEdit('editForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading" |
| | | >{{ $t('common.submit') }}</el-button> |
| | | >{{ $t("common.submit") }}</el-button |
| | | > |
| | | </div> |
| | | <div |
| | | v-else |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button |
| | | size="small" |
| | | @click="cancelAdd('editForm')" |
| | | >{{ |
| | | $t('common.reset') |
| | | <div v-else slot="footer" class="dialog-footer"> |
| | | <el-button size="small" @click="cancelAdd('editForm')">{{ |
| | | $t("common.reset") |
| | | }}</el-button> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click="sendAdd('editForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading" |
| | | >{{ $t('common.submit') }}</el-button> |
| | | >{{ $t("common.submit") }}</el-button |
| | | > |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | |
| | | :visible.sync="dialogVisible" |
| | | width="70%" |
| | | > |
| | | <div style="height:600px"> |
| | | <div style="height: 600px"> |
| | | <el-table |
| | | ref="filterTable" |
| | | :data="dbTableData" |
| | |
| | | align="center" |
| | | ></el-table-column> |
| | | </el-table> |
| | | <div |
| | | style="margin-top: 10px" |
| | | class="pagination_box" |
| | | > |
| | | <div style="margin-top: 10px" class="pagination_box"> |
| | | <el-pagination |
| | | @size-change="handleLoaderSizeChange" |
| | | @current-change="handleLoaderCurrentChange" |
| | |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | |
| | | </el-dialog> |
| | | <div |
| | | class="downloadBox box_div subpage_Div" |
| | | v-if="showCodeBox" |
| | | > |
| | | <h4 style="padding: 20px">{{$t('common.passworld')}}</h4> |
| | | <div class="downloadBox box_div subpage_Div" v-if="showCodeBox"> |
| | | <h4 style="padding: 20px">{{ $t("common.passworld") }}</h4> |
| | | <el-form |
| | | :model="codeForm" |
| | | :rules="rules" |
| | |
| | | label-width="100px" |
| | | class="codeForm" |
| | | > |
| | | <el-form-item |
| | | :label="$t('common.passworld')" |
| | | prop="password" |
| | | > |
| | | <el-form-item :label="$t('common.passworld')" prop="password"> |
| | | <el-input |
| | | type="password" |
| | | v-model="codeForm.password" |
| | | show-password |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('common.SPassword')" |
| | | prop="repassword" |
| | | > |
| | | <el-form-item :label="$t('common.SPassword')" prop="repassword"> |
| | | <el-input |
| | | type="password" |
| | | v-model="codeForm.repassword" |
| | |
| | | class="primary" |
| | | size="small" |
| | | @click="download('codeForm')" |
| | | >{{$t('common.confirm')}}</el-button> |
| | | <el-button |
| | | type="info" |
| | | size="small" |
| | | @click="closeDown('codeForm')" |
| | | >{{$t('common.cancel')}}</el-button> |
| | | >{{ $t("common.confirm") }}</el-button |
| | | > |
| | | <el-button type="info" size="small" @click="closeDown('codeForm')">{{ |
| | | $t("common.cancel") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import $ from 'jquery' |
| | | import { getToken } from '@/utils/auth'; |
| | | import $ from "jquery"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import { |
| | | select_meta_ByPageAndCount, |
| | | // queryDataCount, |
| | |
| | | meta_selectDownloadFile, |
| | | meta_selectFields, |
| | | meta_selectByPageForUpload, |
| | | meta_selectVerByDirid |
| | | } from '../../api/api'; |
| | | meta_selectVerByDirid, |
| | | } from "../../api/api"; |
| | | |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | import MyBread from "../../components/MyBread.vue"; |
| | | export default { |
| | | name: 'metadataManage', |
| | | name: "metadataManage", |
| | | components: { MyBread }, |
| | | data() { |
| | | var repasswordValidator = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('请再次输入密码')); |
| | | if (value === "") { |
| | | callback(new Error("请再次输入密码")); |
| | | } else if (value !== this.codeForm.password) { |
| | | callback(new Error('两次输入密码不一致!')); |
| | | callback(new Error("两次输入密码不一致!")); |
| | | } else { |
| | | callback(); |
| | | } |
| | |
| | | var passwordreg = |
| | | /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![a-z0-9]+$)(?![a-z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![0-9\W!@#$%^&*`~()\\-_+=,.?;<>]+$)[a-zA-Z0-9\W!@#$%^&*`~()\\-_+=,.?;<>]{12,20}$/; |
| | | if (!passwordreg.test(value)) { |
| | | callback( |
| | | new Error('密码必须由数字、字母、特殊字符组合,请输入13-20位') |
| | | ); |
| | | callback(new Error("密码必须由数字、字母、特殊字符组合,请输入13-20位")); |
| | | } else { |
| | | callback(); |
| | | } |
| | |
| | | return { |
| | | verOptions: [], |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'name', |
| | | children: "children", |
| | | label: "name", |
| | | }, |
| | | dirComPanyOption: [], |
| | | companyOption: [], |
| | | companyOption1: [], |
| | | activeName: '', |
| | | activeName: "", |
| | | optionCount: [], |
| | | showCodeBox: false, |
| | | value: true, |
| | | multipleSelection: [], |
| | | formLabelWidth: '120px', |
| | | formLabelWidth: "120px", |
| | | dialogFormVisible: false, |
| | | editForm: {}, |
| | | showinfoBox: false, |
| | | fullscreenLoading: false, |
| | | itemdetail: {}, |
| | | queryForm: { |
| | | name: '', |
| | | dirid: '', |
| | | depid: '', |
| | | verid: '' |
| | | name: "", |
| | | dirid: "", |
| | | depid: "", |
| | | verid: "", |
| | | }, |
| | | behavior: '', |
| | | initialForm: '', |
| | | behavior: "", |
| | | initialForm: "", |
| | | codeForm: { |
| | | password: '', |
| | | repassword: '', |
| | | password: "", |
| | | repassword: "", |
| | | }, |
| | | rules: { |
| | | password: [{ required: true, message: '请输入密码', trigger: 'blur' }, { validator: passwordValidator, trigger: 'blur' }], |
| | | password: [ |
| | | { required: true, message: "请输入密码", trigger: "blur" }, |
| | | { validator: passwordValidator, trigger: "blur" }, |
| | | ], |
| | | repassword: [ |
| | | { required: true, message: '请输入确认密码', trigger: 'blur' }, |
| | | { validator: repasswordValidator, trigger: 'blur' }, |
| | | { required: true, message: "请输入确认密码", trigger: "blur" }, |
| | | { validator: repasswordValidator, trigger: "blur" }, |
| | | ], |
| | | }, |
| | | tableData: [], |
| | |
| | | pageIndex: 1, |
| | | name: null, |
| | | dirid: null, |
| | | depid: null |
| | | depid: null, |
| | | }, |
| | | cascader: { |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'children', |
| | | label: "name", |
| | | value: "id", |
| | | children: "children", |
| | | checkStrictly: true, |
| | | emitPath: false, |
| | | }, |
| | |
| | | }, |
| | | count1: 0, |
| | | attributeData: [], |
| | | tableHeight: 0, |
| | | timer: 0, |
| | | styleVar: { |
| | | height: "calc(100% - 109px)", |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | |
| | | // this.getSelectDictTab(); |
| | | this.showPermsBtn(); |
| | | this.getQueryDepTree(); |
| | | |
| | | this.signGetPublicKey(); |
| | | |
| | | }, |
| | | |
| | | beforeDestroy() { |
| | | this.timer && clearTimeout(this.timer); |
| | | window.removeEventListener("resize", this.onResize); |
| | | }, |
| | | mounted() { |
| | | window.addEventListener("resize", this.onResize); |
| | | this.calHeight(); |
| | | }, |
| | | methods: { |
| | | onResize() { |
| | | this.timer && clearTimeout(this.timer); |
| | | this.timer = setTimeout(() => { |
| | | this.calHeight(); |
| | | }, 500); |
| | | }, |
| | | calHeight() { |
| | | this.$nextTick(() => { |
| | | const rect = this.$refs.container.getBoundingClientRect(); |
| | | this.tableHeight = `${rect.height + 97}px`; |
| | | this.styleVar["height"] = `calc(100% - ${rect.height + 97}px)`; |
| | | }); |
| | | }, |
| | | async detail(res) { |
| | | var val = res.tab.split("."); |
| | | const data = await meta_selectFields({ |
| | | ns: val[0], |
| | | tab: val[1] |
| | | }) |
| | | tab: val[1], |
| | | }); |
| | | |
| | | if (data.code != 200) { |
| | | this.$message.error('字段列表调用失败'); |
| | | return |
| | | this.$message.error("字段列表调用失败"); |
| | | return; |
| | | } |
| | | |
| | | this.dialogVisible = true; |
| | | |
| | | |
| | | this.attributeData = data.result; |
| | | |
| | |
| | | id: res.id, |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | } |
| | | }; |
| | | this.getDataLoaderSelectDbData(); |
| | | }, |
| | | |
| | | async getDataLoaderSelectDbData() { |
| | | const data1 = await meta_selectByPageForUpload(this.listLoader); |
| | | if (data1.code != 200) { |
| | | this.$message.error('字段列表调用失败'); |
| | | return |
| | | this.$message.error("字段列表调用失败"); |
| | | return; |
| | | } |
| | | |
| | | var option = data1.result; |
| | |
| | | option[i].updateuser = option[i].updateName; |
| | | option[i].verid = option[i].verName; |
| | | if (option[i].createtime != null) { |
| | | option[i].createtime = this.setInfoBoxTime(option[i].createtime) |
| | | option[i].createtime = this.setInfoBoxTime(option[i].createtime); |
| | | } |
| | | if (option[i].updatetime != null) { |
| | | option[i].updatetime = this.setInfoBoxTime(option[i].updatetime) |
| | | option[i].updatetime = this.setInfoBoxTime(option[i].updatetime); |
| | | } |
| | | |
| | | } |
| | | this.dbTableData = data1.result; |
| | | this.count1 = data1.count; |
| | |
| | | async getQueryDepTree() { |
| | | const res = await selectdepTab(); |
| | | if (res.code != 200) { |
| | | this.$message.error('单位列表获取失败'); |
| | | this.$message.error("单位列表获取失败"); |
| | | return; |
| | | } |
| | | this.companyOption1 = this.treeData(res.result); |
| | | this.queryForm.depid = this.companyOption1[0].id |
| | | this.queryForm.depName = this.companyOption1[0].name |
| | | this.queryForm.depid = this.companyOption1[0].id; |
| | | this.queryForm.depName = this.companyOption1[0].name; |
| | | this.getQueryDirTree(); |
| | | |
| | | }, |
| | | |
| | | async getQueryDirTree() { |
| | | const res = await selectdirTab(); |
| | | if (res.code != 200) { |
| | | this.$message.error('单位列表获取失败'); |
| | | this.$message.error("单位列表获取失败"); |
| | | return; |
| | | } |
| | | this.companyOption = this.treeData(res.result); |
| | | this.queryForm.dirid = this.companyOption[0].id |
| | | this.queryForm.dirName = this.companyOption[0].name |
| | | this.queryForm.dirid = this.companyOption[0].id; |
| | | this.queryForm.dirName = this.companyOption[0].name; |
| | | this.getQueryVerList(); |
| | | }, |
| | | |
| | | async getQueryVerList() { |
| | | const data = await meta_selectVerByDirid({ dirid: this.queryForm.dirid }) |
| | | const data = await meta_selectVerByDirid({ dirid: this.queryForm.dirid }); |
| | | if (data.code != 200) { |
| | | this.$message.error('版本列表获取失败'); |
| | | this.$message.error("版本列表获取失败"); |
| | | return; |
| | | } |
| | | this.verOptions = data.result; |
| | |
| | | this.listData.pageSize = 10; |
| | | this.listData.pageIndex = 1; |
| | | this.queryForm.dirid = data.id; |
| | | this.queryForm.dirName = data.name |
| | | this.getQueryVerList() |
| | | this.queryForm.dirName = data.name; |
| | | this.getQueryVerList(); |
| | | }, |
| | | handleChange1(data, node, nodeData) { |
| | | this.listData.pageSize = 10; |
| | | this.listData.pageIndex = 1; |
| | | this.queryForm.depid = data.id; |
| | | this.queryForm.depName = data.name |
| | | this.queryForm.depName = data.name; |
| | | this.getMetaData(); |
| | | }, |
| | | handleChange2(data, node, nodeData) { |
| | | |
| | | this.editForm.depid = data.id; |
| | | this.editForm.depName = data.name |
| | | |
| | | this.editForm.depName = data.name; |
| | | }, |
| | | handleChange3(data, node, nodeData) { |
| | | |
| | | this.editForm.dirid = data.id; |
| | | this.editForm.dirName = data.name |
| | | |
| | | this.editForm.dirName = data.name; |
| | | }, |
| | | //格式化列表 |
| | | formatData(row, column) { |
| | |
| | | }, |
| | | setInfoBoxSize(res) { |
| | | if (res >= 1024) { |
| | | return parseFloat(res / 1024).toFixed(3) + ' GB'; |
| | | return parseFloat(res / 1024).toFixed(3) + " GB"; |
| | | } else { |
| | | return res + ' MB'; |
| | | return res + " MB"; |
| | | } |
| | | }, |
| | | //格式化时间 |
| | |
| | | var s = time.getSeconds(); |
| | | return ( |
| | | y + |
| | | '-' + |
| | | "-" + |
| | | this.add0(m) + |
| | | '-' + |
| | | "-" + |
| | | this.add0(d) + |
| | | ' ' + |
| | | " " + |
| | | h + |
| | | ':' + |
| | | ":" + |
| | | mm + |
| | | ':' + |
| | | ":" + |
| | | s |
| | | ); |
| | | }, |
| | | //格式化时间 |
| | | add0(m) { |
| | | return m < 10 ? '0' + m : m; |
| | | return m < 10 ? "0" + m : m; |
| | | }, |
| | | //单位转换 |
| | | stateFormatSizes(row, column) { |
| | | if (row.sizes >= 1024) { |
| | | const val = parseFloat(row.sizes / 1024).toFixed(3); |
| | | return val + ' GB'; |
| | | return val + " GB"; |
| | | } else { |
| | | return row.sizes + ' MB'; |
| | | return row.sizes + " MB"; |
| | | } |
| | | }, |
| | | //目录树获取 |
| | | async getSelectDictTab() { |
| | | const res = await selectdirTab(); |
| | | if (res.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | | this.$message.error("列表调用失败"); |
| | | } |
| | | this.optionCount = this.treeData(res.result); |
| | | this.dirComPanyOption = this.treeData(res.result); |
| | | this.listData.dirid = this.optionCount[0].id; |
| | | |
| | | }, |
| | | handleNodeClick(data) { |
| | | this.listData.pageSize = 10; |
| | |
| | | // this.listData.dirid = 57 |
| | | |
| | | select_meta_ByPageAndCount(this.listData).then((res) => { |
| | | |
| | | this.tableData = res.result; |
| | | this.count = res.count; |
| | | }); |
| | |
| | | }, |
| | | //新增按钮 |
| | | showAddDialog() { |
| | | this.behavior = '新增用户'; |
| | | this.behavior = "新增用户"; |
| | | this.editForm = {}; |
| | | this.dialogFormVisible = true; |
| | | }, |
| | |
| | | this.listData.pageIndex = 1; |
| | | this.getMetaData(); |
| | | this.$message({ |
| | | message: '添加成功', |
| | | type: 'success', |
| | | message: "添加成功", |
| | | type: "success", |
| | | }); |
| | | this.editForm = {}; |
| | | this.dialogFormVisible = false; |
| | |
| | | }, 500); |
| | | }) |
| | | .catch((res) => { |
| | | alert('修改失败,请重试!'); |
| | | alert("修改失败,请重试!"); |
| | | this.fullscreenLoading = false; |
| | | }); |
| | | } else { |
| | | console.log('error submit!!'); |
| | | console.log("error submit!!"); |
| | | return false; |
| | | } |
| | | }); |
| | |
| | | }, |
| | | // 删除多条 |
| | | deleteMetaInfo() { |
| | | this.$confirm('确定是否删除所选内容?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | this.$confirm("确定是否删除所选内容?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | var std = []; |
| | |
| | | deleteMeta({ ids: std.toString() }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功!', |
| | | type: "success", |
| | | message: "删除成功!", |
| | | }); |
| | | this.multipleSelection = []; |
| | | this.listData.pageSize = 10; |
| | | this.listData.pageIndex = 1; |
| | | this.getMetaData(); |
| | | } else { |
| | | this.$message.error('删除失败'); |
| | | this.$message.error("删除失败"); |
| | | this.multipleSelection = []; |
| | | } |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | this.$message('已取消删除'); |
| | | this.$message("已取消删除"); |
| | | }); |
| | | }, |
| | | |
| | |
| | | delete row.updateUser; |
| | | delete row.updateUser; |
| | | this.initialForm = JSON.stringify(row); //备份 |
| | | this.behavior = '修改信息'; |
| | | this.behavior = "修改信息"; |
| | | this.editForm = JSON.parse(JSON.stringify(row)); |
| | | this.dialogFormVisible = true; |
| | | this.getSelectDictTab(); |
| | | }, |
| | | handleClose(done) { |
| | | this.$confirm('确认关闭?') |
| | | this.$confirm("确认关闭?") |
| | | .then((_) => { |
| | | this.editForm = {}; |
| | | done(); |
| | | }) |
| | | .catch((_) => { }); |
| | | .catch((_) => {}); |
| | | }, |
| | | |
| | | // 提交修改 |
| | | sendEdit() { |
| | | this.$confirm('是否确定编辑?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | this.$confirm("是否确定编辑?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | this.dialogFormVisible = false; |
| | |
| | | this.listData.pageIndex = 1; |
| | | this.getMetaData(); |
| | | this.$message({ |
| | | message: '修改成功', |
| | | type: 'success', |
| | | message: "修改成功", |
| | | type: "success", |
| | | }); |
| | | this.editForm = {}; |
| | | this.dialogFormVisible = false; |
| | |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | alert('修改失败,请重试!'); |
| | | alert("修改失败,请重试!"); |
| | | this.fullscreenLoading = false; |
| | | }); |
| | | }, |
| | |
| | | async download() { |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id) |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | var obj = { |
| | | pwd: encrypt.encrypt(this.codeForm.repassword), |
| | | ids: std |
| | | ids: std, |
| | | }; |
| | | const res = await meta_downloadReq(JSON.stringify(obj)) |
| | | const res = await meta_downloadReq(JSON.stringify(obj)); |
| | | |
| | | if (res.code != 200) { |
| | | this.$message.error('下载请求失败'); |
| | | return |
| | | this.$message.error("下载请求失败"); |
| | | return; |
| | | } |
| | | |
| | | var downObj = { |
| | | guid: res.result, |
| | | pwd: encodeURIComponent(encrypt.encrypt(this.codeForm.repassword)) |
| | | } |
| | | const data = await meta_selectDownloadFile(downObj) |
| | | pwd: encodeURIComponent(encrypt.encrypt(this.codeForm.repassword)), |
| | | }; |
| | | const data = await meta_selectDownloadFile(downObj); |
| | | |
| | | if (data.code != 200) { |
| | | this.$message.error('下载请求失败'); |
| | | return |
| | | this.$message.error("下载请求失败"); |
| | | return; |
| | | } |
| | | var token = getToken() |
| | | var url = BASE_URL + "/meta/downloadFile?token=" + token + "&guid=" + res.result + "&pwd=" + encodeURIComponent(encrypt.encrypt(this.codeForm.repassword)); |
| | | var token = getToken(); |
| | | var url = |
| | | BASE_URL + |
| | | "/meta/downloadFile?token=" + |
| | | token + |
| | | "&guid=" + |
| | | res.result + |
| | | "&pwd=" + |
| | | encodeURIComponent(encrypt.encrypt(this.codeForm.repassword)); |
| | | |
| | | $("#downFrame").attr("src", url).click(); |
| | | this.closeDown(); |
| | | }, |
| | | closeDown() { |
| | | this.showCodeBox = false; |
| | | this.codeForm.password = ''; |
| | | this.codeForm.repassword = ''; |
| | | this.codeForm.password = ""; |
| | | this.codeForm.repassword = ""; |
| | | }, |
| | | downFormData() { |
| | | if (this.multipleSelection.length == 0) { |
| | | alert('请先选择要下载的文件'); |
| | | alert("请先选择要下载的文件"); |
| | | return; |
| | | } |
| | | this.showCodeBox = true; |
| | |
| | | return cloneData.filter((father) => { |
| | | // 循环所有项 |
| | | let branchArr = cloneData.filter((child) => father.id == child.pid); // 对比ID,分别上下级菜单,并返回数据 |
| | | branchArr.length > 0 ? (father.children = branchArr) : ''; // 给父级添加一个children属性,并赋值 |
| | | branchArr.length > 0 ? (father.children = branchArr) : ""; // 给父级添加一个children属性,并赋值 |
| | | return father.pid == 0; // 返回一级菜单 |
| | | }); |
| | | }, |
| | |
| | | padding: 1%; |
| | | |
| | | .inquire { |
| | | position: relative; |
| | | |
| | | padding-bottom: 8px; |
| | | padding: 8px; |
| | | margin-top: 20px; |
| | | |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | |
| | | margin-bottom: 20px; |
| | | .el-form-item { |
| | | margin: 5px; |
| | | } |
| | | } |
| | | .bottom { |
| | | width: 100%; |
| | | margin-top: 1%; |
| | | height: 74%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .rightTable { |
| | | width: 98%; |
| | | height: 92%; |
| | | |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | .table_box { |
| | | width: 100%; |
| | | height: 93%; |
| | | margin: 0 auto; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | <template> |
| | | <div class="verSionBox"> |
| | | <My-bread :list="[ |
| | | <My-bread |
| | | :list="[ |
| | | `${$t('dataManage.dataManage')}`, |
| | | `${$t('dataManage.projectManage')}`, |
| | | ]"></My-bread> |
| | | ]" |
| | | ></My-bread> |
| | | <el-divider /> |
| | | <div class="verSionContent"> |
| | | <div class="verSion_leftTree subpage_Div"> |
| | |
| | | </div> |
| | | <div class="verSion_rightContent subpage_Div"> |
| | | <el-form |
| | | style=" height: 44px; |
| | | padding: 1%; |
| | | display: flex; |
| | | flex-direction: row-reverse; |
| | | border-radius: 5px; |
| | | border: 1px solid #dcdfe6;" |
| | | :inline="true" |
| | | class="demo-form-inline" |
| | | > |
| | | |
| | | <el-form-item> |
| | | <el-button |
| | | v-if="btnStatus.insert" |
| | |
| | | :disabled="count1 != 0 ? true : false" |
| | | type="success" |
| | | size="small" |
| | | >{{ $t('common.append') }}</el-button> |
| | | >{{ $t("common.append") }}</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- <el-divider class="eldivider" /> --> |
| | | <div style="height: 80%; margin-top: 10px;"> |
| | | <div class="table_box" style="height:calc(100% - 89px)"> |
| | | <el-table |
| | | ref="filterTable" |
| | | :data="dbTableData" |
| | | height="100%" |
| | | border |
| | | height="calc(100% - 57px)" |
| | | |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | |
| | | prop="remarks" |
| | | :label="$t('dataManage.projectObj.remarks')" |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | width="200" |
| | | > |
| | | <el-table-column label="操作" width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | v-if="btnStatus.delete" |
| | |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | type="danger" |
| | | >{{ $t('common.delete') }}</el-button> |
| | | >{{ $t("common.delete") }}</el-button |
| | | > |
| | | <el-button |
| | | v-if="btnStatus.update" |
| | | @click="EditProject(scope.row)" |
| | | icon="el-icon-edit" |
| | | type="info" |
| | | size="small" |
| | | >{{ $t('common.update') }}</el-button> |
| | | >{{ $t("common.update") }}</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div |
| | | style="margin-top: 10px" |
| | | class="pagination_box" |
| | | > |
| | | |
| | | </div> |
| | | |
| | | <div style="margin-top: 10px" class="pagination_box"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <el-input v-model="editFrom.projtype"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('dataManage.projectObj.location')"> |
| | | <el-input |
| | | :disabled="true" |
| | | v-model="editFrom.geom" |
| | | ></el-input> |
| | | <el-input :disabled="true" v-model="editFrom.geom"></el-input> |
| | | <el-link |
| | | @click="ShowInner" |
| | | style=" margin-left: 20px" |
| | | style="margin-left: 20px" |
| | | icon="el-icon-plus" |
| | | > |
| | | </el-link> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button |
| | | type="info" |
| | | size="small" |
| | | :disabled="behavior != '新增项目' ? true : false" |
| | | @click="setRestEditFrom" |
| | | >{{ $t('common.reset') }}</el-button> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click="insertEditFrom" |
| | | >{{ |
| | | $t('common.confirm') |
| | | >{{ $t("common.reset") }}</el-button |
| | | > |
| | | <el-button size="small" type="primary" @click="insertEditFrom">{{ |
| | | $t("common.confirm") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | project_delete, |
| | | project_update, |
| | | project_selectLocation, |
| | | } from '../../api/api'; |
| | | import ProjectOl from '../../components/ProjectOl.vue'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | import moment from 'moment'; |
| | | } from "../../api/api"; |
| | | import ProjectOl from "../../components/ProjectOl.vue"; |
| | | import MyBread from "../../components/MyBread.vue"; |
| | | import moment from "moment"; |
| | | |
| | | export default { |
| | | name: 'versionManage', |
| | | name: "versionManage", |
| | | components: { MyBread, ProjectOl }, |
| | | data() { |
| | | return { |
| | |
| | | showMap: false, |
| | | count: null, |
| | | projectFrom: {}, |
| | | editFrom: { geom: ' ' }, |
| | | editFrom: { geom: " " }, |
| | | dirId: null, |
| | | elProject: [], |
| | | dirList: [], //el树数据 |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'name', |
| | | children: "children", |
| | | label: "name", |
| | | }, |
| | | dbTableData: [], |
| | | btnStatus: { |
| | |
| | | this.showMap = true; |
| | | }, |
| | | outerClose(done) { |
| | | this.$confirm('确认关闭?') |
| | | this.$confirm("确认关闭?") |
| | | .then((_) => { |
| | | this.setRestEditFrom(); |
| | | this.getSelectProject(); |
| | | done(); |
| | | }) |
| | | .catch((_) => { }); |
| | | .catch((_) => {}); |
| | | }, |
| | | async innerClose() { |
| | | this.showMap = false; |
| | |
| | | |
| | | var wkt = this.$wkt.parse(this.$store.state.projeOl); |
| | | |
| | | const data = await project_selectLocation({ x: wkt.coordinates[0], y: wkt.coordinates[1] }) |
| | | console.log(data.result) |
| | | const data = await project_selectLocation({ |
| | | x: wkt.coordinates[0], |
| | | y: wkt.coordinates[1], |
| | | }); |
| | | console.log(data.result); |
| | | if (data.code == 200) { |
| | | |
| | | for (var i in data.result) { |
| | | var key = data.result[i].key; |
| | | var val = data.result[i].value; |
| | |
| | | this.editFrom.geom = this.$store.state.projeOl; |
| | | }, |
| | | async insertEditFrom() { |
| | | if (this.behavior == '新增项目') { |
| | | if (this.behavior == "新增项目") { |
| | | this.editFrom.dirid = this.dirId; |
| | | const data = await project_insert(this.editFrom); |
| | | if (data.code != 200) { |
| | | this.$message.error('项目新增失败'); |
| | | this.$message.error("项目新增失败"); |
| | | return; |
| | | } |
| | | this.outerVisible = false; |
| | | } else { |
| | | const data = await project_update(this.editFrom); |
| | | if (data.code != 200) { |
| | | this.$message.error('项目修改失败'); |
| | | this.$message.error("项目修改失败"); |
| | | return; |
| | | } |
| | | this.outerVisible = false; |
| | |
| | | this.setRestEditFrom(); |
| | | }, |
| | | setRestEditFrom() { |
| | | this.editFrom = { geom: ' ' }; |
| | | this.editFrom = { geom: " " }; |
| | | this.$store.state.projeOl = null; |
| | | }, |
| | | |
| | | //删除项目 |
| | | async deleteProject(row) { |
| | | this.$confirm('此操作将永久删除该项目, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | const data = await project_delete({ gid: row.gid }); |
| | | if (data.code == 200) { |
| | | this.$confirm("此操作将永久删除该项目, 是否继续?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(async () => { |
| | | const data = await project_delete({ gid: row.gid }); |
| | | if (data.code == 200) { |
| | | this.$message({ |
| | | message: "删除成功!", |
| | | type: "success", |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: "删除失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | this.$message({ |
| | | message: "删除成功!", |
| | | type: "success", |
| | | type: "info", |
| | | message: "已取消删除", |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: "删除失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | }, |
| | | //修改项目 |
| | | EditProject(row) { |
| | | this.behavior = '修改项目'; |
| | | this.behavior = "修改项目"; |
| | | this.outerVisible = true; |
| | | this.editFrom = row; |
| | | this.$store.state.projeOl = row.geom; |
| | |
| | | //新增项目 |
| | | insertProject() { |
| | | if (this.dirId == null) { |
| | | this.$message.error('请选择需要新增的目录'); |
| | | this.$message.error("请选择需要新增的目录"); |
| | | return; |
| | | } |
| | | this.behavior = '新增项目'; |
| | | this.behavior = "新增项目"; |
| | | this.outerVisible = true; |
| | | }, |
| | | //目录树点击事件 |
| | |
| | | this.listLoader.dirid = this.dirId; |
| | | const data = await project_selectByDirid(this.listLoader); |
| | | if (data.code != 200) { |
| | | this.$message.error('列表获取失败'); |
| | | this.$message.error("列表获取失败"); |
| | | return; |
| | | } |
| | | |
| | |
| | | async getSelectdirTab() { |
| | | const res = await project_selectDirAll(); |
| | | if (res.code != 200) { |
| | | this.$message.error('目录列表获取失败'); |
| | | this.$message.error("目录列表获取失败"); |
| | | return; |
| | | } |
| | | this.dirList = this.treeData(res.result); |
| | |
| | | return cloneData.filter((father) => { |
| | | // 循环所有项 |
| | | let branchArr = cloneData.filter((child) => father.id == child.pid); // 对比ID,分别上下级菜单,并返回数据 |
| | | branchArr.length > 0 ? (father.children = branchArr) : ''; // 给父级添加一个children属性,并赋值 |
| | | branchArr.length > 0 ? (father.children = branchArr) : ""; // 给父级添加一个children属性,并赋值 |
| | | return father.pid == 0; // 返回一级菜单 |
| | | }); |
| | | }, |
| | |
| | | width: 98%; |
| | | padding: 1%; |
| | | .verSionContent { |
| | | width: 100%; |
| | | height: 92%; |
| | | width: 100%; |
| | | height: calc(100% - 75px); |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .verSion_leftTree { |
| | | width: 15%; |
| | | height: 91%; |
| | | |
| | | width: calc(23% - 0px); |
| | | height: 100%; |
| | | padding: 10px; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | max-height: 670px; |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | | } |
| | | .verSion_rightContent { |
| | | width: 80%; |
| | | height: 91%; |
| | | max-height: 670px; |
| | | width: 75%; |
| | | height: 100%; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | overflow-y: auto; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | border: 1px solid #dcdfe6; |
| | | } |
| | | .projectli { |
| | | height: 46px; |
| | |
| | | } |
| | | } |
| | | } |
| | | .demo-form-inline{ |
| | | padding: 8px; |
| | | // margin-top: 10px; |
| | | border-radius: 5px; |
| | | border: 1px solid #dcdfe6; |
| | | margin-bottom: 20px; |
| | | text-align: right; |
| | | .el-form-item { |
| | | margin: 5px; |
| | | } |
| | | } |
| | | </style> |
| | | > |
| | | |
| | |
| | | `${$t('dataManage.styleManage')}`, |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | <div class="searchComp subpage_Div" style="padding: 1%;"> |
| | | <div class="searchComp subpage_Div" ref="container"> |
| | | <el-form |
| | | ref="ruleForm" |
| | | :model="ruleForm" |
| | | :inline="true" |
| | | > |
| | | <el-form-item |
| | | <div class="flex_box"> |
| | | <div style="margin-right: auto"> |
| | | <el-form-item |
| | | :label="$t('dataManage.vmobj.keyword')" |
| | | prop="name" |
| | | > |
| | |
| | | style="width:200px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item style="float: right;"> |
| | | </div> |
| | | <div> |
| | | <el-form-item> |
| | | <el-button |
| | | v-if="btnStatus.insert" |
| | | @click="setInsertShow()" |
| | |
| | | size="small" |
| | | >{{ $t('common.empty') }}</el-button> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </el-form> |
| | | </div> |
| | | <div class="bottom"> |
| | | <div class="rightTable subpage_Div"> |
| | | <div class="table_box"> |
| | | |
| | | <div class="table_box" :style="styleVar"> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | height="95%" |
| | | height="calc(100% - 57px)" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div |
| | | <div |
| | | class="pagination_box" |
| | | > |
| | | <el-pagination |
| | |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div |
| | | class="infoBox subpage_Div box_div" |
| | | v-show="showinfoBox" |
| | |
| | | updateStyle, |
| | | upload_style, |
| | | queryDepTree, |
| | | selectdirTab |
| | | selectdirTab, |
| | | } from "../../api/api"; |
| | | export default { |
| | | name: "styleManage", |
| | |
| | | insertFileName: "", |
| | | insertViewName: "", |
| | | |
| | | insertform: { |
| | | |
| | | }, |
| | | insertform: {}, |
| | | dialogFormVisible: false, |
| | | InsertFormdialog: false, |
| | | showCata: false, |
| | |
| | | editCompanyOption: [], |
| | | editcatalogOption: [], |
| | | cascader: { |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'children', |
| | | label: "name", |
| | | value: "id", |
| | | children: "children", |
| | | checkStrictly: true, |
| | | emitPath: false, |
| | | }, |
| | |
| | | children: "children", |
| | | label: "name", |
| | | }, |
| | | selectOptionWidth: '', |
| | | selectheight: 'auto', |
| | | defaultexpand: false |
| | | selectOptionWidth: "", |
| | | selectheight: "auto", |
| | | defaultexpand: false, |
| | | tableHeight: 0, |
| | | timer: 0, |
| | | styleVar: { |
| | | height: "calc(100% - 109px)", |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getRoleTabelData(); |
| | | this.showPermsBtn(); |
| | | this.getQueryDepTree(); this.getSelectdirTab(); |
| | | this.getQueryDepTree(); |
| | | this.getSelectdirTab(); |
| | | }, |
| | | beforeDestroy() { |
| | | this.timer && clearTimeout(this.timer); |
| | | window.removeEventListener("resize", this.onResize); |
| | | }, |
| | | mounted() { |
| | | window.addEventListener("resize", this.onResize); |
| | | this.calHeight(); |
| | | }, |
| | | methods: { |
| | | onResize() { |
| | | this.timer && clearTimeout(this.timer); |
| | | this.timer = setTimeout(() => { |
| | | this.calHeight(); |
| | | }, 500); |
| | | }, |
| | | calHeight() { |
| | | this.$nextTick(() => { |
| | | const rect = this.$refs.container.getBoundingClientRect(); |
| | | this.tableHeight = `${rect.height + 97}px`; |
| | | this.styleVar["height"] = `calc(100% - ${rect.height + 97}px)`; |
| | | }); |
| | | }, |
| | | showPermsBtn() { |
| | | let currentPerms = this.$store.state.currentPerms; |
| | | let permsEntity = this.$store.state.permsEntity; |
| | |
| | | document.getElementById("insertFile").value = ""; |
| | | document.getElementById("insertimageFile").value = ""; |
| | | |
| | | this.guidFile = ''; |
| | | this.fileGuid = ''; |
| | | this.guidFile = ""; |
| | | this.fileGuid = ""; |
| | | }, |
| | | getInsertFile(res) { |
| | | if (res == 0) { |
| | |
| | | } |
| | | }, |
| | | insertFileData: function (res) { |
| | | |
| | | |
| | | if (res == 0) { |
| | | let val = document.getElementById("insertFile").files; |
| | | |
| | |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | this.$confirm('此操作将永久删除该样式, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | const data = await deleteStyles({ ids: std.toString() }); |
| | | if (data.code == 200) { |
| | | this.$confirm("此操作将永久删除该样式, 是否继续?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(async () => { |
| | | const data = await deleteStyles({ ids: std.toString() }); |
| | | if (data.code == 200) { |
| | | this.$message({ |
| | | message: "删除成功!", |
| | | type: "success", |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: "删除失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | this.$message({ |
| | | message: "删除成功!", |
| | | type: "success", |
| | | type: "info", |
| | | message: "已取消删除", |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: "删除失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | }, |
| | | showDirTree(res) { |
| | | this.dirFlag = res; |
| | |
| | | }, |
| | | insertFromDataClose() { |
| | | this.InsertFormdialog = false; |
| | | this.insertform = { |
| | | |
| | | } |
| | | this.insertform = {}; |
| | | this.insertFileGuid = ""; |
| | | this.insertViewGuid = "" |
| | | this.insertViewGuid = ""; |
| | | this.filesReset(); |
| | | }, |
| | | handleClose() { |
| | |
| | | this.insertform = { |
| | | fileGuid: null, |
| | | viewGuid: null, |
| | | } |
| | | }; |
| | | this.filesReset(); |
| | | }, |
| | | async insertFromData() { |
| | |
| | | this.insertform = { |
| | | fileGuid: null, |
| | | viewGuid: null, |
| | | } |
| | | }; |
| | | this.insertFileGuid = ""; |
| | | this.insertViewGuid = "" |
| | | this.insertViewGuid = ""; |
| | | this.filesReset(); |
| | | this.$message({ |
| | | message: "添加成功!", |
| | |
| | | } |
| | | this.listData.name = this.ruleForm.name; |
| | | const data = await select_Style_ByPageAndCount(this.listData); |
| | | |
| | | |
| | | if (data.code != 200) { |
| | | this.$message.error("列表调用失败"); |
| | | } |
| | |
| | | if (!val || !val.length) return; |
| | | var formData = new FormData(); |
| | | formData.append("file0", val[0]); |
| | | var res = $.ajax(+ "/style/upload", { |
| | | var res = $.ajax(+"/style/upload", { |
| | | type: "post", |
| | | data: formData, |
| | | async: false, |
| | |
| | | }, |
| | | |
| | | handleEdit(index, row) { |
| | | |
| | | this.upflag = true; |
| | | this.dialogFormVisible = true; |
| | | this.upform = row; |
| | |
| | | }); |
| | | this.startFromData(); |
| | | }) |
| | | .catch(() => { }); |
| | | .catch(() => {}); |
| | | }, |
| | | // 获取多选 |
| | | |
| | |
| | | catalogChange(res) { |
| | | this.insertform.dirid = res; |
| | | this.upform.dirid = res; |
| | | |
| | | }, |
| | | handcatalogChange(data, node, nodeData) { |
| | | this.$set(this.insertform, 'dirid', data.id) |
| | | this.$set(this.insertform, 'dirName', data.name) |
| | | this.$set(this.insertform, "dirid", data.id); |
| | | this.$set(this.insertform, "dirName", data.name); |
| | | // this.insertform.dirid = data.id; |
| | | // this.insertform.dirName = data.name |
| | | }, |
| | | handleNodeClickto(data, node, nodeData) { |
| | | this.insertform.depid = data.id |
| | | this.insertform.depid = data.id; |
| | | this.upform.dirid = data.id; |
| | | this.upform.dirName = data.name; |
| | | }, |
| | |
| | | }, |
| | | companyChange(res) { |
| | | this.insertform.depid = res; |
| | | |
| | | }, |
| | | handcompanyChange(data, node, nodeData) { |
| | | this.$set(this.insertform, 'depid', data.id) |
| | | this.$set(this.insertform, "depid", data.id); |
| | | // this.insertform.depid = data.id; |
| | | this.$set(this.insertform, 'depName', data.name) |
| | | this.$set(this.insertform, "depName", data.name); |
| | | // this.insertform.depName = data.name; |
| | | }, |
| | | //新增数据 |
| | | setInsertShow() { |
| | | this.InsertFormdialog = true; |
| | | this.$set(this, 'insertform', {}) |
| | | this.$set(this, "insertform", {}); |
| | | }, |
| | | //目录列表获取 |
| | | async getSelectdirTab() { |
| | | const res = await selectdirTab(); |
| | | if (res.code != 200) { |
| | | this.$message.error('目录列表获取失败'); |
| | | this.$message.error("目录列表获取失败"); |
| | | return; |
| | | } |
| | | this.insertform.dirid = 1; |
| | |
| | | async getQueryDepTree() { |
| | | const res = await queryDepTree(); |
| | | if (res.code != 200) { |
| | | this.$message.error('单位列表获取失败'); |
| | | this.$message.error("单位列表获取失败"); |
| | | return; |
| | | } |
| | | this.insertform.depid = 1; |
| | |
| | | this.editCompanyOption = this.treeData(res.result); |
| | | }, |
| | | handleNodeClick(data, node, nodeData) { |
| | | this.upform.depid = data.id |
| | | this.upform.depid = data.id; |
| | | this.upform.depName = data.name; |
| | | }, |
| | | //树列表生成 |
| | |
| | | return cloneData.filter((father) => { |
| | | // 循环所有项 |
| | | let branchArr = cloneData.filter((child) => father.id == child.pid); // 对比ID,分别上下级菜单,并返回数据 |
| | | branchArr.length > 0 ? (father.children = branchArr) : ''; // 给父级添加一个children属性,并赋值 |
| | | branchArr.length > 0 ? (father.children = branchArr) : ""; // 给父级添加一个children属性,并赋值 |
| | | return father.pid == 0; // 返回一级菜单 |
| | | }); |
| | | }, |
| | | setOptionWidth(event) { |
| | | // 下拉框聚焦,设置弹框的宽度 |
| | | this.$nextTick(() => { |
| | | this.selectOptionWidth = event.srcElement.offsetWidth + 'px'; |
| | | this.selectOptionWidth = event.srcElement.offsetWidth + "px"; |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | } |
| | | |
| | | .searchComp { |
| | | margin: 10px auto; |
| | | padding: 8px; |
| | | margin-top: 20px; |
| | | |
| | | border-radius: 5px; |
| | | |
| | | margin-bottom: 20px; |
| | | .el-form-item { |
| | | margin: 5px; |
| | | } |
| | | .el-input { |
| | | width: 467px; |
| | | } |
| | | // .el-input { |
| | | // width: 467px; |
| | | // } |
| | | } |
| | | .leftTree { |
| | | position: absolute; |
| | |
| | | margin: 10px auto 0; |
| | | } |
| | | } |
| | | .bottom { |
| | | width: 100%; |
| | | margin-top: 1%; |
| | | height: 74%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .rightTable { |
| | | width: 98%; |
| | | height: 92%; |
| | | |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | .table_box { |
| | | width: 100%; |
| | | height: 93%; |
| | | margin: 0 auto; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | } |
| | | .BoxFlex { |
| | | display: flex; |
| | | justify-content: space-around; |
| | |
| | | <template> |
| | | <div class="verSionBox"> |
| | | <My-bread :list="[ |
| | | <My-bread |
| | | :list="[ |
| | | `${$t('dataManage.dataManage')}`, |
| | | `${$t('dataManage.versionManage')}`, |
| | | ]"></My-bread> |
| | | ]" |
| | | ></My-bread> |
| | | <el-divider /> |
| | | <div class="inquire subpage_Div"> |
| | | <el-form |
| | | ref="ruleForm" |
| | | :model="ruleForm" |
| | | :inline="true" |
| | | > |
| | | <el-form-item> |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="ruleForm.dirid" |
| | | placeholder="请选择" |
| | | style="width:200px" |
| | | > |
| | | <el-option |
| | | :value="ruleForm.dirid" |
| | | :label="ruleForm.depName" |
| | | style=" height:auto" |
| | | > |
| | | <el-tree |
| | | ref="tree" |
| | | :data="companyOption" |
| | | node-key="id" |
| | | :props="props" |
| | | @node-click="handleChange" |
| | | /> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-cascader |
| | | <div class="inquire subpage_Div" ref="container"> |
| | | <el-form ref="ruleForm" :model="ruleForm" :inline="true"> |
| | | <div class="flex_box"> |
| | | <div style="margin-right: auto"> |
| | | <el-form-item> |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="ruleForm.dirid" |
| | | placeholder="请选择" |
| | | style="width: 200px" |
| | | > |
| | | <el-option |
| | | :value="ruleForm.dirid" |
| | | :label="ruleForm.depName" |
| | | style="height: auto" |
| | | > |
| | | <el-tree |
| | | ref="tree" |
| | | :data="companyOption" |
| | | node-key="id" |
| | | :props="props" |
| | | @node-click="handleChange" |
| | | /> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-cascader |
| | | v-model="ruleForm.dirid" |
| | | :show-all-levels="false" |
| | | :options="companyOption" |
| | |
| | | emitPath: false, |
| | | }" |
| | | ></el-cascader> --> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-input |
| | | v-model="ruleForm.name" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item style="float: right;"> |
| | | <el-button |
| | | type="success" |
| | | v-if="btnStatus.insert" |
| | | @click="(InsertFormdialog = true), getSelectdirTab()" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | >{{ $t('common.append') }}</el-button> |
| | | <el-button |
| | | @click="onSubmit('ruleForm')" |
| | | icon="el-icon-search" |
| | | size="small" |
| | | class="primary" |
| | | >{{ $t('common.iquery') }}</el-button> |
| | | <el-button |
| | | type="info" |
| | | @click="resetForm('ruleForm')" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | >{{ $t('common.empty') }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="bottom"> |
| | | <div class="rightTable subpage_Div"> |
| | | <div class="table_box"> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | height="95%" |
| | | > |
| | | <el-table-column |
| | | align="center" |
| | | type="index" |
| | | :label="$t('dataManage.vmobj.index')" |
| | | width="70px" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="id" |
| | | v-if="false" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="name" |
| | | :label="$t('common.versionName')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="depName" |
| | | :label="$t('dataManage.vmobj.catalogue')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="descr" |
| | | :label="$t('dataManage.vmobj.describe')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="createName" |
| | | :label="$t('dataManage.vmobj.createonuser')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="createTime" |
| | | :label="$t('dataManage.vmobj.createontime')" |
| | | :formatter="formatTime" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="UpdateUser" |
| | | :label="$t('dataManage.vmobj.updateonuser')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="updateTime" |
| | | :label="$t('dataManage.vmobj.updateontime')" |
| | | :formatter="formatTime" |
| | | /> |
| | | <el-table-column |
| | | min-width="150" |
| | | :label="$t('common.operate')" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | v-if="btnStatus.update" |
| | | @click=" |
| | | handleEdit(scope.$index, scope.row); |
| | | getSelectdirTab(); |
| | | " |
| | | type="warning" |
| | | size="small" |
| | | >{{ $t('common.update') }}</el-button> |
| | | <el-button |
| | | v-if="btnStatus.delete" |
| | | @click="handleDelete(scope.$index, scope.row)" |
| | | type="danger" |
| | | size="small" |
| | | >{{ $t('common.delete') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div |
| | | class="pagination_box" |
| | | > |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="listData.pageIndex" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :page-size="listData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="count" |
| | | > |
| | | </el-pagination> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-input |
| | | v-model="ruleForm.name" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | </div> |
| | | <div> |
| | | <el-form-item> |
| | | <el-button |
| | | type="success" |
| | | v-if="btnStatus.insert" |
| | | @click="(InsertFormdialog = true), getSelectdirTab()" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | >{{ $t("common.append") }}</el-button |
| | | > |
| | | <el-button |
| | | @click="onSubmit('ruleForm')" |
| | | icon="el-icon-search" |
| | | size="small" |
| | | class="primary" |
| | | >{{ $t("common.iquery") }}</el-button |
| | | > |
| | | <el-button |
| | | type="info" |
| | | @click="resetForm('ruleForm')" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | >{{ $t("common.empty") }}</el-button |
| | | > |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <div class="table_box" :style="styleVar"> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | height="calc(100% - 57px)" |
| | | > |
| | | <el-table-column |
| | | align="center" |
| | | type="index" |
| | | :label="$t('dataManage.vmobj.index')" |
| | | width="70px" |
| | | /> |
| | | <el-table-column align="center" prop="id" v-if="false" /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="name" |
| | | :label="$t('common.versionName')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="depName" |
| | | :label="$t('dataManage.vmobj.catalogue')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="descr" |
| | | :label="$t('dataManage.vmobj.describe')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="createName" |
| | | :label="$t('dataManage.vmobj.createonuser')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="createTime" |
| | | :label="$t('dataManage.vmobj.createontime')" |
| | | :formatter="formatTime" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="UpdateUser" |
| | | :label="$t('dataManage.vmobj.updateonuser')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="updateTime" |
| | | :label="$t('dataManage.vmobj.updateontime')" |
| | | :formatter="formatTime" |
| | | /> |
| | | <el-table-column min-width="150" :label="$t('common.operate')"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | v-if="btnStatus.update" |
| | | @click=" |
| | | handleEdit(scope.$index, scope.row); |
| | | getSelectdirTab(); |
| | | " |
| | | type="warning" |
| | | size="small" |
| | | >{{ $t("common.update") }}</el-button |
| | | > |
| | | <el-button |
| | | v-if="btnStatus.delete" |
| | | @click="handleDelete(scope.$index, scope.row)" |
| | | type="danger" |
| | | size="small" |
| | | >{{ $t("common.delete") }}</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="pagination_box"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="listData.pageIndex" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :page-size="listData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="count" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :title="$t('dataManage.vmobj.editVersion')" |
| | | :visible.sync="dialogFormVisible" |
| | |
| | | :label="$t('dataManage.vmobj.catalogue')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="upform.dirid" |
| | | placeholder="请选择" |
| | | style="width:300px" |
| | | style="width: 300px" |
| | | > |
| | | <el-option |
| | | :value="upform.dirid" |
| | | :label="upform.depName" |
| | | style=" height:auto" |
| | | style="height: auto" |
| | | > |
| | | <el-tree |
| | | ref="tree" |
| | |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div |
| | | slot="footer" |
| | | type="info" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button |
| | | size="small" |
| | | @click="editFromDataClose" |
| | | >{{ |
| | | $t('common.close') |
| | | <div slot="footer" type="info" class="dialog-footer"> |
| | | <el-button size="small" @click="editFromDataClose">{{ |
| | | $t("common.close") |
| | | }}</el-button> |
| | | <el-button |
| | | size="small" |
| | | @click="editFromData" |
| | | class="primary" |
| | | >{{ |
| | | $t('common.confirm') |
| | | <el-button size="small" @click="editFromData" class="primary">{{ |
| | | $t("common.confirm") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | :label="$t('dataManage.vmobj.catalogue')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="insertform.path" |
| | | placeholder="请选择" |
| | | style="width:300px" |
| | | style="width: 300px" |
| | | > |
| | | <el-option |
| | | :value="insertform.path" |
| | | :label="insertform.dirName" |
| | | style=" height:auto" |
| | | style="height: auto" |
| | | > |
| | | <el-tree |
| | | ref="tree" |
| | |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button |
| | | @click="insertFromDataClose" |
| | | type="info" |
| | | size="small" |
| | | >{{ |
| | | $t('common.close') |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="insertFromDataClose" type="info" size="small">{{ |
| | | $t("common.close") |
| | | }}</el-button> |
| | | <el-button |
| | | @click="insertFromData" |
| | | class="primary" |
| | | size="small" |
| | | >{{ |
| | | $t('common.confirm') |
| | | <el-button @click="insertFromData" class="primary" size="small">{{ |
| | | $t("common.confirm") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | deleteVersion, |
| | | updateVersion, |
| | | selectdirTab, |
| | | } from '../../api/api'; |
| | | import verDirTree from './verDirTree.vue'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | import verDirTrees from './verDirTrees.vue'; |
| | | import moment from 'moment'; |
| | | } from "../../api/api"; |
| | | import verDirTree from "./verDirTree.vue"; |
| | | import MyBread from "../../components/MyBread.vue"; |
| | | import verDirTrees from "./verDirTrees.vue"; |
| | | import moment from "moment"; |
| | | export default { |
| | | name: 'versionManage', |
| | | name: "versionManage", |
| | | components: { MyBread, verDirTree, verDirTrees }, |
| | | data() { |
| | | return { |
| | | props: { |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'children', |
| | | label: "name", |
| | | value: "id", |
| | | children: "children", |
| | | checkStrictly: true, |
| | | emitPath: false, |
| | | }, |
| | | catalogOption: [], |
| | | editcatalogOption: [], |
| | | showCata: false, |
| | | formLabelWidth: '100px', |
| | | formLabelWidth: "100px", |
| | | dialogFormVisible: false, |
| | | InsertFormdialog: false, |
| | | showinfoBox: false, |
| | |
| | | pageSize: 10, |
| | | }, |
| | | cascader: { |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'children', |
| | | label: "name", |
| | | value: "id", |
| | | children: "children", |
| | | checkStrictly: true, |
| | | emitPath: false, |
| | | }, |
| | |
| | | insert: false, |
| | | update: false, |
| | | }, |
| | | |
| | | tableHeight: 0, |
| | | timer: 0, |
| | | styleVar: { |
| | | height: "calc(100% - 109px)", |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getQueryDirTree(); |
| | | this.getRoleTabelData(); |
| | | this.showPermsBtn(); |
| | | this.$set(this.ruleForm, 'depName', '请选择') |
| | | this.$set(this.ruleForm, "depName", "请选择"); |
| | | }, |
| | | computed: { |
| | | pathId() { |
| | | return this.$store.state.cataNode.id; |
| | | }, |
| | | }, |
| | | |
| | | beforeDestroy() { |
| | | this.timer && clearTimeout(this.timer); |
| | | window.removeEventListener("resize", this.onResize); |
| | | }, |
| | | mounted() { |
| | | window.addEventListener("resize", this.onResize); |
| | | this.calHeight(); |
| | | }, |
| | | methods: { |
| | | onResize() { |
| | | this.timer && clearTimeout(this.timer); |
| | | this.timer = setTimeout(() => { |
| | | this.calHeight(); |
| | | }, 500); |
| | | }, |
| | | calHeight() { |
| | | this.$nextTick(() => { |
| | | const rect = this.$refs.container.getBoundingClientRect(); |
| | | this.tableHeight = `${rect.height + 97}px`; |
| | | this.styleVar["height"] = `calc(100% - ${rect.height + 97}px)`; |
| | | }); |
| | | }, |
| | | //目录切换 |
| | | catalogChange(value) { |
| | | this.insertform.dirid = value; |
| | | }, |
| | | catalogChangeAdd (data, node, nodeData) { |
| | | this.$set(this.insertform, 'path', data.id) |
| | | this.$set(this.insertform, 'dirName', data.name) |
| | | catalogChangeAdd(data, node, nodeData) { |
| | | this.$set(this.insertform, "path", data.id); |
| | | this.$set(this.insertform, "dirName", data.name); |
| | | }, |
| | | upCatalogChange(val) { |
| | | this.upform.dirid == val; |
| | | }, |
| | | handlupCatalogChange(data, node, nodeData) { |
| | | this.$set(this.upform, 'dirid', data.id) |
| | | this.$set(this.upform, 'depName', data.name) |
| | | this.$set(this.upform, "dirid", data.id); |
| | | this.$set(this.upform, "depName", data.name); |
| | | // this.upform.dirid == data.id; |
| | | // this.upform.depName = data.name; |
| | | }, |
| | |
| | | async getQueryDirTree() { |
| | | const res = await selectdirTab(); |
| | | if (res.code != 200) { |
| | | this.$message.error('目录列表获取失败'); |
| | | this.$message.error("目录列表获取失败"); |
| | | return; |
| | | } |
| | | this.companyOption = this.treeData(res.result); |
| | | this.ruleForm.dirid = this.companyOption[0].id |
| | | |
| | | this.ruleForm.dirid = this.companyOption[0].id; |
| | | }, |
| | | handleChange (data, node, nodeData) { |
| | | this.$set(this.ruleForm, 'dirid', data.id) |
| | | this.$set(this.ruleForm, 'depName', data.name) |
| | | handleChange(data, node, nodeData) { |
| | | this.$set(this.ruleForm, "dirid", data.id); |
| | | this.$set(this.ruleForm, "depName", data.name); |
| | | // this.ruleForm.dirid = data.id; |
| | | // this.ruleForm.depName = data.name; |
| | | this.onSubmit(); |
| | |
| | | async getSelectdirTab() { |
| | | const res = await selectdirTab(); |
| | | if (res.code != 200) { |
| | | this.$message.error('目录列表获取失败'); |
| | | this.$message.error("目录列表获取失败"); |
| | | return; |
| | | } |
| | | this.insertform.name = this.getYMD(); |
| | |
| | | let myYear = myDate.getFullYear(); //获取完整的年份(4位,1970-????) |
| | | let myMonth = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月) |
| | | let myToday = myDate.getDate(); //获取当前日(1-31) |
| | | myMonth = myMonth > 9 ? myMonth : '0' + myMonth; |
| | | myToday = myToday > 9 ? myToday : '0' + myToday; |
| | | let nowDate = 'V' + myYear + myMonth + myToday; |
| | | myMonth = myMonth > 9 ? myMonth : "0" + myMonth; |
| | | myToday = myToday > 9 ? myToday : "0" + myToday; |
| | | let nowDate = "V" + myYear + myMonth + myToday; |
| | | return nowDate; |
| | | }, |
| | | |
| | |
| | | return cloneData.filter((father) => { |
| | | // 循环所有项 |
| | | let branchArr = cloneData.filter((child) => father.id == child.pid); // 对比ID,分别上下级菜单,并返回数据 |
| | | branchArr.length > 0 ? (father.children = branchArr) : ''; // 给父级添加一个children属性,并赋值 |
| | | branchArr.length > 0 ? (father.children = branchArr) : ""; // 给父级添加一个children属性,并赋值 |
| | | return father.pid == 0; // 返回一级菜单 |
| | | }); |
| | | }, |
| | |
| | | }, |
| | | resetForm() { |
| | | this.ruleForm = {}; |
| | | this.ruleForm.dirid = this.companyOption[0].id |
| | | this.ruleForm.dirid = this.companyOption[0].id; |
| | | this.$store.state.verCateNode = {}; |
| | | this.$bus.$emit('clearTressLabel', true); |
| | | this.$bus.$emit("clearTressLabel", true); |
| | | this.getRoleTabelData(); |
| | | }, |
| | | onSubmit() { |
| | |
| | | this.getRoleTabelData(); |
| | | }, |
| | | async getRoleTabelData() { |
| | | if (this.listData.tab == '') { |
| | | if (this.listData.tab == "") { |
| | | delete this.listData.tab; |
| | | } |
| | | |
| | |
| | | const data = await select_Ver_ByPageAndCount(this.listData); |
| | | |
| | | if (data.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | | this.$message.error("列表调用失败"); |
| | | } |
| | | this.tableData = data.result; |
| | | this.count = data.count; |
| | |
| | | async editFromData() { |
| | | if (this.upform.depName == null) { |
| | | this.$message({ |
| | | message: '请选择角色所属单位', |
| | | type: 'warning', |
| | | message: "请选择角色所属单位", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | |
| | | this.dialogFormVisible = false; |
| | | this.upform = {}; |
| | | this.$message({ |
| | | message: '修改成功!', |
| | | type: 'success', |
| | | message: "修改成功!", |
| | | type: "success", |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '修改失败!', |
| | | type: 'warning', |
| | | message: "修改失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }, |
| | |
| | | async insertFromData() { |
| | | if (this.insertform.dirid == null) { |
| | | this.$message({ |
| | | message: '请选择角色所属单位', |
| | | type: 'warning', |
| | | message: "请选择角色所属单位", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | |
| | | this.InsertFormdialog = false; |
| | | this.insertform = {}; |
| | | this.$message({ |
| | | message: '添加成功!', |
| | | type: 'success', |
| | | message: "添加成功!", |
| | | type: "success", |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '添加失败!', |
| | | type: 'warning', |
| | | message: "添加失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }, |
| | | formatTime(row, column) { |
| | | let date = row[column.property]; |
| | | if (date === undefined || date === null) { |
| | | return ''; |
| | | return ""; |
| | | } |
| | | return moment(parseInt(date)).format('YYYY-MM-DD HH:mm:ss'); |
| | | return moment(parseInt(date)).format("YYYY-MM-DD HH:mm:ss"); |
| | | }, |
| | | handleDelete(index, row) { |
| | | this.$confirm('此操作将永久删除该版本信息, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | this.$confirm("此操作将永久删除该版本信息, 是否继续?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(async () => { |
| | | const data = await deleteVersion(row.id); |
| | | if (data.code == 200) { |
| | | this.InsertFormdialog = false; |
| | | this.$message({ |
| | | message: '删除成功!', |
| | | type: 'success', |
| | | message: "删除成功!", |
| | | type: "success", |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '删除失败!', |
| | | type: 'warning', |
| | | message: "删除失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }).catch(() => { |
| | | }) |
| | | .catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | type: "info", |
| | | message: "已取消删除", |
| | | }); |
| | | }); |
| | | }, |
| | | handleEdit(index, row) { |
| | |
| | | watch: { |
| | | pathId: { |
| | | immediate: true, |
| | | handler(val) { }, |
| | | handler(val) {}, |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | } |
| | | } |
| | | .inquire { |
| | | position: relative; |
| | | padding: 8px; |
| | | margin-top: 20px; |
| | | |
| | | padding-bottom: 8px; |
| | | border-radius: 5px; |
| | | |
| | | margin-bottom: 20px; |
| | | .el-form-item { |
| | | margin: 5px; |
| | | } |
| | | } |
| | | .bottom { |
| | | width: 100%; |
| | | margin-top: 1%; |
| | | height: 74%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .rightTable { |
| | | width: 98%; |
| | | height: 92%; |
| | | |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | .el-form-item { |
| | | margin: 5px; |
| | | .table_box { |
| | | width: 100%; |
| | | height: 93%; |
| | | margin: 0 auto; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | .bottom { |
| | | width: 100%; |
| | | margin-top: 1%; |
| | | height: 74%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .rightTable { |
| | | width: 98%; |
| | | height: 92%; |
| | | |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | .table_box { |
| | | width: 100%; |
| | | height: 93%; |
| | | margin: 0 auto; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |