From bd8290e0b5c8de45f5785d93dc02ca38bf48b3f1 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 28 八月 2023 17:48:44 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.110.209:9001/r/lims-before
---
src/views/basicData/index.vue | 883 +++++++++++++++++++++-------------------------
src/views/login/index.vue | 232 ++++++------
2 files changed, 518 insertions(+), 597 deletions(-)
diff --git a/src/views/basicData/index.vue b/src/views/basicData/index.vue
index 7aa28c5..3ce4b75 100644
--- a/src/views/basicData/index.vue
+++ b/src/views/basicData/index.vue
@@ -1,493 +1,414 @@
<template>
- <div class="main_div">
- <div class="top_div">
- <span>鏍峰搧鍚嶇О锛�</span>
- <el-select
- v-model="params.material"
- size="small"
- placeholder="璇烽�夋嫨鏍峰搧鍚嶇О"
- >
- <el-option
- v-for="item in productModelSelectmater"
- :value="item"
- :key="item.index"
- :label="item"
- ></el-option>
- </el-select>
- <span class="top_div_span">椤圭洰鍒嗙粍锛�</span>
- <el-input
- v-model="params.father"
- placeholder="璇疯緭鍏ラ」鐩垎缁�"
- style="width: 10%"
- size="small "
- ></el-input>
- <span class="top_div_span">椤圭洰鍚嶇О锛�</span>
- <el-input
- v-model="params.name"
- placeholder="璇疯緭鍏ラ」鐩悕绉�"
- style="width: 10%"
- size="small "
- ></el-input>
- <el-button
- type="primary"
- class="top_div_button"
- size="small"
- @click="selectProductModelTable"
- >鏌ヨ</el-button
- >
- <el-button class="top_div_button" size="small" @click="params = {}"
- >閲嶇疆</el-button
- >
- <div style="float: right">
- <el-button
- class="top_div_button"
- type="primary"
- size="small"
- icon="el-icon-folder-add"
- @click="centerDialogVisible = true"
- >鏂板</el-button
- >
- <el-dialog
- :visible.sync="centerDialogVisible"
- width="30%"
- right
- :before-close="handleClose"
- :title="isUpdate ? '鏇存柊' : '鏂板'"
- >
- <el-form :model="form" :rules="rules" ref="ruleForm" class="addForm">
- <el-form-item prop="material" required>
- <span>鏍峰搧鍚嶇О锛�</span>
- <el-select
- v-model="form.material"
- style="width: 85%"
- placeholder="璇烽�夋嫨鏍峰搧鍚嶇О"
- >
- <el-option
- v-for="(item, index) in productModelSelectmater"
- :key="index"
- :value="item"
- :label="item"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <span>椤圭洰鍒嗙粍锛�</span>
- <el-select
- v-model="form.father"
- style="width: 85%"
- placeholder="璇烽�夋嫨椤圭洰鍒嗙粍"
- >
- <el-option
- v-for="(item, index) in projectGroupingOptions"
- :key="index"
- :value="item"
- :label="item"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-row :gutter="24">
- <el-col :span="12"
- ><el-form-item prop="name" required
- ><span>椤圭洰鍚嶇О锛�</span>
- <el-input
- style="width: 70%"
- v-model="form.name"
- placeholder="璇疯緭鍏ラ」鐩悕绉�"
- ></el-input></el-form-item
- ></el-col>
- <el-col :span="12">
- <el-form-item prop="unit">
- <span
- v-html="'鍗� 浣嶏細'"
- ></span>
- <el-input
- style="width: 70%"
- v-model="form.unit"
- placeholder="璇疯緭鍏ュ崟浣�"
- ></el-input></el-form-item
- ></el-col>
- </el-row>
- </el-form>
-
- <span slot="footer" class="dialog-footer">
- <el-button @click="centerDialogVisible = false" size="small "
- >鍙� 娑�</el-button
- >
- <el-button type="primary" @click="submitAdd" size="small ">{{
+ <div class="main_div">
+ <div class="top_div">
+ <span>鏍峰搧鍚嶇О锛�</span>
+ <el-select v-model="params.material" size="small" placeholder="璇烽�夋嫨鏍峰搧鍚嶇О">
+ <el-option v-for="item in productModelSelectmater" :value="item" :key="item.index" :label="item"></el-option>
+ </el-select>
+ <span class="top_div_span">椤圭洰鍒嗙粍锛�</span>
+ <el-input v-model="params.father" placeholder="璇疯緭鍏ラ」鐩垎缁�" style="width: 10%" size="small "></el-input>
+ <span class="top_div_span">椤圭洰鍚嶇О锛�</span>
+ <el-input v-model="params.name" placeholder="璇疯緭鍏ラ」鐩悕绉�" style="width: 10%" size="small "></el-input>
+ <el-button type="primary" class="top_div_button" size="small" @click="selectProductModelTable">鏌ヨ</el-button>
+ <el-button class="top_div_button" size="small" @click="params = {}">閲嶇疆</el-button>
+ <div style="float: right">
+ <el-button class="top_div_button" type="primary" size="small" icon="el-icon-folder-add"
+ @click="centerDialogVisible = true">鏂板</el-button>
+ <el-dialog :visible.sync="centerDialogVisible" width="30%" right :before-close="handleClose"
+ :title="isUpdate ? '鏇存柊' : '鏂板'" :hide-required-asterisk="false">
+ <el-form :model="form" :rules="rules" ref="ruleForm" class="addForm">
+ <el-form-item prop="material" required>
+ <span>鏍峰搧鍚嶇О锛�</span>
+ <el-autocomplete class="inline-input" v-model="form.material" :fetch-suggestions="querySearch"
+ placeholder="璇疯緭鍏ユ牱鍝佸悕绉�"></el-autocomplete>
+ </el-form-item>
+ <el-form-item>
+ <span>椤圭洰鍒嗙粍锛�</span>
+ <el-input v-model="form.father" style="width: 85%" placeholder="璇疯緭鍏ユ牱鍝佸垎缁�"></el-input>
+ </el-form-item>
+ <el-row :gutter="24">
+ <el-col :span="12"><el-form-item prop="name" required><span>椤圭洰鍚嶇О锛�</span>
+ <el-input style="width: 70%" v-model="form.name"
+ placeholder="璇疯緭鍏ラ」鐩悕绉�"></el-input></el-form-item></el-col>
+ <el-col :span="12">
+ <el-form-item prop="unit">
+ <span v-html="'鍗� 浣嶏細'"></span>
+ <el-input style="width: 70%" v-model="form.unit"
+ placeholder="璇疯緭鍏ュ崟浣�"></el-input></el-form-item></el-col>
+ </el-row>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="centerDialogVisible = false" size="small ">鍙� 娑�</el-button>
+ <el-button type="primary" @click="submitAdd" size="small ">{{
isUpdate ? "鏇� 鏂�" : "淇� 瀛�"
}}</el-button>
- </span>
- </el-dialog>
- <el-button
- class="top_div_button"
- icon="el-icon-delete-solid"
- size="small"
- style="color: #00a5ff"
- @click="deleteListClick"
- >鍒犻櫎</el-button
- >
- </div>
- </div>
- <div class="table_div">
- <el-table
- :data="tableData"
- style="width: 100%; margin-bottom: 20px"
- row-key="id"
- border
- height="calc(100vh - 250px)"
- default-expand-all
- ref="multipleTable"
- @select="selectTr"
- @select-all="selectAll"
- @selection-change="handleSelectionChange"
- :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
- >
- <el-table-column type="selection" label="搴忓彿"> </el-table-column>
- <el-table-column
- type="index"
- width="50px"
- label="搴忓彿"
- ></el-table-column>
- <el-table-column label="椤圭洰鍚嶇О" sortable>
- <template scope="scope">
- <el-tag
- ><div
- class="firstDiv"
- :style="`color: ${
+ </span>
+ </el-dialog>
+ <el-button class="top_div_button" icon="el-icon-delete-solid" size="small" style="color: #00a5ff"
+ @click="deleteListClick">鍒犻櫎</el-button>
+ </div>
+ </div>
+ <div class="table_div">
+ <el-table :data="tableData" style="width: 100%; margin-bottom: 20px" row-key="id" border
+ height="calc(100vh - 250px)" default-expand-all ref="multipleTable" @select="selectTr" @select-all="selectAll"
+ @selection-change="handleSelectionChange" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
+ <el-table-column type="selection" label="搴忓彿"> </el-table-column>
+ <el-table-column type="index" width="50px" label="搴忓彿"></el-table-column>
+ <el-table-column label="椤圭洰鍚嶇О" sortable>
+ <template scope="scope">
+ <el-tag>
+ <div class="firstDiv" :style="`color: ${
scope.row.code == '[1]' ? '#16a7ff' : '#58c173'
- }`"
- >
- {{ scope.row.code == "[1]" ? "01" : "02" }}
- </div>
- <span style="color: black">{{ scope.row.name }}</span></el-tag
- >
- </template>
- </el-table-column>
- <el-table-column prop="unit" label="鍗曚綅" sortable></el-table-column>
- <el-table-column label="鎿嶄綔">
- <template slot-scope="scope">
- <div v-if="scope.row.code == '[2]' || scope.row.edit == true">
- <el-button type="text" size="mini" @click="childrenClick(scope)"
- >缂栬緫</el-button
- >
- <el-button
- type="text"
- size="mini"
- @click="deleteTreeChildren(scope)"
- >鍒犻櫎</el-button
- >
- </div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
+ }`">
+ {{ scope.row.code == "[1]" ? "01" : "02" }}
+ </div>
+ <span style="color: black">{{ scope.row.name }}</span>
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="unit" label="鍗曚綅" sortable></el-table-column>
+ <el-table-column label="鎿嶄綔">
+ <template slot-scope="scope">
+ <div v-if="scope.row.code == '[2]' || scope.row.edit == true">
+ <el-button type="text" size="mini" @click="childrenClick(scope)">缂栬緫</el-button>
+ <el-button type="text" size="mini" @click="deleteTreeChildren(scope)">鍒犻櫎</el-button>
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
</template>
<script>
-import {
- addStandardProjectGroupApi,
- productModelSelectmaterApi,
- addproductModelApi,
- selectproductModelApi,
- deleteProductModelApi,
- selectproductModelByIdApi,
- updateProductModelApi,
- deleteListApi,
-} from "@/api/basicData/index";
-export default {
- name: "BasicDataMessage",
- data() {
- return {
- isAllSelect: false,
- projectGroupingOptions: [],
- productModelSelectmater: [],
- value: "",
- isUpdate: false,
- projectName: "",
- tableData: [],
- centerDialogVisible: false,
- deleteList: [],
- form: {
- material: "", // 鏍峰搧鍚嶇О
- father: "", // 椤圭洰鍒嗙粍
- name: "", // 椤圭洰鍚嶇О
- unit: "", // 鍗曚綅
- },
- params: {
- material: "",
- father: "",
- name: "",
- },
- rules: {
- material: [
- { required: true, message: "璇烽�夋嫨鏍峰搧鍚嶇О", trigger: "change" },
- ],
- name: [
- { required: true, message: "璇疯緭鍏ラ」鐩悕绉�", trigger: "blur" },
- {
- min: 2,
- max: 25,
- message: "闀垮害鍦� 2 鍒� 25 涓瓧绗�",
- trigger: "blur",
- },
- ],
- unit: [
- { required: true, message: "璇疯緭鍏ュ崟浣�", trigger: "blur" },
- {
- min: 1,
- max: 25,
- message: "闀垮害鍦� 1 鍒� 25 涓瓧绗�",
- trigger: "blur",
- },
- ],
- },
- };
- },
- methods: {
- submitAdd() {
- if (!this.isUpdate) {
- this.$refs.ruleForm.validate((valid) => {
- if (valid) {
- addproductModelApi(this.form).then((res) => {
- this.centerDialogVisible = false;
- this.$message({
- message: res.message,
- type: "success",
- });
- this.selectProductModelTable();
- });
- }
- });
- } else {
- this.$refs.ruleForm.validate((valid) => {
- if (valid) {
- updateProductModelApi(this.form).then((res) => {
- this.centerDialogVisible = false;
- this.$message({
- message: res.message,
- type: "success",
- });
- this.selectProductModelTable();
- });
- }
- });
- }
- },
- async selectProductMaster() {
- await productModelSelectmaterApi().then((res) => {
- this.productModelSelectmater = res.data;
- });
- },
- handleClose(done) {
- this.$confirm("纭鍏抽棴锛�")
- .then((_) => {
- this.centerDialogVisible = false;
- done();
- })
- .catch((_) => {});
- },
- selectProductModelTable() {
- selectproductModelApi(this.params).then((res) => {
- res.data.forEach((i) => {
- if (i.name === undefined) {
- i.name = i.children[0].name;
- i.unit = i.children[0].unit;
- i.id = i.children[0].id;
- i.edit = true;
- delete i.children;
- }
- });
- this.tableData = res.data;
- this.selectDataList();
- });
- },
- childrenClick(scope) {
- this.isUpdate = true;
- let father = "";
- selectproductModelByIdApi(scope.row.id).then((res) => {
- let result = res.data;
- this.form.name = result.name;
- this.form.material = result.material;
- this.form.father = result.father;
- this.form.unit = result.unit;
- this.form.id = scope.row.id;
- });
- this.centerDialogVisible = true;
- },
- selectDataList() {
- this.tableData.forEach((a) => {
- a.code = "[1]";
- if (a.children != undefined) {
- a.children.forEach((b) => {
- b.code = "[2]";
- });
- }
- });
- },
- deleteTreeChildren(scope) {
- deleteProductModelApi(scope.row.id).then((res) => {
- this.$message({
- message: res.message,
- type: "success",
- });
- this.selectProductModelTable();
- });
- },
+ import {
+ addStandardProjectGroupApi,
+ productModelSelectmaterApi,
+ addproductModelApi,
+ selectproductModelApi,
+ deleteProductModelApi,
+ selectproductModelByIdApi,
+ updateProductModelApi,
+ deleteListApi,
+ } from "@/api/basicData/index";
+ export default {
+ name: "BasicDataMessage",
+ data() {
+ return {
+ isAllSelect: false,
+ projectGroupingOptions: [],
+ productModelSelectmater: [],
+ value: "",
+ isUpdate: false,
+ projectName: "",
+ tableData: [],
+ centerDialogVisible: false,
+ deleteList: [],
+ form: {
+ material: "", // 鏍峰搧鍚嶇О
+ father: "", // 椤圭洰鍒嗙粍
+ name: "", // 椤圭洰鍚嶇О
+ unit: "", // 鍗曚綅
+ },
+ params: {
+ material: "",
+ father: "",
+ name: "",
+ },
+ rules: {
+ material: [{
+ required: true,
+ message: "璇疯緭鍏ユ牱鍝佸悕绉�",
+ trigger: "blur"
+ }],
+ name: [{
+ required: true,
+ message: "璇疯緭鍏ラ」鐩悕绉�",
+ trigger: "blur"
+ },
+ {
+ min: 2,
+ max: 25,
+ message: "闀垮害鍦� 2 鍒� 25 涓瓧绗�",
+ trigger: "blur",
+ },
+ ],
+ unit: [{
+ required: true,
+ message: "璇疯緭鍏ュ崟浣�",
+ trigger: "blur"
+ },
+ {
+ min: 1,
+ max: 25,
+ message: "闀垮害鍦� 1 鍒� 25 涓瓧绗�",
+ trigger: "blur",
+ },
+ ],
+ },
+ };
+ },
+ methods: {
+ submitAdd() {
+ if (!this.isUpdate) {
+ this.$refs.ruleForm.validate((valid) => {
+ if (valid) {
+ addproductModelApi(this.form).then((res) => {
+ this.centerDialogVisible = false;
+ this.$message({
+ message: res.message,
+ type: "success",
+ });
+ this.selectProductModelTable();
+ });
+ }
+ });
+ } else {
+ this.$refs.ruleForm.validate((valid) => {
+ if (valid) {
+ updateProductModelApi(this.form).then((res) => {
+ this.centerDialogVisible = false;
+ this.$message({
+ message: res.message,
+ type: "success",
+ });
+ this.selectProductModelTable();
+ });
+ }
+ });
+ }
+ },
+ async selectProductMaster() {
+ await productModelSelectmaterApi().then((res) => {
+ this.productModelSelectmater = res.data;
+ });
+ },
+ handleClose(done) {
+ this.$confirm("纭鍏抽棴锛�")
+ .then((_) => {
+ this.centerDialogVisible = false;
+ done();
+ })
+ .catch((_) => {});
+ },
+ selectProductModelTable() {
+ selectproductModelApi(this.params).then((res) => {
+ res.data.forEach((i) => {
+ if (i.name === undefined) {
+ i.name = i.children[0].name;
+ i.unit = i.children[0].unit;
+ i.id = i.children[0].id;
+ i.edit = true;
+ delete i.children;
+ }
+ });
+ this.tableData = res.data;
+ this.selectDataList();
+ });
+ },
+ childrenClick(scope) {
+ this.isUpdate = true;
+ let father = "";
+ selectproductModelByIdApi(scope.row.id).then((res) => {
+ let result = res.data;
+ this.form.name = result.name;
+ this.form.material = result.material;
+ this.form.father = result.father;
+ this.form.unit = result.unit;
+ this.form.id = scope.row.id;
+ });
+ this.centerDialogVisible = true;
+ },
+ selectDataList() {
+ this.tableData.forEach((a) => {
+ a.code = "[1]";
+ if (a.children != undefined) {
+ a.children.forEach((b) => {
+ b.code = "[2]";
+ });
+ }
+ });
+ },
+ deleteTreeChildren(scope) {
+ deleteProductModelApi(scope.row.id).then((res) => {
+ this.$message({
+ message: res.message,
+ type: "success",
+ });
+ this.selectProductModelTable();
+ });
+ },
- // 琛ㄦ牸鏍戝叏閮ㄩ�変腑閰嶇疆
- // 鍏ㄩ��/鍙栨秷閫夋搷浣�
- selectAll(val) {
- this.isAllSelect = !this.isAllSelect;
- let data = this.tableData;
- this.toggleSelect(data, this.isAllSelect, "all");
- },
- //閫夋嫨鏌愯
- selectTr(selection, row) {
- this.$set(row, "isChecked", !row.isChecked);
- this.$nextTick(() => {
- this.isAllSelect = row.isChecked;
- this.toggleSelect(row, row.isChecked, "tr");
- });
- },
- //閫掑綊瀛愮骇
- toggleSelect(data, flag, type) {
- if (type === "all") {
- if (data.length > 0) {
- data.forEach((item) => {
- this.toggleSelection(item, flag);
- if (item.children && item.children.length > 0) {
- this.toggleSelect(item.children, flag, type);
- }
- });
- }
- } else {
- if (data.children && data.children.length > 0) {
- data.children.forEach((item) => {
- item.isChecked = !item.isChecked;
- this.$refs.multipleTable.toggleRowSelection(item, flag);
- this.toggleSelect(item, flag, type);
- });
- }
- }
- },
- //鏀瑰彉閫変腑
- toggleSelection(row, flag) {
- this.$set(row, "isChecked", flag);
- this.$nextTick(() => {
- if (flag) {
- this.$refs.multipleTable.toggleRowSelection(row, flag);
- } else {
- this.$refs.multipleTable.clearSelection();
- }
- });
- },
- handleSelectionChange(val) {
- this.deleteList = [];
- val.forEach((v) => {
- if (v.id !== undefined) {
- this.deleteList.push(v.id);
- }
- });
- console.log(`output->this.deleteList`, this.deleteList);
- },
- // 琛ㄦ牸鏍戝叏閮ㄩ�変腑閰嶇疆 缁撴潫
- deleteListClick() {
- deleteListApi(this.deleteList).then((res) => {
- this.$message({
- message: res.message,
- type: "success",
- });
- this.selectProductModelTable();
- });
- },
- },
- mounted() {
- this.selectProductMaster().then((res) => {
- this.params.material = this.productModelSelectmater[0];
- this.selectProductModelTable();
- });
- },
- watch: {
- centerDialogVisible: {
- handler(newVal, oldVal) {
- if (newVal == true) {
- addStandardProjectGroupApi().then((res) => {
- this.projectGroupingOptions = res.data;
- });
- } else {
- // 璇锋眰鎴愬姛娓呴櫎鏁版嵁
- this.form = {};
- // 鎻愪氦鎴愬姛娓呴櫎妫�楠�
- this.$refs.ruleForm.resetFields();
- this.isUpdate = false;
- }
- },
- },
- },
-};
+ // 琛ㄦ牸鏍戝叏閮ㄩ�変腑閰嶇疆
+ // 鍏ㄩ��/鍙栨秷閫夋搷浣�
+ selectAll(val) {
+ this.isAllSelect = !this.isAllSelect;
+ let data = this.tableData;
+ this.toggleSelect(data, this.isAllSelect, "all");
+ },
+ //閫夋嫨鏌愯
+ selectTr(selection, row) {
+ this.$set(row, "isChecked", !row.isChecked);
+ this.$nextTick(() => {
+ this.isAllSelect = row.isChecked;
+ this.toggleSelect(row, row.isChecked, "tr");
+ });
+ },
+ //閫掑綊瀛愮骇
+ toggleSelect(data, flag, type) {
+ if (type === "all") {
+ if (data.length > 0) {
+ data.forEach((item) => {
+ this.toggleSelection(item, flag);
+ if (item.children && item.children.length > 0) {
+ this.toggleSelect(item.children, flag, type);
+ }
+ });
+ }
+ } else {
+ if (data.children && data.children.length > 0) {
+ data.children.forEach((item) => {
+ item.isChecked = !item.isChecked;
+ this.$refs.multipleTable.toggleRowSelection(item, flag);
+ this.toggleSelect(item, flag, type);
+ });
+ }
+ }
+ },
+ //鏀瑰彉閫変腑
+ toggleSelection(row, flag) {
+ this.$set(row, "isChecked", flag);
+ this.$nextTick(() => {
+ if (flag) {
+ this.$refs.multipleTable.toggleRowSelection(row, flag);
+ } else {
+ this.$refs.multipleTable.clearSelection();
+ }
+ });
+ },
+ handleSelectionChange(val) {
+ this.deleteList = [];
+ val.forEach((v) => {
+ if (v.id !== undefined) {
+ this.deleteList.push(v.id);
+ }
+ });
+ console.log(`output->this.deleteList`, this.deleteList);
+ },
+ // 琛ㄦ牸鏍戝叏閮ㄩ�変腑閰嶇疆 缁撴潫
+ deleteListClick() {
+ deleteListApi(this.deleteList).then((res) => {
+ this.$message({
+ message: res.message,
+ type: "success",
+ });
+ this.selectProductModelTable();
+ });
+ },
+ querySearch(queryString, cb) {
+ var restaurants = this.restaurants;
+ var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
+ // 璋冪敤 callback 杩斿洖寤鸿鍒楄〃鐨勬暟鎹�
+ cb(results);
+ }
+ },
+ mounted() {
+ this.selectProductMaster().then((res) => {
+ this.params.material = this.productModelSelectmater[0];
+ this.selectProductModelTable();
+ });
+ },
+ watch: {
+ centerDialogVisible: {
+ handler(newVal, oldVal) {
+ if (newVal == true) {
+ addStandardProjectGroupApi().then((res) => {
+ this.projectGroupingOptions = res.data;
+ });
+ } else {
+ // 璇锋眰鎴愬姛娓呴櫎鏁版嵁
+ this.form = {};
+ // 鎻愪氦鎴愬姛娓呴櫎妫�楠�
+ this.$refs.ruleForm.resetFields();
+ this.isUpdate = false;
+ }
+ },
+ },
+ },
+ };
</script>
<style>
-.el-tag.el-tag {
- border-color: transparent;
- background-color: transparent;
-}
-.el-tag.el-tag:hover {
- border-color: transparent;
- background-color: transparent;
-}
-.firstDiv {
- float: left;
- width: 20px;
- height: 20px;
- border-radius: 50%;
- background-color: #eff5ff;
- margin-top: 5px;
- justify-content: center;
- display: flex;
- align-items: center;
- margin-right: 8px;
-}
-.main_div {
- width: 100%;
- position: relative;
- padding: 0 10px 10px 10px;
-}
-.el-dialog__close {
- padding: 8px 0;
- color: #ffffff !important;
-}
-.addForm {
- padding: 20px 20px 0 20px;
-}
-.addForm .el-form-item__error {
- left: 66px;
-}
-.el-dialog {
- border-radius: 10px;
-}
-.el-dialog__body {
- padding: 30px 20px 0 20px;
-}
-.table_div {
- margin-top: 10px;
- width: 100%;
- height: calc(100vh - 230px);
- background-color: #ffffff;
- padding: 10px;
-}
+ .el-tag.el-tag {
+ border-color: transparent;
+ background-color: transparent;
+ }
-.top_div {
- height: 120px;
- width: 100%;
- padding: 30px 40px;
- background-color: #ffffff;
-}
-.top_div_span {
- margin-left: 50px;
-}
-.top_div_button {
- margin-left: 20px;
-}
-</style>
+ .el-tag.el-tag:hover {
+ border-color: transparent;
+ background-color: transparent;
+ }
+
+ .firstDiv {
+ float: left;
+ width: 20px;
+ height: 20px;
+ border-radius: 50%;
+ background-color: #eff5ff;
+ margin-top: 5px;
+ justify-content: center;
+ display: flex;
+ align-items: center;
+ margin-right: 8px;
+ }
+
+ .main_div {
+ width: 100%;
+ position: relative;
+ padding: 0 10px 10px 10px;
+ }
+
+ .el-dialog__close {
+ padding: 8px 0;
+ color: #ffffff !important;
+ }
+
+ .addForm {
+ padding: 20px 20px 0 20px;
+ }
+
+ .addForm .el-form-item__error {
+ left: 66px;
+ }
+
+ .el-dialog {
+ border-radius: 10px;
+ }
+
+ .el-dialog__body {
+ padding: 30px 20px 0 20px;
+ }
+
+ .table_div {
+ margin-top: 10px;
+ width: 100%;
+ height: calc(100vh - 230px);
+ background-color: #ffffff;
+ padding: 10px;
+ }
+
+ .top_div {
+ height: 120px;
+ width: 100%;
+ padding: 30px 40px;
+ background-color: #ffffff;
+ }
+
+ .top_div_span {
+ margin-left: 50px;
+ }
+
+ .top_div_button {
+ margin-left: 20px;
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 80d1a0c..e50cf91 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -1,113 +1,113 @@
<style scoped>
- .enter {
- width: 100vw;
- height: 100vh;
- display: flex;
- background-image: url("../../assets/404_images/login-form-bg.png");
- background-size: 100% 100%;
- }
-
- .left {
- width: calc(100% - 500px);
- height: 100%;
- overflow: hidden;
- }
-
- .left img {
- width: 100%;
- min-height: 100%;
- }
-
- .right {
- width: 600px;
- overflow-y: auto;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- .title_big {
- color: #004EA2;
- font-size: 40px;
- margin-bottom: 8px;
- }
-
- .title_small {
- color: #004EA2;
- font-size: 24px;
- }
-
- .elform {
- margin-top: 50px;
- }
-
- .sao {
- font-size: 14px;
- color: #004EA2;
- width: 100%;
- text-align: right;
- }
+.enter {
+ width: 100vw;
+ height: 100vh;
+ display: flex;
+ background-image: url("../../assets/404_images/login-form-bg.png");
+ background-size: 100% 100%;
+}
+
+.left {
+ width: calc(100% - 500px);
+ height: 100%;
+ overflow: hidden;
+}
+
+.left img {
+ width: 100%;
+ min-height: 100%;
+}
+
+.right {
+ width: 600px;
+ overflow-y: auto;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.title_big {
+ color: #004EA2;
+ font-size: 40px;
+ margin-bottom: 8px;
+}
+
+.title_small {
+ color: #004EA2;
+ font-size: 24px;
+}
+
+.elform {
+ margin-top: 50px;
+}
+
+.sao {
+ font-size: 14px;
+ color: #004EA2;
+ width: 100%;
+ text-align: right;
+}
</style>
-
+
<style>
- .enter .el-form-item__label {
- font-size: 20px;
- color: #333;
- line-height: 48px;
- }
-
- .enter .el-form-item {
- margin-bottom: 30px;
- }
-
- .enter .el-input__inner {
- height: 48px;
- }
-
- .enter .el-button {
- background-color: #1763EB;
- color: #fff;
- border: 0;
- border-radius: 16px;
- width: 100%;
- height: 48px;
- }
-
- .enter input::-webkit-input-placeholder,
- .enter textarea::-webkit-input-placeholder {
- font-size: 14px;
- }
-
- .enter input::-moz-placeholder,
- .enter textarea::-moz-placeholder {
- font-size: 10px;
- }
-
- .enter input:-ms-input-placeholder,
- .enter textarea:-ms-input-placeholder {
- font-size: 10px;
- }
-
- .enter input:-moz-placeholder,
- .enter textarea:-moz-placeholder {
- font-size: 10px;
- }
- .copyright{
- width: 100%;
- position: relative;
- top: 140px;
- }
- .copyright p{
- padding: 2px 0px;
- font-size: 5px;
- text-align: center;
- color: lightgray;
- }
- .copyright >p:nth-child(3){
- text-decoration: underline;
- }
+.enter .el-form-item__label {
+ font-size: 20px;
+ color: #333;
+ line-height: 48px;
+}
+
+.enter .el-form-item {
+ margin-bottom: 30px;
+}
+
+.enter .el-input__inner {
+ height: 48px;
+}
+
+.enter .el-button {
+ background-color: #1763EB;
+ color: #fff;
+ border: 0;
+ border-radius: 16px;
+ width: 100%;
+ height: 48px;
+}
+
+.enter input::-webkit-input-placeholder,
+.enter textarea::-webkit-input-placeholder {
+ font-size: 14px;
+}
+
+.enter input::-moz-placeholder,
+.enter textarea::-moz-placeholder {
+ font-size: 10px;
+}
+
+.enter input:-ms-input-placeholder,
+.enter textarea:-ms-input-placeholder {
+ font-size: 10px;
+}
+
+.enter input:-moz-placeholder,
+.enter textarea:-moz-placeholder {
+ font-size: 10px;
+}
+.copyright{
+ width: 100%;
+ position: relative;
+ top: 140px;
+}
+.copyright p{
+ padding: 2px 0px;
+ font-size: 5px;
+ text-align: center;
+ color: lightgray;
+}
+.copyright >p:nth-child(3){
+ text-decoration: underline;
+}
</style>
-
+
<template>
<div class="enter">
<div class="left">
@@ -127,7 +127,7 @@
<el-form-item style="margin-bottom: 8px;">
<el-col :span="12"><el-checkbox v-model="ruleForm.remumberme">璁颁綇瀵嗙爜</el-checkbox></el-col>
<el-col :span="12" style="text-align: right;"><el-checkbox
- v-model="ruleForm.autoenter">鑷姩鐧诲綍</el-checkbox></el-col>
+ v-model="ruleForm.autoenter">鑷姩鐧诲綍</el-checkbox></el-col>
</el-form-item>
<el-form-item style="margin-bottom: 15px;">
<el-button type="primary" @click="submitForm('ruleForm')" :loading="btnload">绔嬪嵆鐧诲綍</el-button>
@@ -143,15 +143,15 @@
</div>
</div>
</template>
-
+
<script>
import { get } from "@/api/util/requestUtil.js"
export default {
data() {
return {
ruleForm: {
- username: "",
- password: "",
+ username: "admin",
+ password: "admin",
remumberme: false,
autoenter: false
},
@@ -201,11 +201,11 @@
this.$store.dispatch('user/login', this.ruleForm).then(async (res) => {
let name = "";
await get(this.$url.info).then(res => {
- this.user = res.data;
- name = res.data.name;
- sessionStorage.setItem("user", JSON.stringify(res.data));
- sessionStorage.setItem("flushPage",0);
- })
+ this.user = res.data;
+ name = res.data.name;
+ sessionStorage.setItem("user", JSON.stringify(res.data));
+ sessionStorage.setItem("flushPage",0);
+ })
localStorage.setItem('rememberme', this.ruleForm.remumberme);
localStorage.setItem('autoenter', this.ruleForm.autoenter);
if (this.ruleForm.remumberme==true||this.ruleForm.autoenter==true) {
@@ -231,4 +231,4 @@
},
}
}
-</script>
\ No newline at end of file
+</script>
--
Gitblit v1.9.3