Procházet zdrojové kódy

Merge branch 'master' of http://120.26.64.82:3000/BFFE/CABaggageData2.0

zhongxiaoyu před 2 roky
rodič
revize
82ce54d386

binární
src/assets/loginpage/bg_001.jpg


+ 77 - 242
src/components/Table/index.vue

@@ -1,78 +1,32 @@
 <template>
   <div class="data-table" :style="{ marginTop: marginTop }">
-    <div
-      :style="dataTableContentStyle"
-      v-loading="loading"
-      element-loading-text="拼命加载中"
-      element-loading-spinner="el-icon-loading"
-      element-loading-background="rgba(0, 0, 0, 0.8)"
-      class="data-table-content"
-    >
+    <div :style="dataTableContentStyle" v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" class="data-table-content">
       <div :class="isStatus ? 'flex' : 'flex-end'" class="data-table-btn">
         <div v-if="isStatus" class="vStatus">
           <slot name="header" />
         </div>
-        <el-button
-          v-if="isBtn"
-          size="small"
-          @click="handleAdd"
-          plain
-          type="primary"
-          >新增</el-button
-        >
+        <el-button v-if="isBtn" size="small" @click="handleAdd" plain type="primary">新增</el-button>
       </div>
       <template v-if="tableData.length">
         <div>
-          <el-table
-            v-el-table-infinite-scroll="load"
-            :data="filteredTableData"
-            :summary-method="getSummaries"
-            :span-method="tableSpanMethod"
-            :tree-props="treeProps"
-            :row-key="rowKeyTree"
-            stripe
-            :show-summary="showSummary"
-            border
-            ref="table"
-            :height="tableHeight ? tableHeight : minHeight - 8 + 'vh'"
-            class="table infinite-list"
-            style="width: 100%; overflow: auto"
-            @select="selectHandler"
-          >
-            <el-table-column
-              v-if="selectionEnable"
-              type="selection"
-              width="35"
-            />
+          <el-table v-el-table-infinite-scroll="load" :data="filteredTableData" :summary-method="getSummaries" :span-method="tableSpanMethod" :tree-props="treeProps" :row-key="rowKeyTree" stripe :show-summary="showSummary" border ref="table" :height="tableHeight ? tableHeight : minHeight - 8 + 'vh'" class="table infinite-list" style="width: 100%; overflow: auto" @select="selectHandler">
+            <el-table-column v-if="selectionEnable" type="selection" width="35" />
             <el-table-column v-if="isStatus" width="55">
               <template slot-scope="scope">
                 <div class="tableStatus">
-                  <div
-                    v-if="filteredTableData[scope.$index].runState == '运行'"
-                    class="status0"
-                  >
+                  <div v-if="filteredTableData[scope.$index].runState == '运行'" class="status0">
                     <span class="icon"></span>
                   </div>
-                  <div
-                    v-else-if="
+                  <div v-else-if="
                       filteredTableData[scope.$index].runState == '停止'
-                    "
-                    class="status1"
-                  >
+                    " class="status1">
                     <span class="icon"></span>
                   </div>
                   <div v-else class="status2"><span class="icon"></span></div>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column
-              v-for="(item, index) in tableColsCopy"
-              :sortable="item.needSort ? true : false"
-              :key="index"
-              :prop="item.columnName"
-              :label="item.columnLabel"
-              :show-overflow-tooltip="showOverflowTooltip"
-            >
+            <el-table-column v-for="(item, index) in tableColsCopy" :sortable="item.needSort ? true : false" :key="index" :prop="item.columnName" :label="item.columnLabel" :show-overflow-tooltip="showOverflowTooltip">
               <template #header>
                 <span class="colTips">
                   <el-tooltip :content="item.columnDescribe" placement="top">
@@ -80,38 +34,18 @@
                   </el-tooltip>
                 </span>
                 <span v-if="item.needFilters">
-                  <el-popover
-                    placement="bottom"
-                    trigger="click"
-                    @show="popoverShowHandler(item.columnName)"
-                    @hide="popoverHideHandler"
-                  >
-                    <i
-                      slot="reference"
-                      :class="[
+                  <el-popover placement="bottom" trigger="click" @show="popoverShowHandler(item.columnName)" @hide="popoverHideHandler">
+                    <i slot="reference" :class="[
                         'filter-arrow',
                         'el-icon-arrow-down',
                         arrowClass(item.columnName),
-                      ]"
-                    />
+                      ]" />
                     <el-form>
                       <el-form-item :label="item.columnLabel">
-                        <el-select
-                          v-model="filterValues[item.columnName]"
-                          size="small"
-                          placeholder="筛选"
-                          default-first-option
-                          filterable
-                          clearable
-                        >
-                          <el-option
-                            v-for="(option, optionIndex) in tableDataFilters[
+                        <el-select v-model="filterValues[item.columnName]" size="small" placeholder="筛选" default-first-option filterable clearable>
+                          <el-option v-for="(option, optionIndex) in tableDataFilters[
                               item.columnName
-                            ]"
-                            :key="option.value + optionIndex"
-                            :value="option.value"
-                            :label="option.text"
-                          />
+                            ]" :key="option.value + optionIndex" :value="option.value" :label="option.text" />
                         </el-select>
                       </el-form-item>
                     </el-form>
@@ -124,77 +58,19 @@
                 <div class="hd-td">
                   <div class="hd-tr">
                     <template v-if="isStatus">
-                      <el-button
-                        type="text"
-                        @click="handleLook(scope.row)"
-                        size="small"
-                        class="rmScs"
-                        >查看</el-button
-                      >
-                      <el-button
-                        type="text"
-                        v-if="scope.row.runState == '停止'"
-                        @click="stateChangeHandler(scope.row)"
-                        size="small"
-                        class="rmScs"
-                        >启动</el-button
-                      >
-                      <el-button
-                        type="text"
-                        v-if="scope.row.runState == '运行'"
-                        @click="stateChangeHandler(scope.row)"
-                        size="small"
-                        class="rmScs"
-                        >停止</el-button
-                      >
+                      <el-button type="text" @click="handleLook(scope.row)" size="small" class="rmScs">查看</el-button>
+                      <template v-if="scope.row.serviceTypeCode == 1 || scope.row.serviceTypeCode == 3">
+                        <el-button type="text" v-if="scope.row.runState == '停止'" @click="stateChangeHandler(scope.row)" size="small" class="rmScs">启动</el-button>
+                        <el-button type="text" v-if="scope.row.runState == '运行'" @click="stateChangeHandler(scope.row)" size="small" class="rmScs">停止</el-button>
+                      </template>
                     </template>
                     <!-- <el-button class="hrefBtn" type="text" @click="handleHerf(scope.row)" size="small">跳转</el-button> -->
-                    <el-button
-                      type="text"
-                      @click="handleEdit(scope.row)"
-                      size="small"
-                      class="rmScs"
-                      >编辑</el-button
-                    >
-                    <el-button
-                      class="rmSc"
-                      type="text"
-                      @click="handleRemove(scope.row)"
-                      size="small"
-                      >删除</el-button
-                    >
-                    <el-button
-                      class="rmScs"
-                      v-if="withColumnSet"
-                      type="text"
-                      size="small"
-                      @click="handleColumnSet(scope.row)"
-                      >列设置</el-button
-                    >
-                    <el-button
-                      class="rmScs"
-                      v-if="withItemSet"
-                      type="text"
-                      size="small"
-                      @click="handleItemSet(scope.row)"
-                      >数据项</el-button
-                    >
-                    <el-button
-                      class="rmScser"
-                      v-if="withlodSet"
-                      type="text"
-                      size="small"
-                      @click="handlelodSet(scope.row)"
-                      >航站设置</el-button
-                    >
-                    <el-button
-                      class="rmScser"
-                      v-if="withnodeSet"
-                      type="text"
-                      size="small"
-                      @click="handlenodeSet(scope.row)"
-                      >位置设置</el-button
-                    >
+                    <el-button type="text" @click="handleEdit(scope.row)" size="small" class="rmScs">编辑</el-button>
+                    <el-button class="rmSc" type="text" @click="handleRemove(scope.row)" size="small">删除</el-button>
+                    <el-button class="rmScs" v-if="withColumnSet" type="text" size="small" @click="handleColumnSet(scope.row)">列设置</el-button>
+                    <el-button class="rmScs" v-if="withItemSet" type="text" size="small" @click="handleItemSet(scope.row)">数据项</el-button>
+                    <el-button class="rmScser" v-if="withlodSet" type="text" size="small" @click="handlelodSet(scope.row)">航站设置</el-button>
+                    <el-button class="rmScser" v-if="withnodeSet" type="text" size="small" @click="handlenodeSet(scope.row)">位置设置</el-button>
                   </div>
                 </div>
               </template>
@@ -213,38 +89,16 @@
         <div class="dialog-content">
           <div class="title">{{ tableTitle }}</div>
           <div class="content">
-            <el-form
-              ref="ruleForm"
-              :model="tableForm"
-              :label-width="labelWidth"
-            >
+            <el-form ref="ruleForm" :model="tableForm" :label-width="labelWidth">
               <el-row :gutter="20">
-                <el-col
-                  v-for="(item, index) in tableColsCopy"
-                  :key="index"
-                  :span="rows"
-                >
+                <el-col v-for="(item, index) in tableColsCopy" :key="index" :span="rows">
                   <el-form-item :label="item.columnLabel">
-                    <template
-                      v-if="
+                    <template v-if="
                         item.listqueryTemplateID ||
                         item.listqueryTemplateID == 0
-                      "
-                    >
-                      <el-select
-                        size="small"
-                        clearable
-                        style="width: 100%"
-                        v-model="tableForm[item.columnName]"
-                        @change="changeSelect(item.columnName)"
-                        placeholder="请选择"
-                      >
-                        <el-option
-                          v-for="item in tableOptions[item.columnName]"
-                          :key="item.v"
-                          :label="item.k"
-                          :value="item.v"
-                        >
+                      ">
+                      <el-select size="small" clearable style="width: 100%" v-model="tableForm[item.columnName]" @change="changeSelect(item.columnName)" placeholder="请选择">
+                        <el-option v-for="item in tableOptions[item.columnName]" :key="item.v" :label="item.k" :value="item.v">
                         </el-option>
                       </el-select>
                     </template>
@@ -257,11 +111,7 @@
                       ></el-input>
                     </template> -->
                     <template v-else>
-                      <el-input
-                        size="small"
-                        v-model="tableForm[item.columnName]"
-                        @change="inputChangeHandler(item.columnName)"
-                      ></el-input>
+                      <el-input size="small" v-model="tableForm[item.columnName]" @change="inputChangeHandler(item.columnName)"></el-input>
                     </template>
                   </el-form-item>
                 </el-col>
@@ -269,13 +119,7 @@
             </el-form>
           </div>
           <div class="foot right t30">
-            <el-button
-              size="medium"
-              @click="handleOk"
-              class="r24"
-              type="primary"
-              >确定</el-button
-            >
+            <el-button size="medium" @click="handleOk" class="r24" type="primary">确定</el-button>
             <el-button @click="flag = false" size="medium">取消</el-button>
           </div>
         </div>
@@ -284,20 +128,11 @@
         <div class="airportInfoDialog">
           <div class="title del-title">删除</div>
           <div class="content del-content">
-            <span class="el-icon-error error r10"></span>您是否确认删除<span
-              class="error l10"
-              >{{ rmTitle }}</span
-            >
+            <span class="el-icon-error error r10"></span>您是否确认删除<span class="error l10">{{ rmTitle }}</span>
           </div>
           <div class="foot right Delfoot t30">
-            <el-button
-              size="medium"
-              class="r24"
-              @click="tableRemove"
-              type="danger"
-              >删除</el-button
-            >
+            <el-button size="medium" class="r24" @click="tableRemove" type="danger">删除</el-button>
             <el-button size="medium" @click="rmFlag = false">取消</el-button>
           </div>
         </div>
@@ -440,7 +275,7 @@ export default {
     },
   },
   components: { Dialog, NoData },
-  data() {
+  data () {
     return {
       loading: false,
       flag: false,
@@ -470,7 +305,7 @@ export default {
     };
   },
   computed: {
-    dataTableContentStyle() {
+    dataTableContentStyle () {
       const style = {};
       if (this.minHeight) {
         style["min-height"] = this.minHeight;
@@ -481,7 +316,7 @@ export default {
       return style;
     },
     //设置表头-下拉-箭头样式
-    arrowClass() {
+    arrowClass () {
       return function (prop) {
         let classString = "";
         if (this.colShowFilter === prop) {
@@ -498,7 +333,7 @@ export default {
       };
     },
     //设置表头-下拉-选中数据
-    filteredTableData() {
+    filteredTableData () {
       if (this.isTree) {
         this.tableData = translateDataToTreeAllTreeMsg(
           this.tableData,
@@ -519,7 +354,7 @@ export default {
   },
   watch: {
     dataContent: {
-      handler(val) {
+      handler (val) {
         if (val) {
           if (val.companyID) {
             this.resetTable();
@@ -540,14 +375,14 @@ export default {
     //   },
     // },
   },
-  mounted() {
+  mounted () {
     this.getQuery();
   },
-  updated() {
+  updated () {
     this.$refs["table"]?.doLayout();
   },
   methods: {
-    load() {
+    load () {
       // console.log("分页");
       if (!this.isTree) {
         if (this.noMore || this.loading) {
@@ -556,12 +391,12 @@ export default {
         this.getQuery();
       }
     },
-    resetTable() {
+    resetTable () {
       this.page = 0;
       this.noMore = false;
       this.tableData = [];
     },
-    changeSelect(data) {
+    changeSelect (data) {
       if (this.tableForm[data] === "") {
         this.tableForm[data] = null;
       }
@@ -569,13 +404,13 @@ export default {
         this.tableForm[data];
       // console.log(this.tableForm)
     },
-    inputChangeHandler(data) {
+    inputChangeHandler (data) {
       if (this.tableForm[data] === "") {
         this.tableForm[data] = null;
       }
     },
     //获取表格数据
-    async getQuery() {
+    async getQuery () {
       try {
         this.loading = true;
         const { code, returnData } = await Query({
@@ -614,7 +449,7 @@ export default {
       }
     },
     //表格-增/删/改
-    async generalDataReception(data) {
+    async generalDataReception (data) {
       try {
         data = {
           ...data,
@@ -648,17 +483,17 @@ export default {
       }
     },
     // 表格勾选
-    toggleRowSelection(row, isSelected) {
+    toggleRowSelection (row, isSelected) {
       this.$refs["table"].toggleRowSelection(row, isSelected);
     },
     // 表格初始勾选
-    selectTableRows(tableData, selectFlagName) {
+    selectTableRows (tableData, selectFlagName) {
       tableData.forEach((row) => {
         this.$refs["table"].toggleRowSelection(row, !!row[selectFlagName]);
       });
     },
     //初始化表格
-    initTableData() {
+    initTableData () {
       this.tableColsCopy = this.tableCols.filter((item) => item.needShow);
       // console.log(this.tableColsCopy);
       // debugger;
@@ -689,7 +524,7 @@ export default {
       // this.getSelectDataAll(reqUts)
     },
     //获取所有获取弹框-下拉数据-请求状态
-    getSelectDataAll(reqUts) {
+    getSelectDataAll (reqUts) {
       Promise.all(reqUts)
         .then((res) => {
           this.proAll = true;
@@ -699,7 +534,7 @@ export default {
         });
     },
     //获取弹框-下拉数据
-    async getSelectData(id) {
+    async getSelectData (id) {
       const { code, returnData } = await Query({
         id,
         dataContent: [],
@@ -711,7 +546,7 @@ export default {
       }
     },
     //重组table-显示名称
-    setTable() {
+    setTable () {
       this.tableArrs.forEach((item) => {
         this.tableOptions[item].forEach((p) => {
           this.tableDataCopy.forEach((msg) => {
@@ -730,7 +565,7 @@ export default {
       this.tableData = this.tableDataCopy;
     },
     //分组
-    tableGroup(tableData) {
+    tableGroup (tableData) {
       const spanArr = [];
       let pos = 0;
       let ifYj = this.tableGroups[0];
@@ -750,14 +585,14 @@ export default {
       this.spanArr = spanArr;
       this.pos = pos;
     },
-    popoverShowHandler(prop) {
+    popoverShowHandler (prop) {
       this.colShowFilter = prop;
     },
-    popoverHideHandler() {
+    popoverHideHandler () {
       this.colShowFilter = "";
     },
     //分组
-    tableSpanMethod({ row, column, rowIndex, columnIndex }) {
+    tableSpanMethod ({ row, column, rowIndex, columnIndex }) {
       if (this.tableGroups.includes(column["property"])) {
         const _row = this.spanArr[rowIndex];
         const _col = _row > 0 ? 1 : 0;
@@ -768,7 +603,7 @@ export default {
       }
     },
     //合计
-    getSummaries(param) {
+    getSummaries (param) {
       const { columns, data } = param;
       const sums = [];
       columns.forEach((column, index) => {
@@ -792,15 +627,15 @@ export default {
       return sums;
     },
     //弹框-确定
-    handleOk() {
+    handleOk () {
       this.submitClickHandler();
     },
     //滚动
-    tableLoad() {
+    tableLoad () {
       console.log("d");
     },
     //表格-新增
-    handleAdd() {
+    handleAdd () {
       // this.flag = true;
       //   this.tableType = "add";
       //   this.tableTitle = "新增";
@@ -817,7 +652,7 @@ export default {
       // console.log(this.tableOptions);
     },
     //表格-编辑
-    async handleEdit(row) {
+    async handleEdit (row) {
       if (this.isDialog) {
         if (this.editId) {
           let data = await this.queryOriginRow(
@@ -839,7 +674,7 @@ export default {
         this.$emit("handleEdit", row);
       }
     },
-    async queryOriginRow(editId, queryTemplateColumnSetID) {
+    async queryOriginRow (editId, queryTemplateColumnSetID) {
       try {
         const { code, returnData } = await Query({
           id: editId,
@@ -855,11 +690,11 @@ export default {
       }
     },
     //表格-跳转
-    handleHerf(row) {
+    handleHerf (row) {
       alert("跳转");
     },
     // 新增/编辑-确认
-    submitClickHandler() {
+    submitClickHandler () {
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
           if (this.tableType == "add") {
@@ -874,19 +709,19 @@ export default {
       });
     },
     //表格-删除
-    handleRemove(row) {
+    handleRemove (row) {
       this.rmFlag = true;
       // this.rmTitle = row.className || row.username || row.serviceName || row.queryTemplateName;
       this.rmTitle = row[this.rowTitle];
       this.tableObj = row;
     },
     //表格-删除-确认
-    tableRemove() {
+    tableRemove () {
       this.tableObj.event = 3;
       this.generalDataReception(this.tableObj);
     },
     // 表格-跳转列设置页
-    handleColumnSet(row) {
+    handleColumnSet (row) {
       this.$router.push({
         path: "/systemSettings/queryTemplateChild",
         query: {
@@ -895,7 +730,7 @@ export default {
       });
     },
     // 表格-跳转数据项设置页
-    handleItemSet(row) {
+    handleItemSet (row) {
       this.$router.push({
         path: "/systemSettings/datastructureChild",
         query: {
@@ -904,7 +739,7 @@ export default {
       });
     },
     // 表格-跳转航站设置页
-    handlelodSet(row) {
+    handlelodSet (row) {
       this.$router.push({
         path: "/BasicsData/airportInfoChild",
         query: {
@@ -913,7 +748,7 @@ export default {
       });
     },
     // 表格-节点置页
-    handlenodeSet(row) {
+    handlenodeSet (row) {
       this.$router.push({
         path: "/BasicsData/deployNodeChild",
         query: {
@@ -922,7 +757,7 @@ export default {
       });
     },
     // 表格-查看
-    handleLook(row) {
+    handleLook (row) {
       this.$router.push({
         name: "serviceTopology",
         params: {
@@ -932,17 +767,17 @@ export default {
       });
     },
     // 表格-启动/停止
-    async stateChangeHandler(row) {
+    async stateChangeHandler (row) {
       const runState = row.runState == "运行" ? 0 : 1;
       const serviceID = row.serviceID;
       // this.changeBtn(runState, serviceID);
       this.changeState(runState, serviceID)
     },
     // 表格-选中行
-    selectHandler(selection, row) {
+    selectHandler (selection, row) {
       this.$emit("selection-change", selection, row);
     },
-    async changeBtn(state, id) {
+    async changeBtn (state, id) {
       let res = null;
       // const { code, message } = await GeneralDataReception({
       //   serviceId: 61,
@@ -965,7 +800,7 @@ export default {
         this.$message.error(res.message);
       }
     },
-    async changeState(runState, serviceID) {
+    async changeState (runState, serviceID) {
       try {
         const operate = runState ? 'start' : 'stop'
         const { code, returnData: { listValues } } = await Query({

+ 29 - 41
src/components/permissiontree/index.vue

@@ -50,12 +50,12 @@
                 <div class="four" v-if="data.AuthList && data.AuthList.Action == '2'"></div> -->
                 <div class="three" v-if="
                     data.AuthList &&
-                    (data.AuthList.EditCol || data.EditCol ||
-                      data.AuthList.DeleteRow || data.DeleteRow ||
-                      data.AuthList.EditRow || data.EditRow ||
-                      data.AuthList.NewCol || data.NewCol ||
-                      data.AuthList.QueryCol || data.QueryCol ||
-                      data.AuthList.QueryRow || data.QueryRow)
+                    (data.AuthList.edit_col_condition || data.edit_col_condition ||
+                      data.AuthList.delete_row_condition || data.delete_row_condition ||
+                      data.AuthList.edit_row_condition || data.edit_row_condition ||
+                      data.AuthList.new_col_condition || data.new_col_condition ||
+                      data.AuthList.query_col_conditon || data.query_col_conditon ||
+                      data.AuthList.query_row_condition || data.query_row_condition)
                   "></div>
               </div>
             </span>
@@ -135,8 +135,13 @@ export default {
     "$store.state.auth.authList": {
       handler (val) {
         if (val && val.length) {
-          this.AuthList = val;
-          this.resetData();
+          setTimeout(() => {
+            this.AuthList = val;
+            this.resetData();
+            if (this.$store.getters.authId) {
+              this.defaultExpandedKeys = [this.$store.getters.authId]
+            }
+          }, 150);
         } else {
           this.getAuthList();
         }
@@ -200,6 +205,9 @@ export default {
         if (arr && arr.length) {
           this.AuthList = arr;
           this.resetData();
+          if (this.$store.getters.authId) {
+            this.defaultExpandedKeys = [this.$store.getters.authId]
+          }
         } else {
           this.getAuthList();
         }
@@ -269,36 +277,20 @@ export default {
     //数据转树形
     toTree () {
       this.data = [];
-      this.dataObj = {};
-      this.treeTitles = [];
-      let arr = null;
-      arr = translateDataToTreeAll(this.AuthArrList, "up_auth_id", "auth_id");
-      let items = null;
-      items = {
+      const arr = translateDataToTreeAll(
+        this.AuthArrList,
+        "up_auth_id",
+        "auth_id"
+      )
+      const items = {
         auth_id: -1,
         auth_name: "所有权限",
-        QueryTarget: 0,
         auth_status: 0,
         up_auth_id: -2,
         auth_type: 0,
-        disabled: true,
         children: arr,
       };
-      this.dataObj = _.cloneDeep(items);
-      this.data = [items];
-      let obj = null;
-      obj = _.cloneDeep(items);
-      let datas = null;
-      datas = obj.children.filter((item) => item.auth_type == 1);
-      datas.forEach((item) => {
-        delete item.children;
-      });
-      delete obj.children;
-      datas.unshift(obj);
-      this.treeTitles = datas;
-      if (this.$refs.tree) {
-        this.$refs.tree.setCheckedKeys(this.checkedList);
-      }
+      this.data = [items]
     },
     //数据切换
     upActive (item, index) {
@@ -342,16 +334,12 @@ export default {
       arr.forEach((item) => {
         if (!item.AuthList) {
           item.AuthList = {
-            AuthId: item.auth_id,
-            ValidBegin: "",
-            ValidEnd: "",
-            Action: "1",
-            QueryRow: "",
-            QueryCol: "",
-            NewCol: "",
-            EditRow: "",
-            EditCol: "",
-            DeleteRow: "",
+            query_row_condition: "",
+            query_col_conditon: "",
+            delete_row_condition: "",
+            new_col_condition: "",
+            edit_row_condition: "",
+            edit_col_condition: ""
           };
         }
       });

+ 26 - 112
src/components/rulesofcompetency/index.vue

@@ -21,27 +21,27 @@
         </div> -->
         <div class="juris_list" :style="{ marginBottom: marginB }">
           <p>许可查询行</p>
-          <el-input v-model="form.input1" placeholder="请输入内容" size="small"></el-input>
+          <el-input v-model="form.query_row_condition" placeholder="请输入内容" size="small"></el-input>
         </div>
         <div class="juris_list" :style="{ marginBottom: marginB }">
           <p>许可查询列</p>
-          <el-input v-model="form.input2" placeholder="请输入内容" size="small"></el-input>
+          <el-input v-model="form.query_col_conditon" placeholder="请输入内容" size="small"></el-input>
         </div>
         <div class="juris_list" :style="{ marginBottom: marginB }">
           <p>许可删除行</p>
-          <el-input v-model="form.input3" placeholder="请输入内容" size="small"></el-input>
+          <el-input v-model="form.delete_row_condition" placeholder="请输入内容" size="small"></el-input>
         </div>
         <div class="juris_list" :style="{ marginBottom: marginB }">
           <p>许可新增列</p>
-          <el-input v-model="form.input4" placeholder="请输入内容" size="small"></el-input>
+          <el-input v-model="form.new_col_condition" placeholder="请输入内容" size="small"></el-input>
         </div>
         <div class="juris_list" :style="{ marginBottom: marginB }">
           <p>许可编辑行</p>
-          <el-input v-model="form.input5" placeholder="请输入内容" size="small"></el-input>
+          <el-input v-model="form.edit_row_condition" placeholder="请输入内容" size="small"></el-input>
         </div>
         <div class="juris_list" :style="{ marginBottom: marginB }">
           <p>许可编辑列</p>
-          <el-input v-model="form.input6" placeholder="请输入内容" size="small"></el-input>
+          <el-input v-model="form.edit_col_condition" placeholder="请输入内容" size="small"></el-input>
         </div>
       </div>
     </div>
@@ -69,34 +69,13 @@ export default {
   },
   data () {
     return {
-      pickerOptionsStart: {
-        disabledDate: (time) => {
-          if (this.form.endWeeks) {
-            return time.getTime() >= new Date(this.endWeeks).getTime();
-          }
-        },
-      },
-      pickerOptionsEnd: {
-        disabledDate: (time) => {
-          if (this.form.firstWeeks) {
-            return (
-              time.getTime() <= new Date(this.firstWeeks).getTime() - 86400000
-            );
-          }
-        },
-      },
       form: {
-        // endWeeks: "",
-        // firstWeeks: "",
-        // radio: 1,
-        value1: "",
-        value2: "",
-        input1: "",
-        input2: "",
-        input3: "",
-        input4: "",
-        input5: "",
-        input6: "",
+        query_row_condition: "",
+        query_col_conditon: "",
+        delete_row_condition: "",
+        new_col_condition: "",
+        edit_row_condition: "",
+        edit_col_condition: ""
       },
       option: [
         {
@@ -113,26 +92,8 @@ export default {
   watch: {
     authTo: {
       handler (obj) {
-        const {
-          // Action,
-          // ValidBegin,
-          // ValidEnd,
-          QueryRow,
-          QueryCol,
-          NewCol,
-          EditCol,
-          EditRow,
-          DeleteRow,
-        } = obj;
-        // this.form.radio = Number(Action);
-        // this.form.firstWeeks = ValidBegin;
-        // this.form.endWeeks = ValidEnd;
-        this.form.input1 = QueryRow;
-        this.form.input2 = QueryCol;
-        this.form.input3 = DeleteRow;
-        this.form.input4 = NewCol;
-        this.form.input5 = EditRow;
-        this.form.input6 = EditCol;
+        this.form = _.cloneDeep(obj)
+        this.$store.dispatch("auth/changeAuthId", obj.auth_id)
       },
       deep: true,
     },
@@ -145,6 +106,8 @@ export default {
     authList: {
       handler (arr) {
         this.$store.dispatch("auth/changeAuthList", arr);
+        this.$store.dispatch("auth/changeAuthMsg", arr);
+        this.$store.dispatch("auth/changeAuthArrs", arr);
       },
       deep: true,
     },
@@ -153,41 +116,14 @@ export default {
         const id = this.$store.getters.authId;
         const obj = arr.filter((item) => item.auth_id === id)[0];
         this.clearFormData();
-        this.setFormData(obj);
+        this.setFormData(_.cloneDeep(obj));
       },
       deep: true,
-    },
-    // "$store.state.auth.authStatus": {
-    //   handler (arr) {
-    //     if (arr && arr.length) {
-    //       const datas = this.$store.getters.authList;
-    //       const res = datas.filter(item => !arr.some(p => item.authId == p.auth_id))
-    //       this.$store.dispatch('auth/changeAuthList', res)
-    //       this.clearFormData()
-    //     }
-    //   },
-    //   deep: true,
-    // },
+    }
   },
   methods: {
-    setTime () {
-      if (this.form.endWeeks <= this.form.firstWeeks) {
-        this.form.endWeeks = "";
-        this.$message.error("结束时间不能小于开始时间,请重新选择");
-      }
-    },
     getData () {
-      const obj = {
-        // Action: this.form.radio,
-        // ValidBegin: this.form.firstWeeks,
-        // ValidEnd: this.form.endWeeks,
-        QueryRow: this.form.input1,
-        QueryCol: this.form.input2,
-        NewCol: this.form.input4,
-        EditCol: this.form.input6,
-        EditRow: this.form.input5,
-        DeleteRow: this.form.input3,
-      };
+      const obj = _.cloneDeep(this.form);
       this.$emit("getData", obj);
       const arr = this.$store.getters.authArrs;
       const datas = _.unionBy(arr, "auth_id");
@@ -212,15 +148,12 @@ export default {
       }
     },
     clearFormData () {
-      // this.form.radio = "";
-      // this.form.firstWeeks = "";
-      // this.form.endWeeks = "";
-      this.form.input1 = "";
-      this.form.input2 = "";
-      this.form.input3 = "";
-      this.form.input4 = "";
-      this.form.input5 = "";
-      this.form.input6 = "";
+      this.form.query_row_condition = "";
+      this.form.query_col_conditon = "";
+      this.form.delete_row_condition = "";
+      this.form.new_col_condition = "";
+      this.form.edit_row_condition = "";
+      this.form.edit_col_condition = "";
     },
     setFormData (obj) {
       let data = {};
@@ -229,26 +162,7 @@ export default {
       } else {
         data = obj;
       }
-      const {
-        // Action = "",
-        // ValidBegin = "",
-        // ValidEnd = "",
-        QueryRow = "",
-        QueryCol = "",
-        NewCol = "",
-        EditCol = "",
-        EditRow = "",
-        DeleteRow = "",
-      } = data;
-      // this.form.radio = Number(Action);
-      // this.form.firstWeeks = ValidBegin;
-      // this.form.endWeeks = ValidEnd;
-      this.form.input1 = QueryRow;
-      this.form.input2 = QueryCol;
-      this.form.input3 = DeleteRow;
-      this.form.input4 = NewCol;
-      this.form.input5 = EditRow;
-      this.form.input6 = EditCol;
+      this.form = _.cloneDeep(data);
     },
   },
 };

+ 2 - 2
src/views/authorityManagement/components/authorityRoleHome.vue

@@ -197,7 +197,7 @@ export default {
       this.editType = "edit";
       this.editDialogTitle = "编辑角色";
       this.roleId = item.role_id;
-      this.ruleForm = JSON.parse(JSON.stringify(item));
+      this.ruleForm = _.cloneDeep(item);
     },
     pageInit () {
       this.needPage = 1
@@ -264,7 +264,7 @@ export default {
     },
     // 重置
     resetForm (formName) {
-      this.ruleForm = [];
+      this.ruleForm = {};
       this.$refs[formName].resetFields();
       this.editDialogVisible = false;
     },

+ 1 - 1
src/views/login/index.vue

@@ -328,7 +328,7 @@ $light_gray: #eee;
   width: 100%;
   background-color: $bg;
   overflow: hidden;
-  background-image: url("../../assets/loginpage/bg.png");
+  background-image: url("../../assets/loginpage/bg_001.jpg");
   background-repeat: no-repeat;
   background-size: cover;
   display: flex;