zhaoke 2 yıl önce
ebeveyn
işleme
266731e68c

+ 4 - 0
public/config.js

@@ -16,6 +16,10 @@ const DATACONTENT_ID = {
   /***-----登录------***/
   loginId: 36, //登录-获取权限-id
 
+  /***-----高级查询------***/
+  baggageTypeId: 86, //高级查询-特殊行李类型下拉选项查询-id
+  advacedQueryId: 30, //高级查询-数据查询-id
+
   /***-----账号管理------***/
   accountTableId: 38, //账号管理-首页-列表
   accountRoleId: 43, //账号管理-根据id查角色

+ 0 - 1
src/components/permissiontree/index.vue

@@ -72,7 +72,6 @@ import { GetAuthTree } from "@/api/apiAuthority";
 import { GetAuthTreeByGroup } from "@/api/AccountGroup";
 import { organizationUptree, postUptree } from "@/api/postInterface";
 import { GeneralDataReception, Query } from '@/api/dataIntegration';
-import { number } from 'echarts';
 export default {
   props: {
     title: {

+ 66 - 251
src/views/advancedQuery/views/advancedHome.vue

@@ -25,30 +25,11 @@
             @change="endDateChangeHandler"
           />
         </div> -->
-        <el-date-picker
-          v-model="FlightDate"
-          size="small"
-          type="daterange"
-          value-format="yyyy-MM-dd"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-          :picker-options="dateRangePickerOptions"
-        />
+        <el-date-picker v-model="FlightDate" size="small" type="daterange" value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="dateRangePickerOptions" />
       </div>
-      <Search
-        ref="search"
-        class="advanced-search"
-        :is-title="false"
-        :is-slot="true"
-        :search-tooltip="'请输入航班号(示例:CA1234)或行李牌号(示例:1234567890)'"
-        @getSearchData="getSearchData"
-        @clearSearchData="clearSearchData"
-      >
+      <Search ref="search" class="advanced-search" :is-title="false" :is-slot="true" :search-tooltip="'请输入航班号(示例:CA1234)或行李牌号(示例:1234567890)'" @getSearchData="getSearchData" @clearSearchData="clearSearchData">
         <div class="flex-wrap">
-          <button
-            class="btnAn"
-            @click="dialogShow"
-          >高级查询</button>
+          <button class="btnAn" @click="dialogShow">高级查询</button>
           <!-- <div
             class="setting"
             @click="show"
@@ -57,47 +38,11 @@
       </Search>
     </div>
     <!--表格-->
-    <div
-      v-loading="loading"
-      element-loading-text="拼命加载中"
-      element-loading-spinner="el-icon-loading"
-      element-loading-background="rgba(0, 0, 0, 0.8)"
-      class="advance__table"
-    >
-      <el-table
-        ref="table"
-        max-height="100%"
-        class="table"
-        :data="dealedTableData"
-        border
-        stripe
-        fit
-        height="calc(100vh - 158px)"
-        style="width: 100%"
-        show-summary
-        :summary-method="summaryRow(tableData.length)"
-        :header-cell-class-name="headerCellClass"
-        :row-class-name="tableRowClassName"
-        :cell-class-name="cellClass"
-        :span-method="objectSpanMethod"
-        @cell-click="cellClickHandler"
-      >
-        <el-table-column
-          v-for="col in tableCols"
-          :key="col.prop"
-          :prop="col.prop"
-          :label="col.label"
-          :width="col.width"
-          :fixed="col.fixed"
-        >
+    <div v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" class="advance__table">
+      <el-table ref="table" max-height="100%" class="table" :data="dealedTableData" border stripe fit height="calc(100vh - 158px)" style="width: 100%" show-summary :summary-method="summaryRow(tableData.length)" :header-cell-class-name="headerCellClass" :row-class-name="tableRowClassName" :cell-class-name="cellClass" :span-method="objectSpanMethod" @cell-click="cellClickHandler">
+        <el-table-column v-for="col in tableCols" :key="col.prop" :prop="col.prop" :label="col.label" :width="col.width" :fixed="col.fixed">
           <template #header>
-            <TableHeaderCell
-              :label="col.label"
-              :filter-options="tableDataFilters[col.prop]"
-              :filter-values.sync="filterValues[col.prop]"
-              :sortable="col.sortable"
-              :sort-rule.sync="tableDataSortRules[col.prop]"
-            />
+            <TableHeaderCell :label="col.label" :filter-options="tableDataFilters[col.prop]" :filter-values.sync="filterValues[col.prop]" :sortable="col.sortable" :sort-rule.sync="tableDataSortRules[col.prop]" />
           </template>
         </el-table-column>
       </el-table>
@@ -139,183 +84,61 @@
       </div>
     </Dialog> -->
     <!--高级查询-->
-    <Dialog
-      width="852px"
-      :flag="gjFlag"
-    >
-      <div
-        ref="dialog"
-        class="rowDialog"
-        :tabindex="0"
-        @keyup.enter="onCheckGj(true)"
-        @keyup.self.esc="gjFlag=false"
-      >
+    <Dialog width="852px" :flag="gjFlag">
+      <div ref="dialog" class="rowDialog" :tabindex="0" @keyup.enter="onCheckGj(true)" @keyup.self.esc="gjFlag=false">
         <div class="title">高级查询</div>
         <div class="content">
-          <el-form
-            ref="form"
-            :model="form"
-            :rules="rules"
-            label-width="100px"
-          >
+          <el-form ref="form" :model="form" :rules="rules" label-width="100px">
             <el-row :gutter="20">
-              <el-col
-                v-for="item in formItems"
-                :key="item.prop"
-                :span="item.span || 8"
-              >
-                <el-form-item
-                  :label="item.label"
-                  :prop="item.prop"
-                >
+              <el-col v-for="item in formItems" :key="item.prop" :span="item.span || 8">
+                <el-form-item :label="item.label" :prop="item.prop">
                   <template v-if="item.prop === 'FlightDate'">
-                    <el-date-picker
-                      v-model="FlightDate"
-                      size="small"
-                      type="daterange"
-                      value-format="yyyy-MM-dd"
-                      start-placeholder="开始日期"
-                      end-placeholder="结束日期"
-                      :picker-options="dateRangePickerOptions"
-                      @keyup.esc.native="dialogFocus"
-                    />
+                    <el-date-picker v-model="FlightDate" size="small" type="daterange" value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="dateRangePickerOptions" @keyup.esc.native="dialogFocus" />
                   </template>
                   <template v-else-if="item.prop === 'status'">
-                    <el-select
-                      v-model="form.status"
-                      size="small"
-                      filterable
-                      default-first-option
-                      clearable
-                      @keyup.esc.native="dialogFocus"
-                    >
-                      <el-option
-                        v-for="option in statusList"
-                        :key="option.ID"
-                        :label="option.StatusName"
-                        :value="option.StatusCode"
-                      />
+                    <el-select v-model="form.status" size="small" filterable default-first-option clearable @keyup.esc.native="dialogFocus">
+                      <el-option v-for="option in statusList" :key="option.ID" :label="option.StatusName" :value="option.StatusCode" />
                     </el-select>
                   </template>
                   <template v-else-if="item.prop === 'specialType'">
-                    <el-select
-                      v-model="form.specialType"
-                      size="small"
-                      filterable
-                      allow-create
-                      default-first-option
-                      clearable
-                      @keyup.esc.native="dialogFocus"
-                    >
-                      <el-option
-                        v-for="option in baggageTypeList"
-                        :key="option.ID"
-                        :label="option.TypeName"
-                        :value="option.TypeCode"
-                      />
+                    <el-select v-model="form.specialType" size="small" filterable allow-create default-first-option clearable @keyup.esc.native="dialogFocus">
+                      <el-option v-for="option in baggageTypeList" :key="option.ID" :label="option.TypeName" :value="option.TypeCode" />
                     </el-select>
                   </template>
                   <template v-else-if="item.prop === 'unLoad'">
-                    <el-select
-                      v-model="form.unLoad"
-                      size="small"
-                      clearable
-                      @keyup.esc.native="dialogFocus"
-                    >
-                      <el-option
-                        label="已翻减"
-                        :value="1"
-                      />
-                      <el-option
-                        label="待翻减"
-                        :value="0"
-                      />
+                    <el-select v-model="form.unLoad" size="small" clearable @keyup.esc.native="dialogFocus">
+                      <el-option label="已翻减" :value="1" />
+                      <el-option label="待翻减" :value="0" />
                     </el-select>
                   </template>
                   <template v-else-if="item.prop === 'checkIn'">
-                    <el-select
-                      v-model="form.checkIn"
-                      size="small"
-                      clearable
-                      @keyup.esc.native="dialogFocus"
-                    >
-                      <el-option
-                        label="是"
-                        :value="1"
-                      />
-                      <el-option
-                        label="否"
-                        :value="0"
-                      />
+                    <el-select v-model="form.checkIn" size="small" clearable @keyup.esc.native="dialogFocus">
+                      <el-option label="是" :value="1" />
+                      <el-option label="否" :value="0" />
                     </el-select>
                   </template>
                   <template v-else-if="item.prop === 'active'">
-                    <el-select
-                      v-model="form.active"
-                      size="small"
-                      clearable
-                      @keyup.esc.native="dialogFocus"
-                    >
-                      <el-option
-                        label="是"
-                        :value="1"
-                      />
-                      <el-option
-                        label="否"
-                        :value="0"
-                      />
+                    <el-select v-model="form.active" size="small" clearable @keyup.esc.native="dialogFocus">
+                      <el-option label="是" :value="1" />
+                      <el-option label="否" :value="0" />
                     </el-select>
                   </template>
                   <template v-else-if="item.prop === 'transferIn'">
-                    <el-select
-                      v-model="form.transferIn"
-                      size="small"
-                      clearable
-                      @keyup.esc.native="dialogFocus"
-                    >
-                      <el-option
-                        label="是"
-                        :value="1"
-                      />
-                      <el-option
-                        label="否"
-                        :value="0"
-                      />
+                    <el-select v-model="form.transferIn" size="small" clearable @keyup.esc.native="dialogFocus">
+                      <el-option label="是" :value="1" />
+                      <el-option label="否" :value="0" />
                     </el-select>
                   </template>
                   <template v-else-if="item.prop === 'canceled'">
-                    <el-select
-                      v-model="form.canceled"
-                      size="small"
-                      clearable
-                      @keyup.esc.native="dialogFocus"
-                    >
-                      <el-option
-                        label="是"
-                        :value="1"
-                      />
-                      <el-option
-                        label="否"
-                        :value="0"
-                      />
+                    <el-select v-model="form.canceled" size="small" clearable @keyup.esc.native="dialogFocus">
+                      <el-option label="是" :value="1" />
+                      <el-option label="否" :value="0" />
                     </el-select>
                   </template>
                   <template v-else>
-                    <el-popover
-                      v-model="item.hintVisible"
-                      placement="right"
-                      trigger="manual"
-                    >
+                    <el-popover v-model="item.hintVisible" placement="right" trigger="manual">
                       <span>{{ item.hintText }}</span>
-                      <el-input
-                        :ref="'input-' + item.prop"
-                        slot="reference"
-                        v-model="form[item.prop]"
-                        size="small"
-                        @focus="item.hintVisible = true"
-                        @blur="item.hintVisible = false"
-                        @keyup.esc.native="dialogFocus"
-                      />
+                      <el-input :ref="'input-' + item.prop" slot="reference" v-model="form[item.prop]" size="small" @focus="item.hintVisible = true" @blur="item.hintVisible = false" @keyup.esc.native="dialogFocus" />
                     </el-popover>
                   </template>
                 </el-form-item>
@@ -324,16 +147,8 @@
           </el-form>
         </div>
         <div class="foot right t30">
-          <el-button
-            size="medium"
-            class="r24"
-            type="primary"
-            @click="onCheckGj(true)"
-          >确定</el-button>
-          <el-button
-            size="medium"
-            @click="closeCheckGj"
-          >取消</el-button>
+          <el-button size="medium" class="r24" type="primary" @click="onCheckGj(true)">确定</el-button>
+          <el-button size="medium" @click="closeCheckGj">取消</el-button>
         </div>
       </div>
     </Dialog>
@@ -352,7 +167,7 @@ import { setTableFilters } from '@/utils/table'
 export default {
   name: 'Advance',
   components: { Search, Dialog, TableHeaderCell },
-  data() {
+  data () {
     return {
       loading: false,
       colDialogFlag: false,
@@ -645,7 +460,7 @@ export default {
   },
   computed: {
     ...mapGetters(['clickedCells', 'queryForm']),
-    dealedTableData() {
+    dealedTableData () {
       const filtered = this.tableData.filter(item => {
         let flag = true
         Object.entries(this.filterValues).forEach(([key, arr]) => {
@@ -671,7 +486,7 @@ export default {
   },
   watch: {
     FlightDate: {
-      handler(val) {
+      handler (val) {
         if (val === null) {
           this.FlightDate = ['', '']
         }
@@ -679,7 +494,7 @@ export default {
       deep: true
     },
     dealedTableData: {
-      handler(val) {
+      handler (val) {
         this.spanArr = []
         let contactDot = this.contactDot
         val.forEach((item, index, arr) => {
@@ -705,7 +520,7 @@ export default {
       deep: true
     }
   },
-  created() {
+  created () {
     Object.values(this.tableCols).forEach(({ prop, filterable, sortable }) => {
       if (filterable) {
         this.$set(this.tableDataFilters, prop, [])
@@ -723,7 +538,7 @@ export default {
     // }
     // this.statItemsQueryByStatMain(dataContent);
   },
-  mounted() {
+  mounted () {
     // window.addEventListener('keyup', () => {
     //   console.dir(document.activeElement)
     // })
@@ -754,13 +569,13 @@ export default {
       this.onCheckGj()
     }
   },
-  updated() {
+  updated () {
     // table数据更新
     this.$nextTick(() => {
       this.$refs.table.doLayout()
     })
   },
-  beforeDestroy() {
+  beforeDestroy () {
     // console.log(this.$route.matched.filter(item => item.name && item.meta.title))
     if (this.$route.matched.filter(item => item.name && item.meta.title).length > 1) {
       this.$store.dispatch('app/setQueryForm', {
@@ -772,13 +587,13 @@ export default {
     }
   },
   methods: {
-    dialogShow() {
+    dialogShow () {
       this.gjFlag = true
       this.$nextTick(() => {
         this.dialogFocus()
       })
     },
-    dialogFocus() {
+    dialogFocus () {
       this.$refs['dialog'].focus()
     },
     // startDateChangeHandler(val) {
@@ -811,17 +626,17 @@ export default {
     //     this.$message.info('时间跨度不能超过三天,请重新选择')
     //   }
     // },
-    dateRangePickHandler({ maxDate, minDate }) {
+    dateRangePickHandler ({ maxDate, minDate }) {
       if (!maxDate) {
         this.pickedDate = minDate
       } else {
         this.pickedDate = null
       }
     },
-    dateRangeDisabled(date) {
+    dateRangeDisabled (date) {
       return this.pickedDate ? Math.abs(date - this.pickedDate) > 2 * 24 * 60 * 60 * 1000 : false
     },
-    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+    objectSpanMethod ({ row, column, rowIndex, columnIndex }) {
       if (['PassengerNameUpcase', 'BagWeight'].includes(column.property)) {
         const _row = this.spanArr[rowIndex]
         const _col = _row > 0 ? 1 : 0
@@ -832,7 +647,7 @@ export default {
       }
     },
     // 给表头单元格加上 ascending 或 descending 使用 element 自带的排序箭头变色
-    headerCellClass({ row, column, rowIndex, columnIndex }) {
+    headerCellClass ({ row, column, rowIndex, columnIndex }) {
       const classes = []
       const rule = this.tableDataSortRules[column.property]
       if (rule) {
@@ -840,14 +655,14 @@ export default {
       }
       return classes.join(' ')
     },
-    tableRowClassName({ row, rowIndex }) {
+    tableRowClassName ({ row, rowIndex }) {
       const classes = []
       if (row.deleted === 'DEL') {
         classes.push('bgl-deleted')
       }
       return classes.join(' ')
     },
-    cellClass({ row, column, rowIndex, columnIndex }) {
+    cellClass ({ row, column, rowIndex, columnIndex }) {
       const classes = []
       if (['FlightNO', 'TransferFlightNO', 'BagSN'].includes(column.property)) {
         classes.push('cell-click')
@@ -864,7 +679,7 @@ export default {
       }
       return classes.join(' ')
     },
-    cellClickHandler(row, column, cell, event) {
+    cellClickHandler (row, column, cell, event) {
       if (['FlightNO', 'TransferFlightNO', 'BagSN'].includes(column.property)) {
         this.$store.dispatch('keepAlive/addClickedCell', {
           row,
@@ -906,7 +721,7 @@ export default {
       }
     },
     // 查询
-    getSearchData(val) {
+    getSearchData (val) {
       this.clearForm()
       if (this.FlightDate[0] === '' || this.FlightDate[1] === '' || val === '') {
         this.$message.error('请先输入完整查询信息')
@@ -940,18 +755,18 @@ export default {
       }
     },
     // 清除查询
-    clearSearchData() {
+    clearSearchData () {
       this.clearForm()
       this.tableData = []
     },
     // 清除表单
-    clearForm() {
+    clearForm () {
       Object.keys(this.form).forEach(key => {
         this.form[key] = ''
       })
     },
     // 高级查询-确定
-    onCheckGj(singleJump) {
+    onCheckGj (singleJump) {
       /* 参数顺序
       【航班开始日期,航班结束日期,航班号,航班号,行李牌号,行李牌号,起飞站,起飞站,目的站,目的站,特殊行李类型,特殊行李类型,旅客姓名大写拼音,旅客姓名大写拼音,
       PNR,PNR,值机号,值机号,中转进航班,中转进航班,中转出航班,中转出航班,容器编号,容器编号,
@@ -1010,10 +825,10 @@ export default {
         this.$message.error('请先选择要查询的时间')
       }
     },
-    closeCheckGj() {
+    closeCheckGj () {
       this.gjFlag = false
     },
-    setDataContent(...dataContent) {
+    setDataContent (...dataContent) {
       dataContent.forEach(target => {
         target = typeof target === 'string' ? target.trim() : target
         if ((target ?? '') !== '') {
@@ -1024,11 +839,11 @@ export default {
       })
     },
     // 数据查询
-    async statItemsQueryByStatMain(dataContent, singleJump) {
+    async statItemsQueryByStatMain (dataContent, singleJump) {
       this.loading = true
       this.tableData = []
       try {
-        const result = await myQuery(queryMap.advacedQuery, ...dataContent)
+        const result = await myQuery(DATACONTENT_ID.advacedQueryId, ...dataContent)
         if (result.length) {
           if (singleJump) {
             if (result.length === 1) {
@@ -1081,9 +896,9 @@ export default {
       this.loading = false
     },
     // 特殊行李类型下拉选项查询
-    async baggageTypeQuery() {
+    async baggageTypeQuery () {
       try {
-        const result = await myQuery(queryMap.baggageType)
+        const result = await myQuery(DATACONTENT_ID.baggageTypeId)
         this.baggageTypeList = result
       } catch (error) {
         console.log('出错了', error)
@@ -1106,7 +921,7 @@ export default {
     //   }
     // },
     // 统计行数
-    summaryRow(num) {
+    summaryRow (num) {
       return function () {
         return ['合计', `共${num}件`]
       }
@@ -1127,7 +942,7 @@ export default {
       width: 32px;
       cursor: pointer;
       background-size: 100% 100%;
-      background: url('../../../assets/baggage/ic_setting.png') no-repeat;
+      background: url("../../../assets/baggage/ic_setting.png") no-repeat;
       margin-left: 12px;
       position: relative;
       top: 2px;
@@ -1154,7 +969,7 @@ export default {
       padding: 0;
       text-align: center;
       font-size: 14px;
-      font-family: Helvetica, 'Microsoft YaHei';
+      font-family: Helvetica, "Microsoft YaHei";
       letter-spacing: 0;
     }
     .cell-click {

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

@@ -55,8 +55,8 @@
                               {{ data.auth_name }}
                             </div>
                             <div v-if="data.auth_type > 0" class="icon">
-                              <el-tooltip effect="dark" content="修改应用" placement="bottom">
-                                <span title="修改应用" @click="renderEdit(data)" class="cap cap-edit"></span>
+                              <el-tooltip effect="dark" :content="`修改${data.auth_name}`" placement="bottom">
+                                <span @click="renderEdit(data)" class="cap cap-edit"></span>
                               </el-tooltip>
                             </div>
                           </div>

+ 21 - 18
src/views/authorityManagement/components/authorityRoleEdit.vue

@@ -161,24 +161,13 @@ export default {
     },
     //获取权限树回调
     getTreeData (arr) {
-      console.log(arr)
-      // if (arr.length) {
-      //   arr.forEach((item, index) => {
-      //     if (item.auth_id == -1) {
-      //       arr.splice(index, 1)
-      //     }
-      //   })
-      // }
       this.treeData = arr;
       this.msgArrs.push(arr);
-      console.log(this.msgArrs)
       const data1 = this.msgArrs[this.msgArrs.length - 1] //最后一条数据
       const data2 = this.msgArrs[this.msgArrs.length - 2] //倒数第二条数据
       if (data1.length >= data2.length) {
-        console.log('add')
         this.checksBoxTs(data1, data2, 'add')
       } else {
-        console.log('del')
         this.checksBoxTs(data2, data1, 'del')
       }
     },
@@ -210,6 +199,7 @@ export default {
           const { listValues } = res.returnData
           if (listValues && listValues.length) {
             this.authList = listValues;
+            this.authTo = listValues[0];
             listValues.forEach((item) => {
               const obj = item
               obj.auth_id = item.AuthId
@@ -219,7 +209,6 @@ export default {
             // this.msgArrs.push([])
           }
           this.msgArrs.push(this.checkedBoxs)
-          console.log(this.msgArrs)
         } else {
           this.$message.error(res.message);
           this.loading = false;
@@ -235,10 +224,8 @@ export default {
           const data1 = this.msgArrs[this.msgArrs.length - 1] //最后一条数据
           const data2 = this.msgArrs[this.msgArrs.length - 2] //倒数第二条数据
           if (data1.length > data2.length) {
-            console.log('add')
             this.checksBoxTs(data1, data2, 'add')
           } else {
-            console.log('del')
             this.checksBoxTs(data2, data1, 'del')
           }
           // this.editRole();
@@ -287,9 +274,17 @@ export default {
             dataContent: JSON.stringify(obj)
           }).then(result => {
             if (result.code == 0) {
-              this.$message.success('添加权限', res.message)
+              if (obj.event == 1) {
+                this.$message.success('添加权限', res.message)
+              } else {
+                this.$message.success('取消权限', res.message)
+              }
             } else {
-              this.$message.error('添加权限', res.message)
+              if (obj.event == 1) {
+                this.$message.success('添加权限', res.message)
+              } else {
+                this.$message.success('取消权限', res.message)
+              }
             }
           })
           GeneralDataReception({
@@ -297,9 +292,17 @@ export default {
             dataContent: JSON.stringify(authObj)
           }).then(result => {
             if (result.code == 0) {
-              this.$message.success('添加规则', res.message)
+              if (obj.event == 1) {
+                this.$message.success('添加规则', res.message)
+              } else {
+                this.$message.success('取消规则', res.message)
+              }
             } else {
-              this.$message.error('添加规则', res.message)
+              if (obj.event == 1) {
+                this.$message.success('添加规则', res.message)
+              } else {
+                this.$message.success('取消规则', res.message)
+              }
             }
           })
         }