| | |
| | | <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"> |
| | | <el-tree |
| | | :data="domainData" |
| | | :props="defaultProps" |
| | | :default-expand-all="true" |
| | | @node-click="toggleTabs" |
| | | ></el-tree> |
| | | <div |
| | | class="leftTree subpage_Div" |
| | | style="border: 1px solid #dcdfe6;" |
| | | > |
| | | <el-input |
| | | size="small" |
| | | v-model="filterInput" |
| | | style="width: 200px" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')" |
| | | suffix-icon="el-icon-search" |
| | | ></el-input> |
| | | <div style="width: 450px"> |
| | | <el-tree |
| | | :data="domainData" |
| | | :props="defaultProps" |
| | | @node-click="toggleTabs" |
| | | :filter-node-method="filterNode" |
| | | ref="tree" |
| | | ></el-tree> |
| | | </div> |
| | | </div> |
| | | <div class="right"> |
| | | <div class="right subpage_Div"> |
| | | <div class="inquire"> |
| | | <el-form ref="queryForm" :model="queryForm" :inline="true"> |
| | | <el-form |
| | | ref="queryForm" |
| | | :model="queryForm" |
| | | :inline="true" |
| | | > |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.domCode')" |
| | | :label="$t('dataManage.vmobj.keyword')" |
| | | prop="name" |
| | | > |
| | | <el-input |
| | | size="small" |
| | | v-model="queryForm.code" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | :placeholder="$t('shuJuGuanLi.lable4')" |
| | | style="width: 200px" |
| | | ><i |
| | | slot="suffix" |
| | | class="el-icon-search" |
| | | @click="queryInfo('queryForm')" |
| | | style="padding-right: 8px" |
| | | ></i></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | @click="queryInfo('queryForm')" |
| | | icon="el-icon-search" |
| | | size="small" |
| | | class="primary" |
| | | >{{ $t('common.iquery') }}</el-button |
| | | > |
| | | <el-button |
| | | @click="resetInfo('queryForm')" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | type="info" |
| | | >{{ $t('common.empty') }}</el-button |
| | | > |
| | | <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 |
| | | >--> |
| | | <el-button |
| | | @click="resetInfo('queryForm')" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | type="info" |
| | | >{{ $t("common.empty") }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table_box"> |
| | | <div class="dividing-line"></div> |
| | | <div |
| | | class="table_box" |
| | | style="height: calc(100% - 60px)" |
| | | > |
| | | <el-table |
| | | :data="tableData" |
| | | @selection-change="handleSelectionChange" |
| | | height="100%" |
| | | border |
| | | 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" |
| | |
| | | prop="codeDesc" |
| | | :label="$t('dataManage.domainManage.codeDesc')" |
| | | /> |
| | | <el-table-column |
| | | <!-- <el-table-column |
| | | align="center" |
| | | prop="bsm" |
| | | :label="$t('dataManage.domainManage.bsm')" |
| | | /> |
| | | /> --> |
| | | <el-table-column |
| | | align="center" |
| | | prop="level" |
| | |
| | | :label="$t('dataManage.domainManage.bak')" |
| | | /> |
| | | |
| | | <el-table-column min-width="150" :label="$t('common.operate')"> |
| | | <template slot-scope="scope" |
| | | ><el-button |
| | | class="primary" |
| | | <el-table-column |
| | | min-width="150" |
| | | :label="$t('common.operate')" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | @click="showDetail(scope.row)" |
| | | type="primary" |
| | | size="small" |
| | | >{{ $t('common.details') }}</el-button |
| | | > |
| | | plain |
| | | >{{ $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 |
| | | > |
| | | plain |
| | | >{{ $t("common.update") }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="pagination_box" style="margin-top: 20px"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="listData.pageIndex" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :page-size="listData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="count" |
| | | <div |
| | | class="pagination_box" |
| | | style="margin-top: 15px" |
| | | > |
| | | </el-pagination> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="listData.pageIndex" |
| | | :page-sizes="[10, 50, 100, 200]" |
| | | :page-size="listData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="count" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <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 |
| | | class="infoBox_box" |
| | | v-show="showinfoBox" |
| | | > |
| | | <div class="infoBox subpage_Div box_div"> |
| | | <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') }}:{{ |
| | | {{ $t("dataManage.domainManage.domName") }}:{{ |
| | | itemdetail.domName |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.domainManage.domDesc') }}:{{ |
| | | {{ $t("dataManage.domainManage.domDesc") }}:{{ |
| | | itemdetail.domDesc |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.domainManage.domCode') }}:{{ |
| | | {{ $t("dataManage.domainManage.domCode") }}:{{ |
| | | itemdetail.domCode |
| | | }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.domainManage.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 }} |
| | | {{ $t("dataManage.domainManage.level") }}:{{ itemdetail.level }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | {{ $t('dataManage.domainManage.orderid') }}:{{ |
| | | {{ $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> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | width="510px" |
| | | top="5vh" |
| | | top="2vh" |
| | | :title=" |
| | | behavior == '新增用户' |
| | | ? `${$t('common.append')}` |
| | |
| | | :visible.sync="dialogFormVisible" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-form :model="editForm" ref="editForm"> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.domName')" |
| | | :label-width="formLabelWidth" |
| | | <div style="height: 500px; overflow: auto"> |
| | | <el-form |
| | | :model="editForm" |
| | | ref="editForm" |
| | | label-position="top" |
| | | > |
| | | <el-input v-model="editForm.domName" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.domDesc')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <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-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.codeDesc')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <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-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.level')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <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-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.bak')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <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 @click="cancelEdit()">{{ $t('common.reset') }}</el-button> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.domName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | style="width:85%" |
| | | v-model="editForm.domName" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in domainOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-input v-model="editForm.domName" autocomplete="off"></el-input> --> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.domDesc')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.domDesc" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.domCode')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.domCode" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.codeDesc')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.codeDesc" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.bsm')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.bsm" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.level')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.level" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.orderid')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.orderid" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.domainManage.bak')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="editForm.bak" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div |
| | | v-if="behavior == '修改信息'" |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button |
| | | size="medium" |
| | | 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" @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="medium" |
| | | 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> |
| | |
| | | insertDomain, |
| | | deleteDomain, |
| | | updateDomain, |
| | | } from '../../api/api'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | domain_selectDomainNames, |
| | | } from "../../api/api"; |
| | | import MyBread from "../../components/MyBread.vue"; |
| | | import { |
| | | getTreeData |
| | | } from "../../utils/treeData.js" |
| | | export default { |
| | | name: 'domainManage', |
| | | name: "domainManage", |
| | | components: { MyBread }, |
| | | data() { |
| | | return { |
| | | filterInput: "", |
| | | domainOptions: [], |
| | | multipleSelection: [], |
| | | behavior: '', |
| | | formLabelWidth: '100px', |
| | | behavior: "", |
| | | formLabelWidth: "100px", |
| | | dialogFormVisible: false, |
| | | showinfoBox: false, |
| | | fullscreenLoading: false, |
| | | itemdetail: {}, |
| | | editForm: {}, |
| | | editForm: { |
| | | domName: "", |
| | | }, |
| | | queryForm: { |
| | | code: '', |
| | | code: "", |
| | | }, |
| | | insertform: {}, |
| | | initialForm: '', |
| | | initialForm: "", |
| | | |
| | | tableData: [], |
| | | count: 0, |
| | | rowFlag: null, |
| | | listData: { |
| | | ns: '', |
| | | tab: '', |
| | | ns: "", |
| | | tab: "", |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | }, |
| | |
| | | update: false, |
| | | }, |
| | | domainData: [ |
| | | { |
| | | tabDesc: '基础数据', |
| | | children: [], |
| | | }, |
| | | { |
| | | tabDesc: '业务数据', |
| | | children: [], |
| | | }, |
| | | |
| | | ], |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'tabDesc', |
| | | children: "children", |
| | | label: "label", |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | return this.$store.state.cataNode.id; |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | toggleTabs(data) { |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | |
| | | return data.val.indexOf(value) !== -1; |
| | | }, |
| | | async toggleTabs(data) { |
| | | if (data.children != null) { |
| | | return |
| | | } |
| | | this.fullscreenLoading = true; |
| | | this.listData.ns = data.ns; |
| | | this.listData.tab = data.tab; |
| | | this.listData.pageIndex = 1; |
| | | this.listData.pageSize = 10; |
| | | const res = await domain_selectDomainNames(data); |
| | | if (res.code != 200) { |
| | | this.$message.error("domain调用失败"); |
| | | } |
| | | var std = []; |
| | | for (var i = 0; i < res.result.length; i++) { |
| | | std.push({ |
| | | value: res.result[i], |
| | | label: res.result[i], |
| | | }); |
| | | } |
| | | this.domainOptions = std; |
| | | this.editForm.domName = res.result[0]; |
| | | |
| | | getSingleTab(this.listData).then((res) => { |
| | | setTimeout(() => { |
| | | this.tableData = res.result; |
| | | this.count = res.count; |
| | | this.fullscreenLoading = false; |
| | | if (res.code == 200) { |
| | | this.tableData = res.result; |
| | | this.count = res.count; |
| | | this.fullscreenLoading = false; |
| | | } else { |
| | | this.tableData = []; |
| | | this.count = 0; |
| | | this.fullscreenLoading = false; |
| | | } |
| | | }, 500); |
| | | }); |
| | | }, |
| | |
| | | }, |
| | | getAllTabelData() { |
| | | getDomainTabs().then((res) => { |
| | | let bdres = res.result.filter((item) => item.ns == 'bd'); |
| | | let bsres = res.result.filter((item) => item.ns == 'bs'); |
| | | this.domainData[0].children = bdres; |
| | | this.domainData[1].children = bsres; |
| | | var val = res.result; |
| | | this.domainData = getTreeData(val) |
| | | // var std = []; |
| | | // val.filter((item) => { |
| | | // if (std.indexOf(item.bak) == -1) { |
| | | // std.push(item.bak); |
| | | // this.domainData.push( |
| | | // { |
| | | // val: item.bak, |
| | | // children: [], |
| | | // } |
| | | // ) |
| | | // } |
| | | // }); |
| | | // this.domainData.filter((item) => { |
| | | // val.filter((res) => { |
| | | // if (item.val === res.bak) { |
| | | // res.val = res.tabDesc |
| | | // item.children.push(res) |
| | | // } |
| | | // }) |
| | | // }) |
| | | }); |
| | | }, |
| | | handleSelectionChange(val) { |
| | |
| | | |
| | | queryInfo() { |
| | | let searchData = { |
| | | code: this.queryForm.code, |
| | | name: this.queryForm.code, |
| | | ns: this.listData.ns, |
| | | tab: this.listData.tab, |
| | | pageIndex: this.listData.pageIndex, |
| | |
| | | this.tableData = res.result; |
| | | this.count = res.count; |
| | | } else { |
| | | console.log('查询接口报错'); |
| | | this.$notify.error({ |
| | | title: res.code, |
| | | message: res.result, |
| | |
| | | resetInfo() { |
| | | this.queryForm = {}; |
| | | this.$store.state.verCateNode = {}; |
| | | this.$bus.$emit('clearTressLabel', true); |
| | | this.getAllTabelData(); |
| | | 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 = []; |
| | |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | deleteDomain({ ids: std.toString() }).then((res) => { |
| | | console.log(res); |
| | | |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功!', |
| | | type: "success", |
| | | message: "删除成功!", |
| | | }); |
| | | this.multipleSelection = []; |
| | | this.listData.pageIndex = 1; |
| | | getSingleTab(this.listData).then((res) => { |
| | | setTimeout(() => { |
| | | this.tableData = res.result; |
| | |
| | | }, 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.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.fullscreenLoading = true; |
| | | |
| | | insertDomain(this.editForm) |
| | | .then((res) => { |
| | | setTimeout(() => { |
| | | 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> |
| | | <style lang="less" scoped> |
| | | //@import url(); 引入公共css类 |
| | | // @import url(); 引入公共css类 |
| | | .domainBox { |
| | | height: 80%; |
| | | width: 97%; |
| | | position: absolute; |
| | | height: 98%; |
| | | width: 98%; |
| | | padding: 0.5%; |
| | | .mainBox { |
| | | padding-top: 10px; |
| | | width: 100%; |
| | | height: 92%; |
| | | height: calc(100% - 75px); |
| | | display: flex; |
| | | justify-content: space-between; |
| | | justify-content: space-around; |
| | | .leftTree { |
| | | width: 15%; |
| | | height: 96%; |
| | | border: 1px solid white; |
| | | 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: 96%; |
| | | border: 1px solid white; |
| | | width: 75%; |
| | | height: 100%; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | max-height: 670px; |
| | | overflow-y: auto; |
| | | padding: 0 10px; |
| | | box-sizing: border-box; |
| | | border: 1px solid #dcdfe6; |
| | | .inquire { |
| | | margin-bottom: 10px; |
| | | |
| | | padding: 8px; |
| | | // margin-top: 10px; |
| | | border-radius: 5px; |
| | | border: 1px solid rgb(202, 201, 204); |
| | | //border: 1px solid #dcdfe6; |
| | | //margin-bottom: 20px; |
| | | .el-form-item { |
| | | margin: 5px; |
| | | } |
| | | } |
| | | .table_box { |
| | | width: 100%; |
| | | height: 80%; |
| | | margin: 0 auto; |
| | | overflow: auto; |
| | | |
| | | .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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .infoBox { |
| | | width: 500px; |
| | | |
| | | position: absolute; |
| | | z-index: 100; |
| | | top: 15%; |
| | | right: 25%; |
| | | color: white; |
| | | background-color: #303030; |
| | | .el-card { |
| | | background-color: transparent; |
| | | color: white; |
| | | span { |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | color: white; |
| | | } |
| | | } |
| | | .contentBox { |
| | | margin: 0 aotu 10px; |
| | | height: 500px; |
| | | overflow: auto; |
| | | color: white; |
| | | overflow-y: auto; |
| | | p { |
| | | color: white; |
| | | font-size: 14px; |
| | | } |
| | | } |
| | | } |
| | | .pagination_box { |
| | | margin-top: 20px; |
| | | /deep/.el-input__inner { |
| | | background-color: transparent !important; |
| | | border: 1px solid; |
| | | color: white; |
| | | } |
| | | /deep/.el-pagination__total { |
| | | color: white; |
| | | } |
| | | /deep/.el-pagination__jump { |
| | | color: white; |
| | | } |
| | | /deep/.el-pager li.active { |
| | | color: #409eff; |
| | | } |
| | | /deep/.el-pager li { |
| | | color: white; |
| | | background: transparent; |
| | | } |
| | | /deep/.el-pager li { |
| | | color: white; |
| | | } |
| | | /deep/.btn-prev { |
| | | background: transparent; |
| | | } |
| | | /deep/.btn-next { |
| | | background: transparent; |
| | | } |
| | | /deep/.btn-next i { |
| | | color: white; |
| | | } |
| | | /deep/.btn-prev i { |
| | | color: white; |
| | | } |
| | | } |
| | | /deep/.el-form-item__label { |
| | | color: white; |
| | | } |
| | | // 设置输入框的背景色、字体颜色、边框属性设置; |
| | | /deep/.el-input__inner { |
| | | background-color: transparent !important ; |
| | | color: #fff; |
| | | border: 1px solid; |
| | | } |
| | | /*修改table 表体的背景颜色和文字颜色*/ |
| | | /deep/ .el-table { |
| | | background-color: transparent; |
| | | |
| | | th, |
| | | td { |
| | | background-color: transparent; |
| | | } |
| | | .el-table__expanded-cell { |
| | | background-color: transparent !important; |
| | | } |
| | | |
| | | // 表头背景色 |
| | | th.el-table__cell { |
| | | background-color: #303030; |
| | | color: #fff; |
| | | } |
| | | tr > td { |
| | | background-color: #303030; |
| | | color: #fff; |
| | | } |
| | | |
| | | // hover效果 |
| | | tr:hover > td { |
| | | background-color: rgba(255, 255, 255, 0.3) !important; |
| | | } |
| | | |
| | | tbody tr:hover { |
| | | background-color: rgba(255, 255, 255, 0.3) !important; |
| | | // text-align: center; |
| | | } |
| | | |
| | | // 滚动条宽高 |
| | | .el-table__body-wrapper::-webkit-scrollbar { |
| | | width: 5px; |
| | | height: 5px; |
| | | } |
| | | |
| | | .el-table__body-wrapper::-webkit-scrollbar { |
| | | width: 5px; |
| | | /*滚动条宽度*/ |
| | | height: 5px; |
| | | /*滚动条高度*/ |
| | | } |
| | | /*定义滚动条轨道 内阴影+圆角*/ |
| | | .el-table__body-wrapper::-webkit-scrollbar-track { |
| | | box-shadow: 0px 1px 3px #216fe6 inset; |
| | | /*滚动条的背景区域的内阴影*/ |
| | | border-radius: 10px; |
| | | } |
| | | |
| | | /*定义滑块 内阴影+圆角*/ |
| | | .el-table__body-wrapper::-webkit-scrollbar-thumb { |
| | | box-shadow: 0px 1px 3px #216fe6 inset; |
| | | border-radius: 6px; |
| | | background-color: #216fe6; |
| | | } |
| | | } |
| | | /deep/ .el-dialog { |
| | | width: 620px !important; |
| | | margin-top: 10vh !important; |
| | | } |
| | | /deep/ .el-select .el-input__inner { |
| | | border-color: #fff !important; |
| | | } |
| | | /deep/.el-dialog .el-input__inner { |
| | | width: 300px; |
| | | } |
| | | /deep/ .el-dialog__body { |
| | | padding: 0px 30px; |
| | | } |
| | | /deep/ .el-dialog__footer { |
| | | padding-top: 0 !important; |
| | | width: 600px; |
| | | display: flex; |
| | | margin: 0 auto; |
| | | justify-content: center; |
| | | } |
| | | .primary { |
| | | background: #409eff; |
| | | border: #409eff; |
| | | color: white; |
| | | } |
| | | /deep/ .el-dialog { |
| | | background: #303030; |
| | | } |
| | | /deep/.el-range-editor.is-active, |
| | | .el-range-editor.is-active:hover, |
| | | .el-select .el-input.is-focus .el-input__inner { |
| | | border: 1px solid; |
| | | } |
| | | /deep/.el-dialog__title { |
| | | color: white; |
| | | } |
| | | } |
| | | </style> |