|
@@ -0,0 +1,100 @@
|
|
|
+<!--
|
|
|
+字段关系分类表码列表
|
|
|
+@Author: linqian
|
|
|
+@Date: 2022-09-29 13:57
|
|
|
+-->
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <!-- 搜索栏 -->
|
|
|
+ <search-bar :conditionForm="conditionForm" @submitSearch="receiveSearch"></search-bar>
|
|
|
+ <!-- 操作栏 -->
|
|
|
+ <operate-bar :pageOptList="pageOptList" @submitPageOpt="receviceOpt"></operate-bar>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <new-table
|
|
|
+ ref="table"
|
|
|
+ :tableUrl="tableUrl"
|
|
|
+ :tableHeader="tableHeader"
|
|
|
+ :condition="condition"
|
|
|
+ :tableOptList="tableOptList"
|
|
|
+ @submitTableOpt="receviceOpt"
|
|
|
+ >
|
|
|
+ </new-table>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <script>
|
|
|
+ import searchBar from '@/components/search-bar';
|
|
|
+ import operateBar from '@/components/operate-bar';
|
|
|
+ import newTable from '@/components/new-table';
|
|
|
+ import { fieldSortSyncUrl } from '@/api/sync';
|
|
|
+ import { searchOpt, syncOpt } from '@/mixins/page-opt';
|
|
|
+ import { fieldClassifyTableUrl } from "@/api/data-auth"
|
|
|
+ export default {
|
|
|
+ components: { searchBar, operateBar, newTable },
|
|
|
+ mixins: [searchOpt, syncOpt],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tableUrl: fieldClassifyTableUrl,
|
|
|
+ tableHeader: [{
|
|
|
+ label: "字段关系分类",
|
|
|
+ prop: "name"
|
|
|
+ },{
|
|
|
+ label: "代码",
|
|
|
+ prop: "code"
|
|
|
+ }],
|
|
|
+ tableOptList: ["编辑", "删除"],
|
|
|
+ pageOptList: ["新增", "同步"],
|
|
|
+ conditionForm: [
|
|
|
+ {
|
|
|
+ label: '字段关系分类',
|
|
|
+ name: 'firName',
|
|
|
+ op: 'like',
|
|
|
+ value: '',
|
|
|
+ component: 'ElInput'
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {},
|
|
|
+ methods: {
|
|
|
+ receviceOpt(opt, row) {
|
|
|
+ if (opt == '新增') {
|
|
|
+ this.handleEdit({});
|
|
|
+ } else if (opt == '修改') {
|
|
|
+ this.handleEdit(row);
|
|
|
+ } else if (opt == '删除') {
|
|
|
+ this.handleDelete(row);
|
|
|
+ } else if (opt == '同步') {
|
|
|
+ this.handleSync(fieldSortSyncUrl);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleEdit(row) {
|
|
|
+ const vm = this;
|
|
|
+ const layer = this.$dgLayer({
|
|
|
+ title: '修改',
|
|
|
+ area: ['700px', '500px'],
|
|
|
+ content: require("./filed-rel-sort-form.vue"),
|
|
|
+ props: {
|
|
|
+ id: row.id
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ success() {
|
|
|
+ layer.close(layer.dialogIndex);
|
|
|
+ vm.handleSearch();
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
+ handleDelete(row) {
|
|
|
+ this.$dgConfirm(`是否确定删除这条数据!`, '提示', {}).then(() => {});
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ mounted() {}
|
|
|
+ };
|
|
|
+ </script>
|
|
|
+
|
|
|
+ <style lang='scss'>
|
|
|
+ </style>
|