| | |
| | | <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')"> |
| | | <el-select |
| | | clearable |
| | | v-model="queryName" |
| | | v-model="ruleForm.queryName" |
| | | @change="changeQueryName" |
| | | :placeholder="$t('dataManage.dictionaryManageObj.selectTableName')" |
| | | placeholder="图幅角点TIC(b_rg20w_l01t)" |
| | | > |
| | | <el-option |
| | | v-for="(item, i) in selectData" |
| | |
| | | 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" |
| | |
| | | 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> |
| | |
| | | <el-link |
| | | v-if="btnStatus.select" |
| | | @click="showDetail(scope.$index, scope.row)" |
| | | >{{ $t("dataManage.dictionaryManageObj.lookOver") }}</el-link |
| | | >{{ $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") }}:{{ |
| | | {{ $t('dataManage.dictionaryManageObj.tableName') }}:{{ |
| | | itemdetail.tab |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.tableAliasName") }}:{{ |
| | | {{ $t('dataManage.dictionaryManageObj.tableAliasName') }}:{{ |
| | | itemdetail.tabDesc |
| | | }} |
| | | </p> |
| | |
| | | <!-- <p>表类型:{{ itemdetail.type }}</p> |
| | | <el-divider></el-divider> --> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.fieldName") }}:{{ |
| | | {{ $t('dataManage.dictionaryManageObj.fieldName') }}:{{ |
| | | itemdetail.field |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.fieldAliasName") }}:{{ |
| | | {{ $t('dataManage.dictionaryManageObj.fieldAliasName') }}:{{ |
| | | itemdetail.alias |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.fieldType") }}:{{ |
| | | {{ $t('dataManage.dictionaryManageObj.fieldType') }}:{{ |
| | | itemdetail.type |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.fieldLength") }}:{{ |
| | | {{ $t('dataManage.dictionaryManageObj.fieldLength') }}:{{ |
| | | itemdetail.len |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.FieldPrecision") }}:{{ |
| | | {{ $t('dataManage.dictionaryManageObj.FieldPrecision') }}:{{ |
| | | itemdetail.precision |
| | | }} |
| | | </p> |
| | |
| | | <!-- <p>值域关联表:{{ itemdetail.domain_name }}</p> |
| | | <el-divider></el-divider> --> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.remark") }}:{{ |
| | | {{ $t('dataManage.dictionaryManageObj.remark') }}:{{ |
| | | itemdetail.bak |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.creationTime") }}:{{ |
| | | {{ $t('dataManage.dictionaryManageObj.creationTime') }}:{{ |
| | | itemdetail.createTime |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.createPersonnel") }}:{{ |
| | | {{ $t('dataManage.dictionaryManageObj.createPersonnel') }}:{{ |
| | | itemdetail.createUser |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.updateTime") }}:{{ |
| | | {{ $t('dataManage.dictionaryManageObj.updateTime') }}:{{ |
| | | itemdetail.updateTime |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t("dataManage.dictionaryManageObj.updatePersonnel") }}:{{ |
| | | {{ $t('dataManage.dictionaryManageObj.updatePersonnel') }}:{{ |
| | | itemdetail.updateUser |
| | | }} |
| | | </p> |
| | |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogFormVisible = false">{{ |
| | | $t("dataManage.dictionaryManageObj.cancel") |
| | | $t('dataManage.dictionaryManageObj.cancel') |
| | | }}</el-button> |
| | | <el-button type="primary" @click="updateForm">{{ |
| | | $t("dataManage.dictionaryManageObj.confirm") |
| | | $t('dataManage.dictionaryManageObj.confirm') |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="InsertFormdialog = false">{{ |
| | | $t("dataManage.dictionaryManageObj.cancel") |
| | | $t('dataManage.dictionaryManageObj.cancel') |
| | | }}</el-button> |
| | | <el-button type="primary" @click="insertFromData">{{ |
| | | $t("dataManage.dictionaryManageObj.confirm") |
| | | $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 { |
| | | multipleSelection: [], |
| | | formLabelWidth: "120px", |
| | | formLabelWidth: '120px', |
| | | dialogFormVisible: false, |
| | | InsertFormdialog: false, |
| | | insertform: {}, |
| | |
| | | showinfoBox: false, |
| | | itemdetail: {}, |
| | | ruleForm: { |
| | | name: "", |
| | | name: '', |
| | | queryName: '图幅角点TIC(b_rg20w_l01t) ', |
| | | }, |
| | | tableData: [], |
| | | count: 0, |
| | | currentPage: 1, |
| | | searchName: "", |
| | | searchName: '', |
| | | selectName: [], |
| | | queryName: "", |
| | | queryName: 'sdas', |
| | | listData: { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | tab: null, |
| | | ns: null, |
| | | }, |
| | | selectData: [], |
| | | btnStatus: { |
| | |
| | | //下拉选项调用 |
| | | async getSelectDictTab() { |
| | | this.selectData = []; |
| | | |
| | | const data = await selectDictTab(); |
| | | |
| | | if (data.code != 200) { |
| | | this.$message.error("下拉调用失败"); |
| | | this.$message.error('下拉调用失败'); |
| | | } |
| | | data.result.forEach((e) => { |
| | | if (e) { |
| | | var val_res = data.result[0]; |
| | | // this.ruleForm.queryName = JSON.toString( |
| | | // val_res.tabDesc + '(' + val_res.tab + ')' |
| | | // ); |
| | | this.listData.tab = val_res.tab; |
| | | this.listData.ns = val_res.ns; |
| | | this.selectData.push({ |
| | | tab: e.tab, |
| | | tabDesc: `${e.tabDesc}(${e.tab})`, |
| | | tab: val_res.tab, |
| | | ns: val_res.ns, |
| | | |
| | | tabDesc: val_res.tabDesc, |
| | | }); |
| | | } |
| | | }); |
| | | // data.result.forEach((e) => { |
| | | // if (e) { |
| | | // this.selectData.push({ |
| | | // tab: e.tab, |
| | | // ns: e.ns, |
| | | |
| | | // tabDesc: e.tabDesc, |
| | | // }); |
| | | // } |
| | | // }); |
| | | |
| | | 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; |
| | | this.count = data.count; |
| | | }, |
| | | //格式化时间 |
| | | add0(m) { |
| | | return m < 10 ? "0" + m : m; |
| | | return m < 10 ? '0' + m : m; |
| | | }, |
| | | //格式化时间 |
| | | format(shijianchuo) { |
| | |
| | | var mm = time.getMinutes(); |
| | | var s = time.getSeconds(); |
| | | return ( |
| | | y + "-" + this.add0(m) + "-" + this.add0(d) |
| | | y + '-' + this.add0(m) + '-' + this.add0(d) |
| | | // " " + |
| | | // this.add0(h) + |
| | | // ":" + |
| | |
| | | //修改详情 |
| | | updateForm() { |
| | | this.$confirm( |
| | | `${$t("dataManage.dictionaryManageObj.tipsUp")}`, |
| | | `${$t("dataManage.dictionaryManageObj.tips")}`, |
| | | `${$t('dataManage.dictionaryManageObj.tipsUp')}`, |
| | | `${$t('dataManage.dictionaryManageObj.tips')}`, |
| | | { |
| | | confirmButtonText: `${$t("dataManage.dictionaryManageObj.confirm")}`, |
| | | cancelButtonText: `${$t("dataManage.dictionaryManageObj.cancel")}`, |
| | | type: "warning", |
| | | 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")}` |
| | | `${$t('dataManage.dictionaryManageObj.failModify')}` |
| | | ); |
| | | } |
| | | this.dialogFormVisible = false; |
| | | this.startQueryNameData(); |
| | | this.$message({ |
| | | message: `${$t( |
| | | "dataManage.dictionaryManageObj.modifySuccessfully" |
| | | 'dataManage.dictionaryManageObj.modifySuccessfully' |
| | | )}`, |
| | | type: "success", |
| | | type: 'success', |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | |
| | | //新增 |
| | | insertFromData() { |
| | | this.$confirm( |
| | | `${$t("dataManage.dictionaryManageObj.tipsAdd")}`, |
| | | `${$t("dataManage.dictionaryManageObj.tips")}`, |
| | | `${$t('dataManage.dictionaryManageObj.tipsAdd')}`, |
| | | `${$t('dataManage.dictionaryManageObj.tips')}`, |
| | | { |
| | | confirmButtonText: `${$t("dataManage.dictionaryManageObj.confirm")}`, |
| | | cancelButtonText: `${$t("dataManage.dictionaryManageObj.cancel")}`, |
| | | type: "warning", |
| | | 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")}` |
| | | `${$t('dataManage.dictionaryManageObj.FailedAdd')}` |
| | | ); |
| | | } |
| | | this.InsertFormdialog = false; |
| | | this.startQueryNameData(); |
| | | this.$message({ |
| | | message: `${$t("dataManage.dictionaryManageObj.NewSuccess")}`, |
| | | type: "success", |
| | | message: `${$t('dataManage.dictionaryManageObj.NewSuccess')}`, |
| | | type: 'success', |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | this.$confirm( |
| | | `${$t("dataManage.dictionaryManageObj.tipsDelete")}`, |
| | | `${$t("dataManage.dictionaryManageObj.tips")}`, |
| | | `${$t('dataManage.dictionaryManageObj.tipsDelete')}`, |
| | | `${$t('dataManage.dictionaryManageObj.tips')}`, |
| | | { |
| | | confirmButtonText: `${$t("dataManage.dictionaryManageObj.confirm")}`, |
| | | cancelButtonText: `${$t("dataManage.dictionaryManageObj.cancel")}`, |
| | | type: "warning", |
| | | 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")}` |
| | | `${$t('dataManage.dictionaryManageObj.DeleteFailed')}` |
| | | ); |
| | | } |
| | | this.$message({ |
| | | type: "success", |
| | | type: 'success', |
| | | message: `${$t( |
| | | "dataManage.dictionaryManageObj.deletedSuccessfully" |
| | | 'dataManage.dictionaryManageObj.deletedSuccessfully' |
| | | )}`, |
| | | }); |
| | | this.startQueryNameData(); |
| | |
| | | }, |
| | | |
| | | //搜索框 |
| | | changeQueryName(val) { |
| | | this.listData.tab = val; |
| | | changeQueryName(e) { |
| | | this.listData.tab = e.tab; |
| | | this.listData.ns = e.ns; |
| | | |
| | | this.startQueryNameData(); |
| | | }, |
| | | }, |