update 数据字典 & add 料仓、设备类型
This commit is contained in:
		@@ -38,7 +38,8 @@
 | 
			
		||||
  <% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
 | 
			
		||||
    <script>
 | 
			
		||||
    // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.103:8080/pms-am';
 | 
			
		||||
    window.SITE_CONFIG['apiURL'] = 'http://192.168.1.49:8080/pms-am';
 | 
			
		||||
    // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.49:8080/pms-am'; // tengyun
 | 
			
		||||
    window.SITE_CONFIG['apiURL'] = 'http://192.168.1.62:8080/pms-am'; // tengyun
 | 
			
		||||
    </script>
 | 
			
		||||
  <% } %>
 | 
			
		||||
  <!-- 集成测试环境 -->
 | 
			
		||||
 
 | 
			
		||||
@@ -76,6 +76,7 @@ export default {
 | 
			
		||||
        }
 | 
			
		||||
        this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
          .then(({ data: res }) => {
 | 
			
		||||
            // console.log('[confirm] here...')
 | 
			
		||||
            if (res.code !== 0) {
 | 
			
		||||
              return this.$message.error(res.msg);
 | 
			
		||||
            }
 | 
			
		||||
@@ -85,7 +86,7 @@ export default {
 | 
			
		||||
              duration: 500,
 | 
			
		||||
              onClose: () => {
 | 
			
		||||
                this.visible = false;
 | 
			
		||||
                this.$emit("refreshDataList");
 | 
			
		||||
                this.$emit("successSubmit");
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ export default {
 | 
			
		||||
    // 获取数据列表
 | 
			
		||||
    getDataList() {
 | 
			
		||||
      this.dataListLoading = true;
 | 
			
		||||
      this.$http
 | 
			
		||||
      return this.$http
 | 
			
		||||
        .get(this.urlOptions.getDataListURL, {
 | 
			
		||||
          params: this.listQuery,
 | 
			
		||||
        })
 | 
			
		||||
@@ -103,7 +103,7 @@ export default {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      } else if (val.type === "delete") {
 | 
			
		||||
        this.deleteHandle(val.data.id,val.data.name)
 | 
			
		||||
        this.deleteHandle(val.data.id, val.data.name)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    // 删除
 | 
			
		||||
@@ -121,7 +121,10 @@ export default {
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 1500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  this.getDataList();
 | 
			
		||||
                  this.getDataList().then(() => {
 | 
			
		||||
                    // 刷新本地缓存
 | 
			
		||||
                    this.refreshLocalstorage()
 | 
			
		||||
                  })
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            } else {
 | 
			
		||||
@@ -147,7 +150,7 @@ export default {
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
       }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    handleCancel() {
 | 
			
		||||
      this.$refs.addOrUpdate.formClear()
 | 
			
		||||
@@ -157,9 +160,23 @@ export default {
 | 
			
		||||
    handleConfirm() {
 | 
			
		||||
      this.$refs.addOrUpdate.dataFormSubmit()
 | 
			
		||||
    },
 | 
			
		||||
    refreshLocalstorage() {
 | 
			
		||||
      // 刷新数据字典数据
 | 
			
		||||
      this.$http("/sys/dict/type/all", { limit: 999, page: 1 }).then(({ data: res }) => {
 | 
			
		||||
        // console.log("[dictData] loading...", res);
 | 
			
		||||
        if (res.code === 0 && res.data) {
 | 
			
		||||
          localStorage.setItem("dictList", JSON.stringify(res.data));
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
      // end
 | 
			
		||||
    },
 | 
			
		||||
    successSubmit() {
 | 
			
		||||
      this.handleCancel()
 | 
			
		||||
      this.getDataList()
 | 
			
		||||
      if (this.isDictTypePage || this.isDictValuePage) {
 | 
			
		||||
        // 刷新本地缓存
 | 
			
		||||
        this.refreshLocalstorage()
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    // 导出
 | 
			
		||||
    exportHandle(name) {
 | 
			
		||||
 
 | 
			
		||||
@@ -21,4 +21,8 @@ export const pick = (obj, paths) => {
 | 
			
		||||
		}
 | 
			
		||||
	})
 | 
			
		||||
	return result
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export const dictFind = (which) => {
 | 
			
		||||
	return () => 1
 | 
			
		||||
}
 | 
			
		||||
@@ -113,7 +113,7 @@ export default {
 | 
			
		||||
            limit: this.size,
 | 
			
		||||
          };
 | 
			
		||||
 | 
			
		||||
      if (!queryParams && this.listQueryExtra.length) {
 | 
			
		||||
      if (!queryParams && this.listQueryExtra && this.listQueryExtra.length) {
 | 
			
		||||
        this.listQueryExtra.map((name) => {
 | 
			
		||||
          params[name] = "";
 | 
			
		||||
        });
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										107
									
								
								src/views/modules/pms/equipmentType/config.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										107
									
								
								src/views/modules/pms/equipmentType/config.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,107 @@
 | 
			
		||||
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
 | 
			
		||||
import StatusComponent from "@/components/noTemplateComponents/statusComponent";
 | 
			
		||||
import request from "@/utils/request";
 | 
			
		||||
import { dictFind, timeFilter } from '@/utils/filters'
 | 
			
		||||
 | 
			
		||||
export default function () {
 | 
			
		||||
  const tableProps = [
 | 
			
		||||
    { prop: "createTime", label: "添加时间", filter: timeFilter },
 | 
			
		||||
    { prop: "name", label: "类型名称" },
 | 
			
		||||
    { prop: "code", label: "类型编码" },
 | 
			
		||||
    { prop: "description", label: "描述" },
 | 
			
		||||
    { prop: "remark", label: "备注" },
 | 
			
		||||
    {
 | 
			
		||||
      prop: "operations",
 | 
			
		||||
      name: "操作",
 | 
			
		||||
      fixed: "right",
 | 
			
		||||
      width: 120,
 | 
			
		||||
      subcomponent: TableOperaionComponent,
 | 
			
		||||
      options: ["edit", { name: "delete", permission: "pms:equipmentType:delete" }],
 | 
			
		||||
    },
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  const headFormFields = [
 | 
			
		||||
    {
 | 
			
		||||
      prop: 'key',
 | 
			
		||||
      label: "类型名称",
 | 
			
		||||
      input: true,
 | 
			
		||||
      default: { value: "" },
 | 
			
		||||
      bind: {
 | 
			
		||||
        // placeholder: '请输入产线名称或编码'
 | 
			
		||||
        placeholder: '请输入类型名称'
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      button: {
 | 
			
		||||
        type: "primary",
 | 
			
		||||
        name: "查询",
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      button: {
 | 
			
		||||
        type: "primary",
 | 
			
		||||
        name: "新增",
 | 
			
		||||
        permission: "pms:equipmentType:save"
 | 
			
		||||
      },
 | 
			
		||||
      bind: {
 | 
			
		||||
        plain: true,
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * dialog config 有两个版本,一个适用于 DialogWithMenu 组件,另一个适用于 DialogJustForm 组件
 | 
			
		||||
   * 适用于 DialogWithMenu 组件的配置示例详见 blenderStep/config.js
 | 
			
		||||
   * 此为后者的配置:
 | 
			
		||||
   */
 | 
			
		||||
  const dialogJustFormConfigs = {
 | 
			
		||||
    form: {
 | 
			
		||||
      rows: [
 | 
			
		||||
        [
 | 
			
		||||
          {
 | 
			
		||||
            input: true,
 | 
			
		||||
            label: "类型名称",
 | 
			
		||||
            prop: "name",
 | 
			
		||||
            rules: { required: true, message: "not empty", trigger: "blur" },
 | 
			
		||||
            elparams: { placeholder: "请输入类型名称" },
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            input: true,
 | 
			
		||||
            label: "类型编码",
 | 
			
		||||
            prop: "code",
 | 
			
		||||
            rules: { required: true, message: "not empty", trigger: "blur" },
 | 
			
		||||
            elparams: { placeholder: "请输入类型编码" },
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
        [{ textarea: true, label: "描述信息", prop: "description", elparams: { placeholder: "描述信息" } }],
 | 
			
		||||
        [{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
 | 
			
		||||
      ],
 | 
			
		||||
      operations: [
 | 
			
		||||
        { name: "add", label: "保存", type: "primary", permission: "pms:equipmentType:save", showOnEdit: false },
 | 
			
		||||
        { name: "update", label: "更新", type: "primary", permission: "pms:equipmentType:update", showOnEdit: true },
 | 
			
		||||
        { name: "reset", label: "重置", type: "warning", showAlways: true },
 | 
			
		||||
        // { name: 'cancel', label: '取消', showAlways: true },
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
  };
 | 
			
		||||
  // 备注:弹窗弹出的时间和网速有关......
 | 
			
		||||
 | 
			
		||||
  return {
 | 
			
		||||
    dialogConfigs: dialogJustFormConfigs,
 | 
			
		||||
    tableConfig: {
 | 
			
		||||
      table: null, // 此处可省略,el-table 上的配置项
 | 
			
		||||
      column: tableProps, // el-column-item 上的配置项
 | 
			
		||||
    },
 | 
			
		||||
    headFormConfigs: {
 | 
			
		||||
      rules: null, // 名称是由 BaseSearchForm.vue 组件固定的
 | 
			
		||||
      fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的
 | 
			
		||||
    },
 | 
			
		||||
    urls: {
 | 
			
		||||
      base: "/pms/equipmentType",
 | 
			
		||||
      page: "/pms/equipmentType/page",
 | 
			
		||||
      // subase: '/pms/blenderStepParam',
 | 
			
		||||
      // subpage: '/pms/blenderStepParam/page',
 | 
			
		||||
      // more...
 | 
			
		||||
    },
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										32
									
								
								src/views/modules/pms/equipmentType/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								src/views/modules/pms/equipmentType/index.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,32 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<ListViewWithHead :table-config="tableConfig" :head-config="headFormConfigs" :dialog-configs="dialogConfigs" />
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import initConfig from './config';
 | 
			
		||||
import ListViewWithHead from '@/views/atomViews/ListViewWithHead.vue';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'ProductionLineView',
 | 
			
		||||
	components: { ListViewWithHead },
 | 
			
		||||
	provide() {
 | 
			
		||||
		return {
 | 
			
		||||
			urls: this.allUrls
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	data() {
 | 
			
		||||
		const { tableConfig, headFormConfigs, urls, dialogConfigs } = initConfig.call(this);
 | 
			
		||||
		return {
 | 
			
		||||
			tableConfig,
 | 
			
		||||
			headFormConfigs,
 | 
			
		||||
			allUrls: urls,
 | 
			
		||||
			dialogConfigs,
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	created() {},
 | 
			
		||||
	mounted() {},
 | 
			
		||||
	methods: {},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped></style>
 | 
			
		||||
							
								
								
									
										118
									
								
								src/views/modules/pms/materialStorage/config.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										118
									
								
								src/views/modules/pms/materialStorage/config.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,118 @@
 | 
			
		||||
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
 | 
			
		||||
import StatusComponent from "@/components/noTemplateComponents/statusComponent";
 | 
			
		||||
import request from "@/utils/request";
 | 
			
		||||
import { dictFind } from '@/utils/filters'
 | 
			
		||||
 | 
			
		||||
export default function () {
 | 
			
		||||
  const tableProps = [
 | 
			
		||||
    { prop: "name", label: "料仓名称" },
 | 
			
		||||
    { prop: "code", label: "料仓编码" },
 | 
			
		||||
    { prop: "typeDictValue", label: "料仓类型", filter: dictFind('料仓') },
 | 
			
		||||
    { prop: "status", label: "产线状态", subcomponent: StatusComponent }, // subcomponent
 | 
			
		||||
    { prop: "description", label: "描述" },
 | 
			
		||||
    { prop: "remark", label: "备注" },
 | 
			
		||||
    {
 | 
			
		||||
      prop: "operations",
 | 
			
		||||
      name: "操作",
 | 
			
		||||
      fixed: "right",
 | 
			
		||||
      width: 120,
 | 
			
		||||
      subcomponent: TableOperaionComponent,
 | 
			
		||||
      options: ["edit", { name: "delete", permission: "pms:materialStorage:delete" }],
 | 
			
		||||
    },
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  const headFormFields = [
 | 
			
		||||
    {
 | 
			
		||||
      prop: 'name',
 | 
			
		||||
      label: "料仓名称",
 | 
			
		||||
      input: true,
 | 
			
		||||
      default: { value: "" },
 | 
			
		||||
      bind: {
 | 
			
		||||
        // placeholder: '请输入产线名称或编码'
 | 
			
		||||
        placeholder: '请输入料仓名称'
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      button: {
 | 
			
		||||
        type: "primary",
 | 
			
		||||
        name: "查询",
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      button: {
 | 
			
		||||
        type: "primary",
 | 
			
		||||
        name: "新增",
 | 
			
		||||
        permission: "pms:materialStorage:save"
 | 
			
		||||
      },
 | 
			
		||||
      bind: {
 | 
			
		||||
        plain: true,
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * dialog config 有两个版本,一个适用于 DialogWithMenu 组件,另一个适用于 DialogJustForm 组件
 | 
			
		||||
   * 适用于 DialogWithMenu 组件的配置示例详见 blenderStep/config.js
 | 
			
		||||
   * 此为后者的配置:
 | 
			
		||||
   */
 | 
			
		||||
  const dialogJustFormConfigs = {
 | 
			
		||||
    form: {
 | 
			
		||||
      rows: [
 | 
			
		||||
        [
 | 
			
		||||
          {
 | 
			
		||||
            input: true,
 | 
			
		||||
            label: "料仓名称",
 | 
			
		||||
            prop: "name",
 | 
			
		||||
            rules: { required: true, message: "not empty", trigger: "blur" },
 | 
			
		||||
            elparams: { placeholder: "请输入料仓名称" },
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            input: true,
 | 
			
		||||
            label: "料仓编码",
 | 
			
		||||
            prop: "code",
 | 
			
		||||
            rules: { required: true, message: "not empty", trigger: "blur" },
 | 
			
		||||
            elparams: { placeholder: "请输入料仓编码" },
 | 
			
		||||
          }, {
 | 
			
		||||
            select: true,
 | 
			
		||||
            label: "料仓类型",
 | 
			
		||||
            prop: "typeDictValue",
 | 
			
		||||
            // fetchData: () => this.$http.get("/pms/factory/page", { params: { limit: 999, page: 1 } }),
 | 
			
		||||
            options: [
 | 
			
		||||
              { label: '中间仓', value: 0 },
 | 
			
		||||
              { label: '日料仓', value: 1 },
 | 
			
		||||
            ],
 | 
			
		||||
            rules: { required: true, message: "not empty", trigger: "change" },
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
        [{ textarea: true, label: "描述信息", prop: "description", elparams: { placeholder: "描述信息" } }],
 | 
			
		||||
        [{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
 | 
			
		||||
      ],
 | 
			
		||||
      operations: [
 | 
			
		||||
        { name: "add", label: "保存", type: "primary", permission: "pms:materialStorage:save", showOnEdit: false },
 | 
			
		||||
        { name: "update", label: "更新", type: "primary", permission: "pms:materialStorage:update", showOnEdit: true },
 | 
			
		||||
        { name: "reset", label: "重置", type: "warning", showAlways: true },
 | 
			
		||||
        // { name: 'cancel', label: '取消', showAlways: true },
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
  };
 | 
			
		||||
  // 备注:弹窗弹出的时间和网速有关......
 | 
			
		||||
 | 
			
		||||
  return {
 | 
			
		||||
    dialogConfigs: dialogJustFormConfigs,
 | 
			
		||||
    tableConfig: {
 | 
			
		||||
      table: null, // 此处可省略,el-table 上的配置项
 | 
			
		||||
      column: tableProps, // el-column-item 上的配置项
 | 
			
		||||
    },
 | 
			
		||||
    headFormConfigs: {
 | 
			
		||||
      rules: null, // 名称是由 BaseSearchForm.vue 组件固定的
 | 
			
		||||
      fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的
 | 
			
		||||
    },
 | 
			
		||||
    urls: {
 | 
			
		||||
      base: "/pms/materialStorage",
 | 
			
		||||
      page: "/pms/materialStorage/page",
 | 
			
		||||
      // subase: '/pms/blenderStepParam',
 | 
			
		||||
      // subpage: '/pms/blenderStepParam/page',
 | 
			
		||||
      // more...
 | 
			
		||||
    },
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										32
									
								
								src/views/modules/pms/materialStorage/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								src/views/modules/pms/materialStorage/index.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,32 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<ListViewWithHead :table-config="tableConfig" :head-config="headFormConfigs" :dialog-configs="dialogConfigs" :listQueryExtra="['name']" />
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import initConfig from './config';
 | 
			
		||||
import ListViewWithHead from '@/views/atomViews/ListViewWithHead.vue';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'ProductionLineView',
 | 
			
		||||
	components: { ListViewWithHead },
 | 
			
		||||
	provide() {
 | 
			
		||||
		return {
 | 
			
		||||
			urls: this.allUrls
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	data() {
 | 
			
		||||
		const { tableConfig, headFormConfigs, urls, dialogConfigs } = initConfig.call(this);
 | 
			
		||||
		return {
 | 
			
		||||
			tableConfig,
 | 
			
		||||
			headFormConfigs,
 | 
			
		||||
			allUrls: urls,
 | 
			
		||||
			dialogConfigs,
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	created() {},
 | 
			
		||||
	mounted() {},
 | 
			
		||||
	methods: {},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped></style>
 | 
			
		||||
@@ -133,7 +133,7 @@ export default {
 | 
			
		||||
            duration: 500,
 | 
			
		||||
            onClose: () => {
 | 
			
		||||
              this.visible = false
 | 
			
		||||
              this.$emit('refreshDataList')
 | 
			
		||||
              this.$emit('successSubmit')
 | 
			
		||||
            }
 | 
			
		||||
          })
 | 
			
		||||
        }).catch(() => {})
 | 
			
		||||
 
 | 
			
		||||
@@ -77,6 +77,7 @@ export default {
 | 
			
		||||
  mixins: [basicPage],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      isDictValuePage: true,
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/sys/dict/data/page",
 | 
			
		||||
        deleteURL: "/sys/dict/data",
 | 
			
		||||
 
 | 
			
		||||
@@ -90,7 +90,7 @@ export default {
 | 
			
		||||
            duration: 500,
 | 
			
		||||
            onClose: () => {
 | 
			
		||||
              this.visible = false
 | 
			
		||||
              this.$emit('refreshDataList')
 | 
			
		||||
              this.$emit('successSubmit')
 | 
			
		||||
            }
 | 
			
		||||
          })
 | 
			
		||||
        }).catch(() => {})
 | 
			
		||||
 
 | 
			
		||||
@@ -2,33 +2,16 @@
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
 | 
			
		||||
      <base-table
 | 
			
		||||
        :table-props="tableProps"
 | 
			
		||||
        :page="listQuery.page"
 | 
			
		||||
        :limit="listQuery.limit"
 | 
			
		||||
        :table-data="tableData"
 | 
			
		||||
      >
 | 
			
		||||
        <method-btn
 | 
			
		||||
          v-if="tableBtn.length"
 | 
			
		||||
          slot="handleBtn"
 | 
			
		||||
          :width="100"
 | 
			
		||||
          label="操作"
 | 
			
		||||
          :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick"
 | 
			
		||||
        />
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn" @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination
 | 
			
		||||
        :limit.sync="listQuery.limit"
 | 
			
		||||
        :page.sync="listQuery.page"
 | 
			
		||||
        :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList"
 | 
			
		||||
      />
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total" @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog
 | 
			
		||||
        :dialogTitle="addOrEditTitle"
 | 
			
		||||
        :dialogVisible="addOrUpdateVisible"
 | 
			
		||||
        @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm"
 | 
			
		||||
        @confirm="handleConfirmEx"
 | 
			
		||||
        :before-close="handleCancel"
 | 
			
		||||
      >
 | 
			
		||||
        <add-or-update ref="addOrUpdate" @successSubmit="successSubmit"></add-or-update>
 | 
			
		||||
@@ -39,8 +22,8 @@
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page";
 | 
			
		||||
import AddOrUpdate from './dict-type-add-or-update'
 | 
			
		||||
import toDictType from './dict-type-to'
 | 
			
		||||
import AddOrUpdate from "./dict-type-add-or-update";
 | 
			
		||||
import toDictType from "./dict-type-to";
 | 
			
		||||
import i18n from "@/i18n";
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
@@ -50,7 +33,7 @@ const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: "dictType",
 | 
			
		||||
    label: i18n.t("dict.dictType"),
 | 
			
		||||
    subcomponent: toDictType
 | 
			
		||||
    subcomponent: toDictType,
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "sort",
 | 
			
		||||
@@ -79,6 +62,7 @@ export default {
 | 
			
		||||
  mixins: [basicPage],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      isDictTypePage: true,
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/sys/dict/type/page",
 | 
			
		||||
        deleteURL: "/sys/dict/type",
 | 
			
		||||
@@ -117,7 +101,7 @@ export default {
 | 
			
		||||
  components: {
 | 
			
		||||
    AddOrUpdate,
 | 
			
		||||
  },
 | 
			
		||||
  methods:{
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
@@ -128,14 +112,18 @@ export default {
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrEditTitle = "新增";
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          this.addOrUpdateHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
       }
 | 
			
		||||
          console.log(val);
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
    handleConfirmEx() {
 | 
			
		||||
      this.handleConfirm();
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,146 +1,114 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="login-container">
 | 
			
		||||
		<div
 | 
			
		||||
			class="login-background"
 | 
			
		||||
			:style="{
 | 
			
		||||
				backgroundImage: 'url(' + (coverImgUrl ? coverImgUrl : baseImg) + ')',
 | 
			
		||||
				backgroundSize: '100% 100%',
 | 
			
		||||
				backgroundRepeat: 'no-repeat',
 | 
			
		||||
			}"
 | 
			
		||||
		>
 | 
			
		||||
			<div class="login-background-container">
 | 
			
		||||
				<div class="back-title">
 | 
			
		||||
					Wel<span>come</span>
 | 
			
		||||
					<p>
 | 
			
		||||
						<span class="back-title-point" />奥镁耐火砖
 | 
			
		||||
					</p>
 | 
			
		||||
				</div>
 | 
			
		||||
				<img
 | 
			
		||||
					:src="require('../../assets/img/login.gif')"
 | 
			
		||||
					style="width: 90%; margin-left: 5%"
 | 
			
		||||
					alt=""
 | 
			
		||||
				/>
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
		<el-form
 | 
			
		||||
			ref="dataForm"
 | 
			
		||||
			:model="dataForm"
 | 
			
		||||
			:rules="dataRule"
 | 
			
		||||
			class="login-form"
 | 
			
		||||
			autocomplete="on"
 | 
			
		||||
			label-position="left"
 | 
			
		||||
		>
 | 
			
		||||
			<div class="title-container">
 | 
			
		||||
				<h3 class="title" :title="'标题'">
 | 
			
		||||
					<img
 | 
			
		||||
						src="../../assets/img/cnbm.png"
 | 
			
		||||
						style="width: 1em; height: 1em; position: relative; top: .15em; margin-right: 12px"
 | 
			
		||||
						alt=""
 | 
			
		||||
					/>
 | 
			
		||||
					<!-- {{ "title" | i18nFilter }} -->
 | 
			
		||||
					奥镁耐火砖PMS
 | 
			
		||||
				</h3>
 | 
			
		||||
			</div>
 | 
			
		||||
  <div class="login-container">
 | 
			
		||||
    <div
 | 
			
		||||
      class="login-background"
 | 
			
		||||
      :style="{
 | 
			
		||||
        backgroundImage: 'url(' + (coverImgUrl ? coverImgUrl : baseImg) + ')',
 | 
			
		||||
        backgroundSize: '100% 100%',
 | 
			
		||||
        backgroundRepeat: 'no-repeat',
 | 
			
		||||
      }"
 | 
			
		||||
    >
 | 
			
		||||
      <div class="login-background-container">
 | 
			
		||||
        <div class="back-title">
 | 
			
		||||
          Wel<span>come</span>
 | 
			
		||||
          <p><span class="back-title-point" />奥镁耐火砖</p>
 | 
			
		||||
        </div>
 | 
			
		||||
        <img :src="require('../../assets/img/login.gif')" style="width: 90%; margin-left: 5%" alt="" />
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <el-form ref="dataForm" :model="dataForm" :rules="dataRule" class="login-form" autocomplete="on" label-position="left">
 | 
			
		||||
      <div class="title-container">
 | 
			
		||||
        <h3 class="title" :title="'标题'">
 | 
			
		||||
          <img src="../../assets/img/cnbm.png" style="width: 1em; height: 1em; position: relative; top: 0.15em; margin-right: 12px" alt="" />
 | 
			
		||||
          <!-- {{ "title" | i18nFilter }} -->
 | 
			
		||||
          奥镁耐火砖PMS
 | 
			
		||||
        </h3>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
			<el-form-item prop="username" style="margin: 0px 8.3%">
 | 
			
		||||
				<el-input
 | 
			
		||||
					ref="username"
 | 
			
		||||
					v-model="dataForm.username"
 | 
			
		||||
					:placeholder="'请输入用户名'"
 | 
			
		||||
					name="username"
 | 
			
		||||
					type="text"
 | 
			
		||||
					tabindex="1"
 | 
			
		||||
					autocomplete="on"
 | 
			
		||||
				/>
 | 
			
		||||
			</el-form-item>
 | 
			
		||||
      <el-form-item prop="username" style="margin: 0px 8.3%">
 | 
			
		||||
        <el-input
 | 
			
		||||
          ref="username"
 | 
			
		||||
          v-model="dataForm.username"
 | 
			
		||||
          :placeholder="'请输入用户名'"
 | 
			
		||||
          name="username"
 | 
			
		||||
          type="text"
 | 
			
		||||
          tabindex="1"
 | 
			
		||||
          autocomplete="on"
 | 
			
		||||
        />
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
 | 
			
		||||
			<el-tooltip
 | 
			
		||||
				v-model="capsTooltip"
 | 
			
		||||
				content="Caps lock is On"
 | 
			
		||||
				placement="right"
 | 
			
		||||
				manual
 | 
			
		||||
			>
 | 
			
		||||
				<el-form-item prop="password" style="margin: 8px 8.3%">
 | 
			
		||||
					<el-input
 | 
			
		||||
						:key="passwordType"
 | 
			
		||||
						ref="password"
 | 
			
		||||
						v-model="dataForm.password"
 | 
			
		||||
						:type="passwordType"
 | 
			
		||||
						:placeholder="'请输入密码'"
 | 
			
		||||
						name="password"
 | 
			
		||||
						tabindex="2"
 | 
			
		||||
						autocomplete="on"
 | 
			
		||||
						@keyup.native="checkCapslock"
 | 
			
		||||
						@blur="capsTooltip = false"
 | 
			
		||||
						@keyup.enter.native="dataFormSubmitHandle"
 | 
			
		||||
					/>
 | 
			
		||||
					<span class="show-pwd" @click="showPwd">
 | 
			
		||||
						<!-- <svg-icon
 | 
			
		||||
      <el-tooltip v-model="capsTooltip" content="Caps lock is On" placement="right" manual>
 | 
			
		||||
        <el-form-item prop="password" style="margin: 8px 8.3%">
 | 
			
		||||
          <el-input
 | 
			
		||||
            :key="passwordType"
 | 
			
		||||
            ref="password"
 | 
			
		||||
            v-model="dataForm.password"
 | 
			
		||||
            :type="passwordType"
 | 
			
		||||
            :placeholder="'请输入密码'"
 | 
			
		||||
            name="password"
 | 
			
		||||
            tabindex="2"
 | 
			
		||||
            autocomplete="on"
 | 
			
		||||
            @keyup.native="checkCapslock"
 | 
			
		||||
            @blur="capsTooltip = false"
 | 
			
		||||
            @keyup.enter.native="dataFormSubmitHandle"
 | 
			
		||||
          />
 | 
			
		||||
          <span class="show-pwd" @click="showPwd">
 | 
			
		||||
            <!-- <svg-icon
 | 
			
		||||
							:icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"
 | 
			
		||||
						/> -->
 | 
			
		||||
					</span>
 | 
			
		||||
				</el-form-item>
 | 
			
		||||
			</el-tooltip>
 | 
			
		||||
          </span>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-tooltip>
 | 
			
		||||
 | 
			
		||||
			<el-form-item prop="captcha" style="margin: 0px 8.3%">
 | 
			
		||||
      <!-- <el-form-item prop="captcha" style="margin: 0px 8.3%">
 | 
			
		||||
				<el-row :gutter="20">
 | 
			
		||||
					<el-col :span="14">
 | 
			
		||||
						<el-input
 | 
			
		||||
							v-model="dataForm.captcha"
 | 
			
		||||
							:placeholder="$t('login.captcha')"
 | 
			
		||||
						>
 | 
			
		||||
							<!-- <span slot="prefix" class="el-input__icon">
 | 
			
		||||
								<svg class="icon-svg" aria-hidden="true">
 | 
			
		||||
									<use xlink:href="#icon-safetycertificate"></use>
 | 
			
		||||
								</svg>
 | 
			
		||||
							</span> -->
 | 
			
		||||
						</el-input>
 | 
			
		||||
					</el-col>
 | 
			
		||||
					<el-col :span="10" class="login-captcha">
 | 
			
		||||
						<img :src="captchaPath" @click="getCaptcha()" />
 | 
			
		||||
					</el-col>
 | 
			
		||||
				</el-row>
 | 
			
		||||
			</el-form-item>
 | 
			
		||||
			<!-- <lang-select class="login-language" /> -->
 | 
			
		||||
			</el-form-item> -->
 | 
			
		||||
      <!-- <span slot="prefix" class="el-input__icon">
 | 
			
		||||
								<svg class="icon-svg" aria-hidden="true">
 | 
			
		||||
									<use xlink:href="#icon-safetycertificate"></use>
 | 
			
		||||
								</svg>
 | 
			
		||||
							</span> -->
 | 
			
		||||
      <!-- <lang-select class="login-language" /> -->
 | 
			
		||||
 | 
			
		||||
			<el-button
 | 
			
		||||
				:loading="loading"
 | 
			
		||||
				type="primary"
 | 
			
		||||
				style="width: 83.4%; height: 6vh; background-color: #0B58FF; margin: 0px 8.3%; margin-top: 5vh"
 | 
			
		||||
				@click.native.prevent="dataFormSubmitHandle"
 | 
			
		||||
			>
 | 
			
		||||
				<!-- {{ "login.logIn" | i18nFilter }} -->
 | 
			
		||||
				登录
 | 
			
		||||
			</el-button>
 | 
			
		||||
			<el-row class="login-footer">
 | 
			
		||||
				<el-row class="login-language">
 | 
			
		||||
					<el-col
 | 
			
		||||
						:span="2"
 | 
			
		||||
						:offset="8"
 | 
			
		||||
						:class="['login-language-box', language === 'zh' ? 'isActive' : '']"
 | 
			
		||||
						@click.native="changeLanguage('zh')"
 | 
			
		||||
					>
 | 
			
		||||
						中文
 | 
			
		||||
					</el-col>
 | 
			
		||||
					<el-col :span="1" :offset="1" style="color: #DCDFE6">|</el-col>
 | 
			
		||||
					<el-col
 | 
			
		||||
						:span="2"
 | 
			
		||||
						:offset="1"
 | 
			
		||||
						:class="['login-language-box', language === 'en' ? 'isActive' : '']"
 | 
			
		||||
						@click.native="changeLanguage('en')"
 | 
			
		||||
					>
 | 
			
		||||
						English
 | 
			
		||||
					</el-col>
 | 
			
		||||
				</el-row>
 | 
			
		||||
				<el-row class="login-copyright">
 | 
			
		||||
					<!-- {{ "copyright.copyright" | i18nFilter }}:{{
 | 
			
		||||
      <el-button
 | 
			
		||||
        :loading="loading"
 | 
			
		||||
        type="primary"
 | 
			
		||||
        style="width: 83.4%; height: 6vh; background-color: #0b58ff; margin: 0px 8.3%; margin-top: 5vh"
 | 
			
		||||
        @click.native.prevent="dataFormSubmitHandle"
 | 
			
		||||
      >
 | 
			
		||||
        <!-- {{ "login.logIn" | i18nFilter }} -->
 | 
			
		||||
        登录
 | 
			
		||||
      </el-button>
 | 
			
		||||
      <el-row class="login-footer">
 | 
			
		||||
        <el-row class="login-language">
 | 
			
		||||
          <el-col :span="2" :offset="8" :class="['login-language-box', language === 'zh' ? 'isActive' : '']" @click.native="changeLanguage('zh')">
 | 
			
		||||
            中文
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="1" :offset="1" style="color: #dcdfe6">|</el-col>
 | 
			
		||||
          <el-col :span="2" :offset="1" :class="['login-language-box', language === 'en' ? 'isActive' : '']" @click.native="changeLanguage('en')">
 | 
			
		||||
            English
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
        <el-row class="login-copyright">
 | 
			
		||||
          <!-- {{ "copyright.copyright" | i18nFilter }}:{{
 | 
			
		||||
						"copyright.company" | i18nFilter
 | 
			
		||||
					}}    {{ "copyright.version" | i18nFilter }}:1.0 -->
 | 
			
		||||
					版权所有: ©中建材智能自动化研究院有限公司 2023 v1.0
 | 
			
		||||
				</el-row>
 | 
			
		||||
			</el-row>
 | 
			
		||||
		</el-form>
 | 
			
		||||
	</div>
 | 
			
		||||
          版权所有: ©中建材智能自动化研究院有限公司 2023 v1.0
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </el-row>
 | 
			
		||||
    </el-form>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
@@ -149,96 +117,104 @@ import debounce from "lodash/debounce";
 | 
			
		||||
import { getUUID } from "@/utils";
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: "Login",
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			baseImg: require("../../assets/img/login-back.png"),
 | 
			
		||||
			coverImgUrl: "",
 | 
			
		||||
			dataForm: {
 | 
			
		||||
				username: "admin",
 | 
			
		||||
				password: "admin",
 | 
			
		||||
				uuid: "string",
 | 
			
		||||
				captcha: "",
 | 
			
		||||
			},
 | 
			
		||||
			captchaPath: "",
 | 
			
		||||
			passwordType: "password",
 | 
			
		||||
			capsTooltip: false,
 | 
			
		||||
			loading: false,
 | 
			
		||||
			redirect: undefined,
 | 
			
		||||
			otherQuery: {},
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	computed: {
 | 
			
		||||
		language() {
 | 
			
		||||
			return "zh";
 | 
			
		||||
		},
 | 
			
		||||
		dataRule() {
 | 
			
		||||
			return {
 | 
			
		||||
				username: [
 | 
			
		||||
					{
 | 
			
		||||
						required: true,
 | 
			
		||||
						message: this.$t("validate.required"),
 | 
			
		||||
						trigger: "blur",
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				password: [
 | 
			
		||||
					{
 | 
			
		||||
						required: true,
 | 
			
		||||
						message: this.$t("validate.required"),
 | 
			
		||||
						trigger: "blur",
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
				captcha: [
 | 
			
		||||
					{
 | 
			
		||||
						required: true,
 | 
			
		||||
						message: this.$t("validate.required"),
 | 
			
		||||
						trigger: "blur",
 | 
			
		||||
					},
 | 
			
		||||
				],
 | 
			
		||||
			};
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
  name: "Login",
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      baseImg: require("../../assets/img/login-back.png"),
 | 
			
		||||
      coverImgUrl: "",
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        username: "admin",
 | 
			
		||||
        password: "admin",
 | 
			
		||||
        uuid: "string",
 | 
			
		||||
        captcha: "",
 | 
			
		||||
      },
 | 
			
		||||
      captchaPath: "",
 | 
			
		||||
      passwordType: "password",
 | 
			
		||||
      capsTooltip: false,
 | 
			
		||||
      loading: false,
 | 
			
		||||
      redirect: undefined,
 | 
			
		||||
      otherQuery: {},
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    language() {
 | 
			
		||||
      return "zh";
 | 
			
		||||
    },
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        username: [
 | 
			
		||||
          {
 | 
			
		||||
            required: true,
 | 
			
		||||
            message: this.$t("validate.required"),
 | 
			
		||||
            trigger: "blur",
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
        password: [
 | 
			
		||||
          {
 | 
			
		||||
            required: true,
 | 
			
		||||
            message: this.$t("validate.required"),
 | 
			
		||||
            trigger: "blur",
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
        captcha: [
 | 
			
		||||
          {
 | 
			
		||||
            required: true,
 | 
			
		||||
            message: this.$t("validate.required"),
 | 
			
		||||
            trigger: "blur",
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
	created() {
 | 
			
		||||
		this.getCaptcha();
 | 
			
		||||
	},
 | 
			
		||||
  created() {
 | 
			
		||||
    this.getCaptcha();
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
	methods: {
 | 
			
		||||
		// 检查大写
 | 
			
		||||
		checkCapslock() {},
 | 
			
		||||
		// 显示密码
 | 
			
		||||
		showPwd() {},
 | 
			
		||||
		// 改变语言环境
 | 
			
		||||
		changeLanguage(lang) {},
 | 
			
		||||
		// 获取验证码
 | 
			
		||||
		getCaptcha() {
 | 
			
		||||
			this.dataForm.uuid = getUUID();
 | 
			
		||||
			this.captchaPath = `${window.SITE_CONFIG["apiURL"]}/captcha?uuid=${this.dataForm.uuid}`;
 | 
			
		||||
		},
 | 
			
		||||
		// 表单提交
 | 
			
		||||
		dataFormSubmitHandle: debounce(
 | 
			
		||||
			function() {
 | 
			
		||||
				this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
					if (!valid) {
 | 
			
		||||
						return false;
 | 
			
		||||
					}
 | 
			
		||||
					this.$http
 | 
			
		||||
						.post("/login", this.dataForm)
 | 
			
		||||
						.then(({ data: res }) => {
 | 
			
		||||
							if (res.code !== 0) {
 | 
			
		||||
								this.getCaptcha();
 | 
			
		||||
								return this.$message.error(res.msg);
 | 
			
		||||
							}
 | 
			
		||||
							Cookies.set("token", res.data.token);
 | 
			
		||||
							this.$router.replace({ name: "home" });
 | 
			
		||||
						})
 | 
			
		||||
						.catch(() => {});
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
			1000,
 | 
			
		||||
			{ leading: true, trailing: false }
 | 
			
		||||
		),
 | 
			
		||||
	},
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 检查大写
 | 
			
		||||
    checkCapslock() {},
 | 
			
		||||
    // 显示密码
 | 
			
		||||
    showPwd() {},
 | 
			
		||||
    // 改变语言环境
 | 
			
		||||
    changeLanguage(lang) {},
 | 
			
		||||
    // 获取验证码
 | 
			
		||||
    getCaptcha() {
 | 
			
		||||
      this.dataForm.uuid = getUUID();
 | 
			
		||||
      this.captchaPath = `${window.SITE_CONFIG["apiURL"]}/captcha?uuid=${this.dataForm.uuid}`;
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http
 | 
			
		||||
            .post("/login", this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                this.getCaptcha();
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              Cookies.set("token", res.data.token);
 | 
			
		||||
              // 获取数据字典数据
 | 
			
		||||
              this.$http('/sys/dict/type/all', { limit: 999, page: 1 }).then(({data: res}) => {
 | 
			
		||||
                // console.log('[dictData] loading...', res)
 | 
			
		||||
                if (res.code === 0 && res.data) {
 | 
			
		||||
                  localStorage.setItem('dictList', JSON.stringify(res.data))
 | 
			
		||||
                }
 | 
			
		||||
              })
 | 
			
		||||
              // end
 | 
			
		||||
              this.$router.replace({ name: "home" });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
@@ -251,41 +227,41 @@ $light_gray: #fff;
 | 
			
		||||
$cursor: #161616;
 | 
			
		||||
 | 
			
		||||
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
 | 
			
		||||
	.login-container .el-input input {
 | 
			
		||||
		color: $cursor;
 | 
			
		||||
		height: 6vh !important;
 | 
			
		||||
	}
 | 
			
		||||
  .login-container .el-input input {
 | 
			
		||||
    color: $cursor;
 | 
			
		||||
    height: 6vh !important;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* reset element-ui css */
 | 
			
		||||
.login-container {
 | 
			
		||||
	.el-input {
 | 
			
		||||
		display: inline-block;
 | 
			
		||||
		height: 47px;
 | 
			
		||||
		width: 85%;
 | 
			
		||||
  .el-input {
 | 
			
		||||
    display: inline-block;
 | 
			
		||||
    height: 47px;
 | 
			
		||||
    width: 85%;
 | 
			
		||||
 | 
			
		||||
		input {
 | 
			
		||||
			background: transparent;
 | 
			
		||||
			border: 0px;
 | 
			
		||||
			-webkit-appearance: none;
 | 
			
		||||
			border-radius: 0px;
 | 
			
		||||
			padding: 12px 5px 12px 15px;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
    input {
 | 
			
		||||
      background: transparent;
 | 
			
		||||
      border: 0px;
 | 
			
		||||
      -webkit-appearance: none;
 | 
			
		||||
      border-radius: 0px;
 | 
			
		||||
      padding: 12px 5px 12px 15px;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
	.el-form-item {
 | 
			
		||||
		border: 1px solid #d7d8d9;
 | 
			
		||||
		border-radius: 5px;
 | 
			
		||||
		color: #454545;
 | 
			
		||||
		height: 6vh;
 | 
			
		||||
		.el-form-item__content {
 | 
			
		||||
			height: calc(6vh - 2px);
 | 
			
		||||
			line-height: 6vh;
 | 
			
		||||
			.el-input {
 | 
			
		||||
				height: calc(6vh - 2px);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
  .el-form-item {
 | 
			
		||||
    border: 1px solid #d7d8d9;
 | 
			
		||||
    border-radius: 5px;
 | 
			
		||||
    color: #454545;
 | 
			
		||||
    height: 6vh;
 | 
			
		||||
    .el-form-item__content {
 | 
			
		||||
      height: calc(6vh - 2px);
 | 
			
		||||
      line-height: 6vh;
 | 
			
		||||
      .el-input {
 | 
			
		||||
        height: calc(6vh - 2px);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
 | 
			
		||||
@@ -296,146 +272,146 @@ $light_gray: #eee;
 | 
			
		||||
$cursor: #161616;
 | 
			
		||||
 | 
			
		||||
.login-container {
 | 
			
		||||
	min-height: 100%;
 | 
			
		||||
	width: 100%;
 | 
			
		||||
	background-size: cover;
 | 
			
		||||
	// background-color: $bg;
 | 
			
		||||
	overflow: hidden;
 | 
			
		||||
	.login-background {
 | 
			
		||||
		position: absolute;
 | 
			
		||||
		width: 60%;
 | 
			
		||||
		top: 0;
 | 
			
		||||
		left: 0;
 | 
			
		||||
		bottom: 0;
 | 
			
		||||
		display: flex;
 | 
			
		||||
		justify-content: center;
 | 
			
		||||
		align-items: center;
 | 
			
		||||
		.login-background-container {
 | 
			
		||||
			width: 95%;
 | 
			
		||||
			.back-title {
 | 
			
		||||
				color: #26b9de;
 | 
			
		||||
				font-size: 88px;
 | 
			
		||||
				margin-left: 17%;
 | 
			
		||||
				span {
 | 
			
		||||
					color: #fff;
 | 
			
		||||
				}
 | 
			
		||||
				p {
 | 
			
		||||
					font-size: 22px;
 | 
			
		||||
					letter-spacing: 1px;
 | 
			
		||||
					.back-title-point {
 | 
			
		||||
						display: inline-block;
 | 
			
		||||
						width: 16px;
 | 
			
		||||
						height: 16px;
 | 
			
		||||
						border-radius: 8px;
 | 
			
		||||
						background-color: #26b9de;
 | 
			
		||||
						margin-right: 14px;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
  min-height: 100%;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  background-size: cover;
 | 
			
		||||
  // background-color: $bg;
 | 
			
		||||
  overflow: hidden;
 | 
			
		||||
  .login-background {
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    width: 60%;
 | 
			
		||||
    top: 0;
 | 
			
		||||
    left: 0;
 | 
			
		||||
    bottom: 0;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    justify-content: center;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
    .login-background-container {
 | 
			
		||||
      width: 95%;
 | 
			
		||||
      .back-title {
 | 
			
		||||
        color: #26b9de;
 | 
			
		||||
        font-size: 88px;
 | 
			
		||||
        margin-left: 17%;
 | 
			
		||||
        span {
 | 
			
		||||
          color: #fff;
 | 
			
		||||
        }
 | 
			
		||||
        p {
 | 
			
		||||
          font-size: 22px;
 | 
			
		||||
          letter-spacing: 1px;
 | 
			
		||||
          .back-title-point {
 | 
			
		||||
            display: inline-block;
 | 
			
		||||
            width: 16px;
 | 
			
		||||
            height: 16px;
 | 
			
		||||
            border-radius: 8px;
 | 
			
		||||
            background-color: #26b9de;
 | 
			
		||||
            margin-right: 14px;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
	.login-form {
 | 
			
		||||
		position: absolute;
 | 
			
		||||
		width: 40%;
 | 
			
		||||
		max-width: 100%;
 | 
			
		||||
		top: 0;
 | 
			
		||||
		right: 0;
 | 
			
		||||
		bottom: 0;
 | 
			
		||||
		padding: 0 6.67%;
 | 
			
		||||
		margin: 0 auto;
 | 
			
		||||
		overflow: hidden;
 | 
			
		||||
		background: rgba($color: #fff, $alpha: 1);
 | 
			
		||||
		backdrop-filter: blur(10px);
 | 
			
		||||
		box-shadow: 5px 5px 5px rgba($color: #000000, $alpha: 0.1);
 | 
			
		||||
		.login-footer {
 | 
			
		||||
			position: absolute;
 | 
			
		||||
			bottom: 0;
 | 
			
		||||
			right: 0;
 | 
			
		||||
			left: 0;
 | 
			
		||||
			margin-bottom: 5vh;
 | 
			
		||||
		}
 | 
			
		||||
		.login-language {
 | 
			
		||||
			font-size: 15px;
 | 
			
		||||
			text-align: center;
 | 
			
		||||
			color: $cursor;
 | 
			
		||||
			margin-bottom: 12px;
 | 
			
		||||
			.login-language-box {
 | 
			
		||||
				cursor: pointer;
 | 
			
		||||
			}
 | 
			
		||||
			.isActive {
 | 
			
		||||
				color: #0b58ff;
 | 
			
		||||
				cursor: auto;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		.login-copyright {
 | 
			
		||||
			text-align: center;
 | 
			
		||||
			color: #c7c7c7;
 | 
			
		||||
			font-size: 15px;
 | 
			
		||||
			line-height: 28px;
 | 
			
		||||
			padding: 0 16%;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
  .login-form {
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    width: 40%;
 | 
			
		||||
    max-width: 100%;
 | 
			
		||||
    top: 0;
 | 
			
		||||
    right: 0;
 | 
			
		||||
    bottom: 0;
 | 
			
		||||
    padding: 0 6.67%;
 | 
			
		||||
    margin: 0 auto;
 | 
			
		||||
    overflow: hidden;
 | 
			
		||||
    background: rgba($color: #fff, $alpha: 1);
 | 
			
		||||
    backdrop-filter: blur(10px);
 | 
			
		||||
    box-shadow: 5px 5px 5px rgba($color: #000000, $alpha: 0.1);
 | 
			
		||||
    .login-footer {
 | 
			
		||||
      position: absolute;
 | 
			
		||||
      bottom: 0;
 | 
			
		||||
      right: 0;
 | 
			
		||||
      left: 0;
 | 
			
		||||
      margin-bottom: 5vh;
 | 
			
		||||
    }
 | 
			
		||||
    .login-language {
 | 
			
		||||
      font-size: 15px;
 | 
			
		||||
      text-align: center;
 | 
			
		||||
      color: $cursor;
 | 
			
		||||
      margin-bottom: 12px;
 | 
			
		||||
      .login-language-box {
 | 
			
		||||
        cursor: pointer;
 | 
			
		||||
      }
 | 
			
		||||
      .isActive {
 | 
			
		||||
        color: #0b58ff;
 | 
			
		||||
        cursor: auto;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    .login-copyright {
 | 
			
		||||
      text-align: center;
 | 
			
		||||
      color: #c7c7c7;
 | 
			
		||||
      font-size: 15px;
 | 
			
		||||
      line-height: 28px;
 | 
			
		||||
      padding: 0 16%;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
	.tips {
 | 
			
		||||
		font-size: 14px;
 | 
			
		||||
		color: #fff;
 | 
			
		||||
		margin-bottom: 10px;
 | 
			
		||||
  .tips {
 | 
			
		||||
    font-size: 14px;
 | 
			
		||||
    color: #fff;
 | 
			
		||||
    margin-bottom: 10px;
 | 
			
		||||
 | 
			
		||||
		span {
 | 
			
		||||
			&:first-of-type {
 | 
			
		||||
				margin-right: 16px;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
    span {
 | 
			
		||||
      &:first-of-type {
 | 
			
		||||
        margin-right: 16px;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
	.svg-container {
 | 
			
		||||
		padding: 6px 5px 6px 15px;
 | 
			
		||||
		color: #000;
 | 
			
		||||
		vertical-align: middle;
 | 
			
		||||
		width: 30px;
 | 
			
		||||
		display: inline-block;
 | 
			
		||||
	}
 | 
			
		||||
  .svg-container {
 | 
			
		||||
    padding: 6px 5px 6px 15px;
 | 
			
		||||
    color: #000;
 | 
			
		||||
    vertical-align: middle;
 | 
			
		||||
    width: 30px;
 | 
			
		||||
    display: inline-block;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
	.title-container {
 | 
			
		||||
		position: relative;
 | 
			
		||||
		margin-top: 18vh;
 | 
			
		||||
  .title-container {
 | 
			
		||||
    position: relative;
 | 
			
		||||
    margin-top: 18vh;
 | 
			
		||||
 | 
			
		||||
		.title {
 | 
			
		||||
			font-size: 34px;
 | 
			
		||||
			line-height: 6vh;
 | 
			
		||||
			margin: 0px auto 40px auto;
 | 
			
		||||
			text-align: center;
 | 
			
		||||
			overflow: hidden;
 | 
			
		||||
			text-overflow: ellipsis;
 | 
			
		||||
			word-break: break-all;
 | 
			
		||||
			display: -webkit-box;
 | 
			
		||||
			-webkit-line-clamp: 3;
 | 
			
		||||
			-webkit-box-orient: vertical;
 | 
			
		||||
			letter-spacing: 2px;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
    .title {
 | 
			
		||||
      font-size: 34px;
 | 
			
		||||
      line-height: 6vh;
 | 
			
		||||
      margin: 0px auto 40px auto;
 | 
			
		||||
      text-align: center;
 | 
			
		||||
      overflow: hidden;
 | 
			
		||||
      text-overflow: ellipsis;
 | 
			
		||||
      word-break: break-all;
 | 
			
		||||
      display: -webkit-box;
 | 
			
		||||
      -webkit-line-clamp: 3;
 | 
			
		||||
      -webkit-box-orient: vertical;
 | 
			
		||||
      letter-spacing: 2px;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
	.show-pwd {
 | 
			
		||||
		position: absolute;
 | 
			
		||||
		right: 10px;
 | 
			
		||||
		top: 0;
 | 
			
		||||
		font-size: 16px;
 | 
			
		||||
		color: $dark_gray;
 | 
			
		||||
		cursor: pointer;
 | 
			
		||||
		user-select: none;
 | 
			
		||||
	}
 | 
			
		||||
  .show-pwd {
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    right: 10px;
 | 
			
		||||
    top: 0;
 | 
			
		||||
    font-size: 16px;
 | 
			
		||||
    color: $dark_gray;
 | 
			
		||||
    cursor: pointer;
 | 
			
		||||
    user-select: none;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
	.thirdparty-button {
 | 
			
		||||
		position: absolute;
 | 
			
		||||
		right: 0;
 | 
			
		||||
		bottom: 6px;
 | 
			
		||||
	}
 | 
			
		||||
  .thirdparty-button {
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    right: 0;
 | 
			
		||||
    bottom: 6px;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
	@media only screen and (max-width: 470px) {
 | 
			
		||||
		.thirdparty-button {
 | 
			
		||||
			display: none;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
  @media only screen and (max-width: 470px) {
 | 
			
		||||
    .thirdparty-button {
 | 
			
		||||
      display: none;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user