| | |
| | | export function select_meta_ByPageAndCount(params) { |
| | | return request.get('/meta/selectByPageAndCount', { params: params }); |
| | | } |
| | | // //元数据管理列表新增 |
| | | //元数据管理列表新增 |
| | | export function insertMeta(params) { |
| | | return request.post('/meta/insert', params); |
| | | } |
| | |
| | | >查询</el-button |
| | | > |
| | | <el-button |
| | | |
| | | @click="resetForm('ruleForm')" |
| | | icon="el-icon-refresh" |
| | | type="info" |
| | |
| | | >重置</el-button |
| | | > |
| | | <el-button |
| | | v-if="btnStatus.delete" |
| | | @click="DelFormData" |
| | | icon="el-icon-delete" |
| | | type="danger" |
| | |
| | | currentPage: 1, |
| | | searchName: "", |
| | | multipleSelection: [], |
| | | btnStatus: { |
| | | select: false, |
| | | delete: false, |
| | | upload: false, |
| | | download: false, |
| | | insert: false, |
| | | update: false, |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | // this.getSPData(10, 1, ""); |
| | | // this.getSPCount(""); |
| | | this.showPermsBtn(); |
| | | }, |
| | | methods: { |
| | | showPermsBtn() { |
| | | let currentPerms = this.$store.state.currentPerms; |
| | | let permsEntity = this.$store.state.permsEntity; |
| | | permsEntity |
| | | .filter((item) => item.perms == currentPerms) |
| | | .map((item) => (this.btnStatus[item.tag.substr(1)] = true)); |
| | | }, |
| | | handleNodeClick(data) { |
| | | this.closeDetial(); |
| | | this.changePag = false; |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | btnStatus: { |
| | | select: false, |
| | | delete: false, |
| | | upload: false, |
| | | download: false, |
| | | insert: false, |
| | | update: false, |
| | | }, |
| | | options: [ |
| | | { |
| | | value: "DEM", |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | //显示权限按钮 |
| | | showPermsBtn() { |
| | | let currentPerms = this.$store.state.currentPerms; |
| | | let permsEntity = this.$store.state.permsEntity; |
| | | permsEntity |
| | | .filter((item) => item.perms == currentPerms) |
| | | .map((item) => (this.btnStatus[item.tag.substr(1)] = true)); |
| | | }, |
| | | startFromData() { |
| | | this.count = 0; |
| | | this.pageSize = 1; |
| | |
| | | >选择</el-button |
| | | > |
| | | <p class="show"></p> |
| | | |
| | | <el-button |
| | | v-if="btnStatus.upload" |
| | | @click="uploadFile" |
| | | icon="el-icon-thumb" |
| | | type="success" |
| | |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | pageNum: 1, |
| | | btnStatus: { |
| | | select: false, |
| | | delete: false, |
| | | upload: false, |
| | | download: false, |
| | | insert: false, |
| | | update: false, |
| | | }, |
| | | }; |
| | | }, |
| | | |
| | |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getMetaData(10, 1); |
| | | this.getMetaCount(""); |
| | | // this.getMetaData(10, 1); |
| | | // this.getMetaCount(""); |
| | | this.showPermsBtn(); |
| | | }, |
| | | methods: { |
| | | showPermsBtn() { |
| | | let currentPerms = this.$store.state.currentPerms; |
| | | let permsEntity = this.$store.state.permsEntity; |
| | | permsEntity |
| | | .filter((item) => item.perms == currentPerms) |
| | | .map((item) => (this.btnStatus[item.tag.substr(1)] = true)); |
| | | }, |
| | | // 请求数据 |
| | | getMetaData(size, index) { |
| | | queryUploadData(size, index).then((res) => { |
| | |
| | | <el-divider /> |
| | | <div class="searchComp"> |
| | | <el-form ref="ruleForm" :model="ruleForm" :inline="true"> |
| | | <el-form-item :label="$t('dataManage.dictionaryManageObj.tableName')" prop="name"> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.tableName')" |
| | | prop="name" |
| | | > |
| | | <el-select |
| | | clearable |
| | | v-model="queryName" |
| | |
| | | <el-form-item> |
| | | <el-button |
| | | @click="InsertFormdialog = true" |
| | | v-if="btnStatus.insert" |
| | | icon="el-icon-edit" |
| | | type="success" |
| | | size="small" |
| | | >{{$t('dataManage.dictionaryManageObj.add')}}</el-button |
| | | >{{ $t("dataManage.dictionaryManageObj.add") }}</el-button |
| | | > |
| | | <el-button |
| | | v-if="btnStatus.delete" |
| | | @click="DelFormData" |
| | | icon="el-icon-delete" |
| | | type="danger" |
| | | size="small" |
| | | >{{$t('dataManage.dictionaryManageObj.del')}}</el-button |
| | | >{{ $t("dataManage.dictionaryManageObj.del") }}</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | height="98%" |
| | | > |
| | | <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 |
| | | 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.updatePersonnel')" |
| | | /> |
| | | |
| | | <el-table-column min-width="70" :label="$t('dataManage.dictionaryManageObj.operation')"> |
| | | <el-table-column |
| | | min-width="70" |
| | | :label="$t('dataManage.dictionaryManageObj.operation')" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-link @click="showDetail(scope.$index, scope.row)" |
| | | >{{$t('dataManage.dictionaryManageObj.lookOver')}}</el-link |
| | | <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 |
| | | >{{ $t("dataManage.dictionaryManageObj.revamp") }}</el-link |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <div class="infoBox" v-show="showinfoBox"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>{{$t('dataManage.dictionaryManageObj.particulars')}}</span> |
| | | <span>{{ $t("dataManage.dictionaryManageObj.particulars") }}</span> |
| | | <div style="float: right; cursor: pointer" @click="closeDetial"> |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | </div> |
| | | <div class="contentBox"> |
| | | <p>{{$t('dataManage.dictionaryManageObj.tableName')}}:{{ itemdetail.tab }}</p> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.tableName") }}:{{ |
| | | itemdetail.tab |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>{{$t('dataManage.dictionaryManageObj.tableAliasName')}}:{{ itemdetail.tabDesc }}</p> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.tableAliasName") }}:{{ |
| | | itemdetail.tabDesc |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <!-- <p>表类型:{{ itemdetail.type }}</p> |
| | | <el-divider></el-divider> --> |
| | | <p>{{$t('dataManage.dictionaryManageObj.fieldName')}}:{{ itemdetail.field }}</p> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.fieldName") }}:{{ |
| | | itemdetail.field |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>{{$t('dataManage.dictionaryManageObj.fieldAliasName')}}:{{ itemdetail.alias }}</p> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.fieldAliasName") }}:{{ |
| | | itemdetail.alias |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>{{$t('dataManage.dictionaryManageObj.fieldType')}}:{{ itemdetail.type }}</p> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.fieldType") }}:{{ |
| | | itemdetail.type |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>{{$t('dataManage.dictionaryManageObj.fieldLength')}}:{{ itemdetail.len }}</p> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.fieldLength") }}:{{ |
| | | itemdetail.len |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>{{$t('dataManage.dictionaryManageObj.FieldPrecision')}}:{{ itemdetail.precision }}</p> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.FieldPrecision") }}:{{ |
| | | itemdetail.precision |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <!-- <p>值域关联表:{{ itemdetail.domain_name }}</p> |
| | | <el-divider></el-divider> --> |
| | | <p>{{$t('dataManage.dictionaryManageObj.remark')}}:{{ itemdetail.bak }}</p> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.remark") }}:{{ |
| | | itemdetail.bak |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>{{$t('dataManage.dictionaryManageObj.creationTime')}}:{{ itemdetail.createTime }}</p> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.creationTime") }}:{{ |
| | | itemdetail.createTime |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>{{$t('dataManage.dictionaryManageObj.createPersonnel')}}:{{ itemdetail.createUser }}</p> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.createPersonnel") }}:{{ |
| | | itemdetail.createUser |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>{{$t('dataManage.dictionaryManageObj.updateTime')}}:{{ itemdetail.updateTime }}</p> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.updateTime") }}:{{ |
| | | itemdetail.updateTime |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>{{$t('dataManage.dictionaryManageObj.updatePersonnel')}}:{{ itemdetail.updateUser }}</p> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.updatePersonnel") }}:{{ |
| | | itemdetail.updateUser |
| | | }} |
| | | </p> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | |
| | | :visible.sync="dialogFormVisible" |
| | | > |
| | | <el-form :model="upform"> |
| | | <el-form-item :label="$t('dataManage.dictionaryManageObj.number')" :label-width="formLabelWidth"> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.number')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <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-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.tableName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <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-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.tableAliasName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="upform.tabDesc" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="类型" :label-width="formLabelWidth"> |
| | |
| | | <el-option label="面几何" value="面几何"></el-option> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldName')" :label-width="formLabelWidth"> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <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-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldAliasName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <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-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldType')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <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-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldLength')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <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-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.FieldPrecision')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="upform.precision" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="值域名称" :label-width="formLabelWidth"> |
| | | <el-input v-model="upform.domain_name" autocomplete="off"></el-input> |
| | | </el-form-item> --> |
| | | <el-form-item :label="$t('dataManage.dictionaryManageObj.remark')" :label-width="formLabelWidth"> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.remark')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="upform.bak" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogFormVisible = false">{{$t('dataManage.dictionaryManageObj.cancel')}}</el-button> |
| | | <el-button type="primary" @click="updateForm">{{$t('dataManage.dictionaryManageObj.confirm')}}</el-button> |
| | | <el-button @click="dialogFormVisible = false">{{ |
| | | $t("dataManage.dictionaryManageObj.cancel") |
| | | }}</el-button> |
| | | <el-button type="primary" @click="updateForm">{{ |
| | | $t("dataManage.dictionaryManageObj.confirm") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | |
| | | :visible.sync="InsertFormdialog" |
| | | > |
| | | <el-form :model="insertform"> |
| | | <el-form-item :label="$t('dataManage.dictionaryManageObj.number')" :label-width="formLabelWidth"> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.number')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <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-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.tableName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <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-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.tableAliasName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="insertform.tabDesc" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="类型" :label-width="formLabelWidth"> |
| | |
| | | <el-option label="面几何" value="面几何"></el-option> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldName')" :label-width="formLabelWidth"> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <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-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldAliasName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <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-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldType')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <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-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.fieldLength')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="insertform.len" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('dataManage.dictionaryManageObj.FieldPrecision')" :label-width="formLabelWidth"> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.FieldPrecision')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.precision" |
| | | autocomplete="off" |
| | |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> --> |
| | | <el-form-item :label="$t('dataManage.dictionaryManageObj.remark')" :label-width="formLabelWidth"> |
| | | <el-form-item |
| | | :label="$t('dataManage.dictionaryManageObj.remark')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="insertform.bak" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="InsertFormdialog = false">{{$t('dataManage.dictionaryManageObj.cancel')}}</el-button> |
| | | <el-button type="primary" @click="insertFromData">{{$t('dataManage.dictionaryManageObj.confirm')}}</el-button> |
| | | <el-button @click="InsertFormdialog = false">{{ |
| | | $t("dataManage.dictionaryManageObj.cancel") |
| | | }}</el-button> |
| | | <el-button type="primary" @click="insertFromData">{{ |
| | | $t("dataManage.dictionaryManageObj.confirm") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | pageSize: 10, |
| | | }, |
| | | selectData: [], |
| | | btnStatus: { |
| | | select: false, |
| | | delete: false, |
| | | upload: false, |
| | | download: false, |
| | | insert: false, |
| | | update: false, |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.startQueryNameData(); |
| | | this.getSelectDictTab(); |
| | | this.showPermsBtn(); |
| | | }, |
| | | methods: { |
| | | showPermsBtn() { |
| | | let currentPerms = this.$store.state.currentPerms; |
| | | let permsEntity = this.$store.state.permsEntity; |
| | | permsEntity |
| | | .filter((item) => item.perms == currentPerms) |
| | | .map((item) => (this.btnStatus[item.tag.substr(1)] = true)); |
| | | }, |
| | | //下拉选项调用 |
| | | async getSelectDictTab() { |
| | | this.selectData = []; |
| | |
| | | }, |
| | | //修改详情 |
| | | updateForm() { |
| | | this.$confirm(`${$t('dataManage.dictionaryManageObj.tipsUp')}`,`${$t('dataManage.dictionaryManageObj.tips')}`, { |
| | | confirmButtonText: `${$t('dataManage.dictionaryManageObj.confirm')}`, |
| | | cancelButtonText: `${$t('dataManage.dictionaryManageObj.cancel')}`, |
| | | this.$confirm( |
| | | `${$t("dataManage.dictionaryManageObj.tipsUp")}`, |
| | | `${$t("dataManage.dictionaryManageObj.tips")}`, |
| | | { |
| | | confirmButtonText: `${$t("dataManage.dictionaryManageObj.confirm")}`, |
| | | cancelButtonText: `${$t("dataManage.dictionaryManageObj.cancel")}`, |
| | | type: "warning", |
| | | }) |
| | | } |
| | | ) |
| | | .then(async () => { |
| | | const data = await updateDict(this.upform); |
| | | if (data.code != 200) { |
| | | this.$message.error(`${$t('dataManage.dictionaryManageObj.failModify')}`); |
| | | this.$message.error( |
| | | `${$t("dataManage.dictionaryManageObj.failModify")}` |
| | | ); |
| | | } |
| | | this.dialogFormVisible = false; |
| | | this.startQueryNameData(); |
| | | this.$message({ |
| | | message: `${$t('dataManage.dictionaryManageObj.modifySuccessfully')}`, |
| | | message: `${$t( |
| | | "dataManage.dictionaryManageObj.modifySuccessfully" |
| | | )}`, |
| | | type: "success", |
| | | }); |
| | | }) |
| | |
| | | }, |
| | | //新增 |
| | | insertFromData() { |
| | | this.$confirm(`${$t('dataManage.dictionaryManageObj.tipsAdd')}`, `${$t('dataManage.dictionaryManageObj.tips')}`, { |
| | | confirmButtonText: `${$t('dataManage.dictionaryManageObj.confirm')}`, |
| | | cancelButtonText: `${$t('dataManage.dictionaryManageObj.cancel')}`, |
| | | this.$confirm( |
| | | `${$t("dataManage.dictionaryManageObj.tipsAdd")}`, |
| | | `${$t("dataManage.dictionaryManageObj.tips")}`, |
| | | { |
| | | confirmButtonText: `${$t("dataManage.dictionaryManageObj.confirm")}`, |
| | | cancelButtonText: `${$t("dataManage.dictionaryManageObj.cancel")}`, |
| | | type: "warning", |
| | | }) |
| | | } |
| | | ) |
| | | .then(async () => { |
| | | const data = await insertDict(this.insertform); |
| | | if (data.code != 200) { |
| | | this.$message.error( `${$t('dataManage.dictionaryManageObj.FailedAdd')}`); |
| | | this.$message.error( |
| | | `${$t("dataManage.dictionaryManageObj.FailedAdd")}` |
| | | ); |
| | | } |
| | | this.InsertFormdialog = false; |
| | | this.startQueryNameData(); |
| | | this.$message({ |
| | | message: `${$t('dataManage.dictionaryManageObj.NewSuccess')}`, |
| | | message: `${$t("dataManage.dictionaryManageObj.NewSuccess")}`, |
| | | type: "success", |
| | | }); |
| | | }) |
| | |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | this.$confirm(`${$t('dataManage.dictionaryManageObj.tipsDelete')}`, `${$t('dataManage.dictionaryManageObj.tips')}`, { |
| | | confirmButtonText:`${$t('dataManage.dictionaryManageObj.confirm')}`, |
| | | cancelButtonText: `${$t('dataManage.dictionaryManageObj.cancel')}`, |
| | | this.$confirm( |
| | | `${$t("dataManage.dictionaryManageObj.tipsDelete")}`, |
| | | `${$t("dataManage.dictionaryManageObj.tips")}`, |
| | | { |
| | | confirmButtonText: `${$t("dataManage.dictionaryManageObj.confirm")}`, |
| | | cancelButtonText: `${$t("dataManage.dictionaryManageObj.cancel")}`, |
| | | type: "warning", |
| | | }) |
| | | } |
| | | ) |
| | | .then(async () => { |
| | | const data = await deleteDicts({ ids: std.toString() }); |
| | | if (data.code != 200) { |
| | | this.$message.error(`${$t('dataManage.dictionaryManageObj.DeleteFailed')}`); |
| | | this.$message.error( |
| | | `${$t("dataManage.dictionaryManageObj.DeleteFailed")}` |
| | | ); |
| | | } |
| | | this.$message({ |
| | | type: "success", |
| | | message:`${$t('dataManage.dictionaryManageObj.deletedSuccessfully')}`, |
| | | message: `${$t( |
| | | "dataManage.dictionaryManageObj.deletedSuccessfully" |
| | | )}`, |
| | | }); |
| | | this.startQueryNameData(); |
| | | }) |
| | |
| | | size="small" |
| | | >{{ $t('common.empty') }}</el-button |
| | | > |
| | | <el-button |
| | | <el-button v-if="btnStatus.insert" |
| | | @click="InsertFormdialog = true" |
| | | icon="el-icon-edit" |
| | | type="success" |
| | | size="small" |
| | | >{{ $t('common.append') }}</el-button |
| | | > |
| | | <el-button |
| | | <el-button v-if="btnStatus.delete" |
| | | @click="delStyleData" |
| | | icon="el-icon-delete" |
| | | type="danger" |
| | |
| | | <el-input v-model="upform.fileGuid" disabled autocomplete="off"></el-input> |
| | | <input |
| | | name="file1" |
| | | |
| | | type="file" |
| | | id="editFile" |
| | | multiple="multiple" |
| | |
| | | style="margin-left: 10px" |
| | | ><i class="el-icon-plus"></i |
| | | ></el-link> |
| | | <el-link |
| | | <el-link v-if="btnStatus.upload" |
| | | :title="$t('common.upload')" |
| | | :underline="false" |
| | | @click="seteditFile(0)" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import $ from 'jquery'; |
| | | import moment from 'moment'; |
| | | import { |
| | | getToken |
| | | } from '../../utils/auth.js' |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | import styleDirTree from './styleDirTree.vue'; |
| | | import styleDepTree from './styleDepTree.vue'; |
| | | import $ from "jquery"; |
| | | import moment from "moment"; |
| | | import { getToken } from "../../utils/auth.js"; |
| | | import MyBread from "../../components/MyBread.vue"; |
| | | import styleDirTree from "./styleDirTree.vue"; |
| | | import styleDepTree from "./styleDepTree.vue"; |
| | | import { |
| | | select_Style_ByPageAndCount, |
| | | insertStyle, |
| | | deleteStyles, |
| | | updateStyle, |
| | | upload_style |
| | | } from '../../api/api'; |
| | | upload_style, |
| | | } from "../../api/api"; |
| | | export default { |
| | | name: 'styleManage', |
| | | name: "styleManage", |
| | | components: { MyBread, styleDirTree, styleDepTree }, |
| | | data() { |
| | | return { |
| | |
| | | InsertFormdialog: false, |
| | | showCata: false, |
| | | upform: {}, |
| | | formLabelWidth: '130px', |
| | | formLabelWidth: "130px", |
| | | showinfoBox: false, |
| | | itemdetail: {}, |
| | | ruleForm: { |
| | | }, |
| | | ruleForm: {}, |
| | | |
| | | backupData: [], |
| | | |
| | | searchName: '', |
| | | searchName: "", |
| | | multipleSelection: [], |
| | | upflag: false, |
| | | /** */ |
| | |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | }, |
| | | btnStatus: { |
| | | select: false, |
| | | delete: false, |
| | | upload: false, |
| | | download: false, |
| | | insert: false, |
| | | update: false, |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getRoleTabelData(); |
| | | this.showPermsBtn(); |
| | | }, |
| | | methods: { |
| | | showPermsBtn() { |
| | | let currentPerms = this.$store.state.currentPerms; |
| | | let permsEntity = this.$store.state.permsEntity; |
| | | permsEntity |
| | | .filter((item) => item.perms == currentPerms) |
| | | .map((item) => (this.btnStatus[item.tag.substr(1)] = true)); |
| | | }, |
| | | filesReset() { |
| | | document.getElementById('insertFile').reset(); |
| | | document.getElementById('insertimageFile').reset(); |
| | | document.getElementById("insertFile").reset(); |
| | | document.getElementById("insertimageFile").reset(); |
| | | this.guidFile = null; |
| | | this.fileGuid = null; |
| | | }, |
| | | getInsertFile(res) { |
| | | if (res == 0) { |
| | | $('#insertFile').click(); |
| | | $("#insertFile").click(); |
| | | } else if (res == 1) { |
| | | $('#insertimageFile').click(); |
| | | $("#insertimageFile").click(); |
| | | } |
| | | }, |
| | | insertFile(res) { |
| | | if (res == 0) { |
| | | var val = document.getElementById('insertFile').files; |
| | | var val = document.getElementById("insertFile").files; |
| | | if (!val || !val.length) return; |
| | | this.insertform.fileGuid = val[0].name; |
| | | } else if (res == 1) { |
| | | var val = document.getElementById('insertimageFile').files; |
| | | var val = document.getElementById("insertimageFile").files; |
| | | if (!val || !val.length) return; |
| | | this.insertform.viewGuid = val[0].name; |
| | | } |
| | |
| | | if (val_data.code == 200) { |
| | | this.guidFile = val_data.result; |
| | | this.$message({ |
| | | message: '上传成功!', |
| | | type: 'success', |
| | | message: "上传成功!", |
| | | type: "success", |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | message: '上传失败!', |
| | | type: 'warning', |
| | | message: "上传失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | } else if (res == 1) { |
| | |
| | | if (val_data.code == 200) { |
| | | this.viewFile = val_data.result; |
| | | this.$message({ |
| | | message: '上传成功!', |
| | | type: 'success', |
| | | message: "上传成功!", |
| | | type: "success", |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | message: '上传失败!', |
| | | type: 'warning', |
| | | message: "上传失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | geteditFile(res) { |
| | | if (res == 0) { |
| | | $('#editFile').click(); |
| | | $("#editFile").click(); |
| | | } else if (res == 1) { |
| | | $('#editimageFile').click(); |
| | | $("#editimageFile").click(); |
| | | } |
| | | }, |
| | | editFile(res) { |
| | | if (res == 0) { |
| | | var val = document.getElementById('editFile').files; |
| | | var val = document.getElementById("editFile").files; |
| | | if (!val || !val.length) return; |
| | | this.upform.fileGuid = val[0].name; |
| | | } else if (res == 1) { |
| | | var val = document.getElementById('editimageFile').files; |
| | | var val = document.getElementById("editimageFile").files; |
| | | if (!val || !val.length) return; |
| | | this.upform.viewGuid = val[0].name; |
| | | } |
| | |
| | | if (val_data.code == 200) { |
| | | this.guidFile = val_data.result; |
| | | this.$message({ |
| | | message: '上传成功!', |
| | | type: 'success', |
| | | message: "上传成功!", |
| | | type: "success", |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | message: '上传失败!', |
| | | type: 'warning', |
| | | message: "上传失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | } else if (res == 1) { |
| | |
| | | if (val_data.code == 200) { |
| | | this.viewFile = val_data.result; |
| | | this.$message({ |
| | | message: '上传成功!', |
| | | type: 'success', |
| | | message: "上传成功!", |
| | | type: "success", |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | message: '上传失败!', |
| | | type: 'warning', |
| | | message: "上传失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | } |
| | |
| | | const data = await deleteStyles({ ids: std.toString() }); |
| | | if (data.code == 200) { |
| | | 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.insertform.depid == null) { |
| | | this.$message({ |
| | | message: '请选择样式所属的目录或单位', |
| | | type: 'warning', |
| | | message: "请选择样式所属的目录或单位", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | |
| | | |
| | | this.filesReset(); |
| | | this.$message({ |
| | | message: '添加成功!', |
| | | type: 'success', |
| | | message: "添加成功!", |
| | | type: "success", |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '添加失败!', |
| | | type: 'warning', |
| | | message: "添加失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }, |
| | | async getRoleTabelData() { |
| | | if (this.listData.tab == '') { |
| | | if (this.listData.tab == "") { |
| | | delete this.listData.tab; |
| | | } |
| | | this.listData.name = this.ruleForm.name; |
| | | const data = await select_Style_ByPageAndCount(this.listData); |
| | | if (data.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | | this.$message.error("列表调用失败"); |
| | | } |
| | | this.tableData = data.result; |
| | | this.count = data.count; |
| | |
| | | if (date === undefined || date === null) { |
| | | return; |
| | | } |
| | | return moment(parseInt(date)).format('YYYY-MM-DD HH:mm:ss'); |
| | | return moment(parseInt(date)).format("YYYY-MM-DD HH:mm:ss"); |
| | | }, |
| | | formatStatus(row, column) { |
| | | let date = row[column.property]; |
| | |
| | | } |
| | | switch (date) { |
| | | case 1: |
| | | return '启用'; |
| | | return "启用"; |
| | | break; |
| | | case 0: |
| | | return '停用'; |
| | | return "停用"; |
| | | break; |
| | | } |
| | | }, |
| | | /** */ |
| | | getflyFile() { |
| | | $('#flyFile').click(); |
| | | $("#flyFile").click(); |
| | | }, |
| | | getImageFile() { |
| | | $('#imageFile').click(); |
| | | $("#imageFile").click(); |
| | | }, |
| | | uploadflyFile() { |
| | | var val = document.getElementById('flyFile').files; |
| | | var val = document.getElementById("flyFile").files; |
| | | if (!val || !val.length) return; |
| | | if (!val || !val.length) return; |
| | | var formData = new FormData(); |
| | | formData.append('file0', val[0]); |
| | | var res = $.ajax(serverUrl + 'Style/Upload', { |
| | | type: 'post', |
| | | formData.append("file0", val[0]); |
| | | var res = $.ajax(serverUrl + "Style/Upload", { |
| | | type: "post", |
| | | data: formData, |
| | | async: false, |
| | | cache: false, |
| | |
| | | }, |
| | | //图片上传 |
| | | uploadFile() { |
| | | var val = document.getElementById('imageFile').files; |
| | | var val = document.getElementById("imageFile").files; |
| | | if (!val || !val.length) return; |
| | | var formData = new FormData(); |
| | | formData.append('file0', val[0]); |
| | | var res = $.ajax(serverUrl + 'Style/Upload', { |
| | | type: 'post', |
| | | formData.append("file0", val[0]); |
| | | var res = $.ajax(serverUrl + "Style/Upload", { |
| | | type: "post", |
| | | data: formData, |
| | | async: false, |
| | | cache: false, |
| | |
| | | this.insertform.path_id = this.$store.state.cataNode.id; |
| | | } |
| | | |
| | | this.$store.commit('changeCata', ''); //清空state的面包屑 |
| | | this.$store.commit('changeNode', ''); //清空state的节点对象 |
| | | this.$store.commit("changeCata", ""); //清空state的面包屑 |
| | | this.$store.commit("changeNode", ""); //清空state的节点对象 |
| | | this.showCata = false; |
| | | }, |
| | | startFromData() { |
| | |
| | | }); |
| | | }, |
| | | addstyle() { |
| | | this.$router.push('/addstyle'); |
| | | this.$router.push("/addstyle"); |
| | | }, |
| | | statusFormat(res) { |
| | | switch (res) { |
| | |
| | | async updateForm() { |
| | | if (this.upform.dirid == null || this.upform.depid == null) { |
| | | this.$message({ |
| | | message: '请选择样式所属的目录或单位', |
| | | type: 'warning', |
| | | message: "请选择样式所属的目录或单位", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | if (Number.isInteger(this.upform.status) == false) { |
| | | this.upform.status = this.statusFormat(this.upform.status) |
| | | this.upform.status = this.statusFormat(this.upform.status); |
| | | } |
| | | if (this.guidFile != null) { |
| | | this.upform.fileGuid = this.guidFile; |
| | |
| | | this.dialogFormVisible = false; |
| | | this.upform = {}; |
| | | this.$message({ |
| | | message: '修改成功!', |
| | | type: 'success', |
| | | message: "修改成功!", |
| | | type: "success", |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '修改失败!', |
| | | type: 'warning', |
| | | message: "修改失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | |
| | | |
| | | }, |
| | | |
| | | removeUpdate() { |
| | |
| | | this.filesReset(); |
| | | }, |
| | | submitForm(formName) { |
| | | this.getRoleTabelData() |
| | | this.getRoleTabelData(); |
| | | // this.$refs[formName].validate((valid) => { |
| | | // if (valid) { |
| | | // this.searchName = this.ruleForm.name.trim(); |
| | |
| | | // }); |
| | | }, |
| | | resetForm(formName) { |
| | | this.ruleForm = {} |
| | | this.ruleForm = {}; |
| | | this.getRoleTabelData(); |
| | | }, |
| | | showDetail(index, row) { |
| | | var token = getToken(); |
| | | this.showinfoBox = true; |
| | | this.itemdetail = row; |
| | | this.itemdetail.createTime = this.formomentTime(this.itemdetail.createTime); |
| | | this.itemdetail.updateTime = this.formomentTime(this.itemdetail.updateTime); |
| | | this.itemdetail.imageFile = BASE_URL + "/res/download?guid=" + row.viewGuid + "&token=" + token |
| | | this.itemdetail.createTime = this.formomentTime( |
| | | this.itemdetail.createTime |
| | | ); |
| | | this.itemdetail.updateTime = this.formomentTime( |
| | | this.itemdetail.updateTime |
| | | ); |
| | | this.itemdetail.imageFile = |
| | | BASE_URL + "/res/download?guid=" + row.viewGuid + "&token=" + token; |
| | | }, |
| | | closeDetial() { |
| | | this.showinfoBox = false; |
| | |
| | | }, |
| | | |
| | | handleEdit(index, row) { |
| | | |
| | | this.upflag = true; |
| | | this.dialogFormVisible = true; |
| | | this.upform = row; |
| | | this.upform.depValue = row.depName; |
| | | this.upform.dirValue = row.dirName; |
| | | this.upform.status = this.forMontStatus(row.status) |
| | | this.upform.status = this.forMontStatus(row.status); |
| | | }, |
| | | handleDelete(index, row) { |
| | | this.$confirm('确定是否删除?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | this.$confirm("确定是否删除?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | DeletestStyle([row.id]); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功!', |
| | | type: "success", |
| | | message: "删除成功!", |
| | | }); |
| | | this.startFromData(); |
| | | }) |
| | |
| | | |
| | | ShowWindowFly(res) { |
| | | window.open( |
| | | ifreamUrl + '/LFWeb/poper.html?name=' + res, |
| | | '', |
| | | 'height=800, width=1500, top=150, left=350, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no' |
| | | ifreamUrl + "/LFWeb/poper.html?name=" + res, |
| | | "", |
| | | "height=800, width=1500, top=150, left=350, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no" |
| | | ); |
| | | }, |
| | | }, |
| | |
| | | @click="onSubmit('ruleForm')" |
| | | icon="el-icon-search" |
| | | size="small" |
| | | >{{ $t('common.iquery') }}</el-button |
| | | >{{ $t("common.iquery") }}</el-button |
| | | > |
| | | <el-button |
| | | v-if="btnStatus.insert" |
| | | @click="InsertFormdialog = true" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | >{{ $t('common.append') }}</el-button |
| | | >{{ $t("common.append") }}</el-button |
| | | > |
| | | <el-button |
| | | @click="resetForm('ruleForm')" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | >{{ $t('common.empty') }}</el-button |
| | | >{{ $t("common.empty") }}</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | <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)" |
| | | type="warning" |
| | | size="small" |
| | | >{{ $t('common.update') }}</el-button |
| | | >{{ $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 |
| | | >{{ $t("common.delete") }}</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | |
| | | disabled |
| | | ></el-input> |
| | | <el-button style="margin-left: 20px" @click="showVerTree(2)">{{ |
| | | $t('common.choose') |
| | | $t("common.choose") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="editFromDataClose">{{ |
| | | $t('common.close') |
| | | $t("common.close") |
| | | }}</el-button> |
| | | <el-button @click="editFromData" type="primary">{{ |
| | | $t('common.confirm') |
| | | $t("common.confirm") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | disabled |
| | | ></el-input> |
| | | <el-button style="margin-left: 20px" @click="showVerTree(3)">{{ |
| | | $t('common.choose') |
| | | $t("common.choose") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | |
| | |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="insertFromDataClose">{{ |
| | | $t('common.close') |
| | | $t("common.close") |
| | | }}</el-button> |
| | | <el-button @click="insertFromData" type="primary">{{ |
| | | $t('common.confirm') |
| | | $t("common.confirm") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | </div> |
| | | <div class="btnBox"> |
| | | <el-button type="primary" size="small" @click="selectCataName">{{ |
| | | $t('common.confirm') |
| | | $t("common.confirm") |
| | | }}</el-button> |
| | | <el-button type="primary" size="small" @click="showCata = false">{{ |
| | | $t('common.close') |
| | | $t("common.close") |
| | | }}</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | insertVersion, |
| | | deleteVersion, |
| | | updateVersion, |
| | | } 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 { |
| | | showCata: false, |
| | | formLabelWidth: '100px', |
| | | formLabelWidth: "100px", |
| | | dialogFormVisible: false, |
| | | InsertFormdialog: false, |
| | | showinfoBox: false, |
| | |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | }, |
| | | btnStatus: { |
| | | select: false, |
| | | delete: false, |
| | | upload: false, |
| | | download: false, |
| | | insert: false, |
| | | update: false, |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getRoleTabelData(); |
| | | this.showPermsBtn(); |
| | | }, |
| | | computed: { |
| | | pathId() { |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | showPermsBtn() { |
| | | let currentPerms = this.$store.state.currentPerms; |
| | | let permsEntity = this.$store.state.permsEntity; |
| | | permsEntity |
| | | .filter((item) => item.perms == currentPerms) |
| | | .map((item) => (this.btnStatus[item.tag.substr(1)] = true)); |
| | | }, |
| | | resetForm() { |
| | | this.ruleForm = {}; |
| | | 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"); |
| | | }, |
| | | async handleDelete(index, row) { |
| | | 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", |
| | | }); |
| | | } |
| | | }, |