Просмотр исходного кода

Merge branch 'master' of http://119.23.210.103:3000/wy/zdqy_firm_former

liujiayin 2 лет назад
Родитель
Сommit
5c5eedfdfb

+ 1 - 1
src/business/platform/data/constants/buttons.js

@@ -82,7 +82,7 @@ const buttons = {
         label: '导出模板',
         type: 'primary',
         icon: 'ibps-icon-export',
-        scope: ['toolbar'],
+        scope: ['toolbar']
     },
     'openTask': {
         label: '编制',

+ 2 - 3
src/business/platform/file/attachment/index.vue

@@ -190,7 +190,6 @@ export default {
         }
     },
     data () {
-        console.log(this.value)
         return {
             fileList: [],
             targetExt: false,
@@ -358,8 +357,8 @@ export default {
         },
         updateSort ({ to, from, item, clone, oldIndex, newlndex }) {
             // console.log(to, from, item, clone, oldIndex, newlndex)
-            console.log(this.value)
-            console.log(this.sortList)
+            // console.log(this.value)
+            // console.log(this.sortList)
         }
     }
 }

+ 152 - 152
src/views/platform/auth/apiInvoke/list.vue

@@ -1,36 +1,36 @@
 <template>
-  <div class="main-container">
-    <ibps-crud
-      ref="crud"
-      :height="height"
-      :data="listData"
-      :toolbars="listConfig.toolbars"
-      :search-form="listConfig.searchForm"
-      :pk-key="pkKey"
-      :columns="listConfig.columns"
-      :pagination="pagination"
-      :loading="loading"
-      :index-row="false"
-      @action-event="handleAction"
-      @sort-change="handleSortChange"
-      @pagination-change="handlePaginationChange"
-    >
-      <template slot="authorization">
-        <client-selector
-          style="width:200px;"
-          @input="getAuth"
-        />
-      </template>
-      <!-- 授权用户 -->
-      <template slot="user">
-        <ibps-employee-selector
-          value-key="account"
-          style="width:200px;"
-          @input="getUser"
-        />
-      </template>
-    </ibps-crud>
-  </div>
+    <div class="main-container">
+        <ibps-crud
+            ref="crud"
+            :height="height"
+            :data="listData"
+            :toolbars="listConfig.toolbars"
+            :search-form="listConfig.searchForm"
+            :pk-key="pkKey"
+            :columns="listConfig.columns"
+            :pagination="pagination"
+            :loading="loading"
+            :index-row="false"
+            @action-event="handleAction"
+            @sort-change="handleSortChange"
+            @pagination-change="handlePaginationChange"
+        >
+            <template slot="authorization">
+                <client-selector
+                    style="width:200px;"
+                    @input="getAuth"
+                />
+            </template>
+            <!-- 授权用户 -->
+            <template slot="user">
+                <ibps-employee-selector
+                    value-key="account"
+                    style="width:200px;"
+                    @input="getUser"
+                />
+            </template>
+        </ibps-crud>
+    </div>
 </template>
 <script>
 import { queryInvoke as queryPageList } from '@/api/platform/auth/api'
@@ -38,130 +38,130 @@ import clientSelector from '@/business/platform/auth/client/selector'
 import IbpsEmployeeSelector from '@/business/platform/org/employee/selector'
 import ActionUtils from '@/utils/action'
 export default {
-  components: {
-    clientSelector,
-    IbpsEmployeeSelector
-  },
-  data() {
-    const statusOptions = [{
-      label: '是',
-      value: 'Y'
-    }, {
-      label: '否',
-      value: 'N'
-    }]
-    return {
-      pkKey: 'id', // 主键  如果主键不是pk需要传主键
-      loading: true,
-      formId: '',
-      height: document.clientHeight,
+    components: {
+        clientSelector,
+        IbpsEmployeeSelector
+    },
+    data () {
+        const statusOptions = [{
+            label: '是',
+            value: 'Y'
+        }, {
+            label: '否',
+            value: 'N'
+        }]
+        return {
+            pkKey: 'id', // 主键  如果主键不是pk需要传主键
+            loading: true,
+            formId: '',
+            height: document.clientHeight,
 
-      auth: '',
-      user: '',
+            auth: '',
+            user: '',
 
-      listData: [],
-      pagination: {},
-      sorts: {},
-      listConfig: {
-        toolbars: [
-          {
-            key: 'search'
-          }
-        ],
-        searchForm: {
-          forms: [
-            { prop: 'Q^URI_^SL', label: '接口地址', itemWidth: 200 },
-            { prop: 'Q^CLIENT_KEY_^SL', label: '授权标识', fieldType: 'slot', slotName: 'authorization', itemWidth: 200 },
-            { prop: 'Q^ACCOUNT_^SL', label: '用户姓名', fieldType: 'slot', slotName: 'user', itemWidth: 200 },
-            { prop: 'Q^ip_^SL', label: 'IP', itemWidth: 200 },
-            {
-              prop: 'Q^STATUS_^SL',
-              label: '状态',
-              fieldType: 'select',
-              options: statusOptions,
-              itemWidth: 200
-            },
-            { prop: ['Q^CREATE_TIME_^DL', 'Q^CREATE_TIME_^DG'], label: '调用时间', fieldType: 'daterange', itemWidth: 200 }
-          ]
-        },
-        // 表格字段配置
-        columns: [
-          { prop: 'uri', label: '接口地址' },
-          { prop: 'clientKey', label: '授权标识' },
-          { prop: 'fullName', label: '用户姓名' },
-          { prop: 'ip', label: 'IP' },
-          { prop: 'status', label: '状态', tags: statusOptions },
-          { prop: 'createTime', label: '调用时间', dateFormat: 'yyyy-MM-dd HH:mm:ss' },
-          { prop: 'cause', label: '详情' }
-        ]
-      }
-    }
-  },
-  created() {
-    this.loadData()
-  },
-  methods: {
-    getAuth(val) {
-      this.auth = val
-    },
-    getUser(val) {
-      this.user = val
-    },
-    // 加载数据
-    loadData() {
-      this.loading = true
-      queryPageList(this.getSearcFormData()).then(response => {
-        ActionUtils.handleListData(this, response.data)
-        this.loading = false
-      }).catch(() => {
-        this.loading = false
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getSearcFormData() {
-      const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-      params['Q^CLIENT_KEY_^SL'] = this.auth || ''
-      params['Q^ACCOUNT_^SL'] = this.user || ''
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    /**
-     * 处理分页事件
-     */
-    handlePaginationChange(page) {
-      ActionUtils.setPagination(this.pagination, page)
-      this.loadData()
-    },
-    /**
-     * 处理排序
-     */
-    handleSortChange(sort) {
-      ActionUtils.setSorts(this.sorts, sort)
-      this.loadData()
+            listData: [],
+            pagination: {},
+            sorts: { CREATE_TIME_: 'desc' },
+            listConfig: {
+                toolbars: [
+                    {
+                        key: 'search'
+                    }
+                ],
+                searchForm: {
+                    forms: [
+                        { prop: 'Q^URI_^SL', label: '接口地址', itemWidth: 200 },
+                        { prop: 'Q^CLIENT_KEY_^SL', label: '授权标识', fieldType: 'slot', slotName: 'authorization', itemWidth: 200 },
+                        { prop: 'Q^ACCOUNT_^SL', label: '用户姓名', fieldType: 'slot', slotName: 'user', itemWidth: 200 },
+                        { prop: 'Q^ip_^SL', label: 'IP', itemWidth: 200 },
+                        // {
+                        //     prop: 'Q^STATUS_^SL',
+                        //     label: '状态',
+                        //     fieldType: 'select',
+                        //     options: statusOptions,
+                        //     itemWidth: 200
+                        // },
+                        { prop: ['Q^CREATE_TIME_^DL', 'Q^CREATE_TIME_^DG'], label: '调用时间', fieldType: 'daterange', itemWidth: 200 }
+                    ]
+                },
+                // 表格字段配置
+                columns: [
+                    { prop: 'uri', label: '接口地址', minWidth: 200 },
+                    { prop: 'clientKey', label: '授权标识', width: 120 },
+                    { prop: 'fullName', label: '用户姓名', width: 120 },
+                    { prop: 'ip', label: 'IP', width: 120 },
+                    // { prop: 'status', label: '状态', tags: statusOptions, sortable: true, width: 80 },
+                    { prop: 'createTime', label: '调用时间', dateFormat: 'yyyy-MM-dd HH:mm:ss', sortable: true, width: 150 },
+                    { prop: 'cause', label: '详情', width: 120 }
+                ]
+            }
+        }
     },
-    /**
-     * 查询
-     */
-    search() {
-      this.loadData()
+    created () {
+        this.loadData()
     },
-    /**
-     * 处理按钮事件
-     */
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case 'search':// 查询
-          ActionUtils.setFirstPagination(this.pagination)
-          this.search()
-          break
-        default:
-          break
-      }
+    methods: {
+        getAuth (val) {
+            this.auth = val
+        },
+        getUser (val) {
+            this.user = val
+        },
+        // 加载数据
+        loadData () {
+            this.loading = true
+            queryPageList(this.getSearcFormData()).then(response => {
+                ActionUtils.handleListData(this, response.data)
+                this.loading = false
+            }).catch(() => {
+                this.loading = false
+            })
+        },
+        /**
+         * 获取格式化参数
+         */
+        getSearcFormData () {
+            const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
+            params['Q^CLIENT_KEY_^SL'] = this.auth || ''
+            params['Q^ACCOUNT_^SL'] = this.user || ''
+            return ActionUtils.formatParams(
+                params,
+                this.pagination,
+                this.sorts)
+        },
+        /**
+         * 处理分页事件
+         */
+        handlePaginationChange (page) {
+            ActionUtils.setPagination(this.pagination, page)
+            this.loadData()
+        },
+        /**
+         * 处理排序
+         */
+        handleSortChange (sort) {
+            ActionUtils.setSorts(this.sorts, sort)
+            this.loadData()
+        },
+        /**
+         * 查询
+         */
+        search () {
+            this.loadData()
+        },
+        /**
+         * 处理按钮事件
+         */
+        handleAction (command, position, selection, data) {
+            switch (command) {
+                case 'search':// 查询
+                    ActionUtils.setFirstPagination(this.pagination)
+                    this.search()
+                    break
+                default:
+                    break
+            }
+        }
     }
-  }
 }
 </script>

+ 306 - 308
src/views/platform/auth/appApi/list.vue

@@ -1,57 +1,57 @@
 <template>
-  <div class="main-container">
-    <ibps-crud
-      ref="crud"
-      :height="height"
-      :data="listData"
-      :toolbars="listConfig.toolbars"
-      :search-form="listConfig.searchForm"
-      :pk-key="pkKey"
-      :columns="listConfig.columns"
-      :row-handle="listConfig.rowHandle"
-      :pagination="pagination"
-      :loading="loading"
-      @action-event="handleAction"
-      @sort-change="handleSortChange"
-      @pagination-change="handlePaginationChange"
-    >
-      <!-- 搜索栏插槽 -->
-      <template slot="scope">
-        <el-select v-model="scope" clearable placeholder="请选择">
-          <el-option
-            v-for="item in scopeOptions"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          />
-        </el-select>
-      </template>
-      <!-- 表格字段插槽 -->
-      <template slot="scopeColumns" slot-scope="scopeColumns">
-        <el-tag
-          v-for="(item,index ) in dataConvert(scopeColumns.row.scope)"
-          :key="index"
+    <div class="main-container">
+        <ibps-crud
+            ref="crud"
+            :height="height"
+            :data="listData"
+            :toolbars="listConfig.toolbars"
+            :search-form="listConfig.searchForm"
+            :pk-key="pkKey"
+            :columns="listConfig.columns"
+            :row-handle="listConfig.rowHandle"
+            :pagination="pagination"
+            :loading="loading"
+            @action-event="handleAction"
+            @sort-change="handleSortChange"
+            @pagination-change="handlePaginationChange"
         >
-          {{ item|optionsFilter(scopeOptions,'label') }}
-        </el-tag>
-      </template>
-    </ibps-crud>
-    <edit
-      :id="editId"
-      :title="title"
-      :constant="constantInfo(scopeOptions)"
-      :visible="dialogFormVisible"
-      :readonly="readonly"
-      @callback="search"
-      @close="visible => dialogFormVisible = visible"
-    />
-    <import
-      :title="title"
-      :visible="importFormVisible"
-      @callback="search"
-      @close="visible => importFormVisible = visible"
-    />
-  </div>
+            <!-- 搜索栏插槽 -->
+            <template slot="scope">
+                <el-select v-model="scope" clearable placeholder="请选择">
+                    <el-option
+                        v-for="item in scopeOptions"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"
+                    />
+                </el-select>
+            </template>
+            <!-- 表格字段插槽 -->
+            <template slot="scopeColumns" slot-scope="scopeColumns">
+                <el-tag
+                    v-for="(item,index ) in dataConvert(scopeColumns.row.scope)"
+                    :key="index"
+                >
+                    {{ item|optionsFilter(scopeOptions,'label') }}
+                </el-tag>
+            </template>
+        </ibps-crud>
+        <edit
+            :id="editId"
+            :title="title"
+            :constant="constantInfo(scopeOptions)"
+            :visible="dialogFormVisible"
+            :readonly="readonly"
+            @callback="search"
+            @close="visible => dialogFormVisible = visible"
+        />
+        <import
+            :title="title"
+            :visible="importFormVisible"
+            @callback="search"
+            @close="visible => importFormVisible = visible"
+        />
+    </div>
 </template>
 
 <script>
@@ -64,269 +64,267 @@ import Import from './import'
 import { findApiScope } from '@/api/platform/info/find'
 
 const getScopeType = scopeType => {
-  return typeOptions.find(x => x.value === scopeType)
+    return typeOptions.find(x => x.value === scopeType)
 }
 
 export default {
-  components: {
-    Edit,
-    Import
-  },
-  filters: {
-    getScopeTypeFilter(scopeType) {
-      const t = getScopeType(scopeType)
-      return t ? t.label : scopeType
-    }
-  },
-  mixins: [FixHeight],
-  data() {
-    const statusOptions = [{
-      label: '是',
-      value: 'Y'
-    }, {
-      label: '否',
-      value: 'N',
-      type: 'danger'
-    }]
-    return {
-      dialogFormVisible: false, // 弹窗
-      importFormVisible: false,
-      editId: '', // 编辑dialog需要使用
-      readonly: false, // 是否只读
-      pkKey: 'id', // 主键  如果主键不是pk需要传主键
-      title: '',
-      loading: true,
-      isLimitedEnabled: false,
-      isLimited: false,
-      height: document.clientHeight,
-
-      listData: [],
-      pagination: {},
-      sorts: {},
-
-      scopeOptions: [],
-      scope: '',
-
-      listConfig: {
-        toolbars: [
-          {
-            key: 'search'
-          },
-          {
-            key: 'import'
-          },
-          {
-            key: 'add'
-          },
-          {
-            key: 'edit'
-          },
-          {
-            key: 'remove'
-          },
-          {
-            key: 'setSubmitLimit',
-            label: '设置接口提交限制',
-            icon: 'ibps-icon-plus-square-o',
-            hidden: (data) => {
-              return this.isLimitedEnabled === false || this.$store.getters.isSuper === false || this.isLimited === true
-            }
-          },
-          {
-            key: 'removeSubmitLimit',
-            label: '取消接口提交限制',
-            icon: 'ibps-icon-minus-square-o',
-            hidden: (data) => {
-              return this.isLimitedEnabled === false || this.$store.getters.isSuper === false || this.isLimited === false
-            }
-          }
-        ],
-        searchForm: {
-          forms: [
-            { prop: 'Q^APP_KEY_^SL', label: '应用标识' },
-            { prop: 'Q^API_KEY_^SL', label: '接口标识' },
-            { prop: 'Q^API_NAME_^SL', label: '接口名称' },
-            { prop: 'Q^API_URI_^SL', label: '接口地址' },
-            { prop: 'Q^SCOPE_^SL', label: '作用域', fieldType: 'slot', slotName: 'scope' },
-            { prop: 'Q^SUBMIT_CTRl_^S', label: '提交限制', fieldType: 'select',
-              options: statusOptions }
-          ]
-        },
-        // 表格字段配置
-        columns: [
-          { prop: 'appKey', label: '应用标识' },
-          { prop: 'apiKey', label: '接口标识' },
-          { prop: 'apiName', label: '接口名称' },
-          { prop: 'apiUri', label: '接口地址' },
-          { prop: 'scope', label: '作用域', slotName: 'scopeColumns' },
-          {
-            prop: 'submitCtrl', label: '提交限制',
-            tags: statusOptions
-          },
-          { prop: 'limit', label: '频次' },
-          { prop: 'testLimit', label: '测试频次' }
-        ],
-        rowHandle: {
-          actions: [{
-            key: 'edit'
-          }, {
-            key: 'remove'
-          }, {
-            key: 'detail'
-          }]
-        }
-      }
-    }
-  },
-  created() {
-    this.loadData()
-    this.constant()
-    if (this.$store.getters.isSuper === true) {
-      this.loadSubmitLimit()
-    }
-  },
-  methods: {
-    constantInfo(...params) {
-      return { ...params }
+    components: {
+        Edit,
+        Import
     },
-    dataConvert(data) {
-      return data.split(',')
-    },
-    loadSubmitLimit() {
-      getSubmitLimit().then(response => {
-        this.isLimited = response.data
-      }).catch(() => {})
-      getSubmitLimitEnabled().then(response => {
-        this.isLimitedEnabled = response.data
-      }).catch(() => {})
-    },
-    toggleSubmitLimit() {
-      if (this.isLimited) {
-        submitLimit({ limit: false }).then(response => {
-          ActionUtils.success('取消接口限制成功')
-          this.isLimited = false
-          this.$router.replace('/refresh')
-        }).catch(() => {
-        })
-      } else {
-        submitLimit({ limit: true }).then(response => {
-          ActionUtils.success('设置接口限制成功')
-          this.isLimited = true
-          this.$router.replace('/refresh')
-        }).catch(() => {
-        })
-      }
-    },
-    constant() {
-      findApiScope().then(response => { this.scopeOptions = response.data }).catch(() => {})
-    },
-    // 加载数据
-    loadData() {
-      this.loading = true
-      queryPageList(this.getSearcFormData()).then(response => {
-        ActionUtils.handleListData(this, response.data)
-        this.loading = false
-      }).catch(() => {
-        this.loading = false
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getSearcFormData() {
-      const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-      params['Q^SCOPE_^SL'] = this.scope
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    /**
-     * 处理分页事件
-     */
-    handlePaginationChange(page) {
-      ActionUtils.setPagination(this.pagination, page)
-      this.loadData()
-    },
-    /**
-     * 处理排序
-     */
-    handleSortChange(sort) {
-      ActionUtils.setSorts(this.sorts, sort)
-      this.loadData()
-    },
-    /**
-     * 查询
-     */
-    search() {
-      this.loadData()
-    },
-    /**
-     * 处理按钮事件
-     */
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case 'search':// 查询
-          ActionUtils.setFirstPagination(this.pagination)
-          this.search()
-          break
-        case 'add':// 添加
-          this.handleEdit()
-          this.title = '添加接口'
-          break
-        case 'import':// 导入
-          this.title = '接口导入'
-          this.handleImport()
-          break
-        case 'edit':// 编辑
-          ActionUtils.selectedRecord(selection).then((id) => {
-            this.handleEdit(id)
-            this.title = '编辑接口'
-          }).catch(() => { })
-          break
-        case 'detail':// 明细
-          ActionUtils.selectedRecord(selection).then((id) => {
-            this.handleEdit(id, true, true)
-            this.title = '接口明细'
-          }).catch(() => { })
-          break
-        case 'remove':// 删除
-          ActionUtils.removeRecord(selection).then((ids) => {
-            this.handleRemove(ids)
-          }).catch(() => { })
-          break
-        case 'setSubmitLimit':// 设置接口限制
-        case 'removeSubmitLimit':// 取消接口限制
-          this.toggleSubmitLimit()
-          break
-        default:
-          break
-      }
+    filters: {
+        getScopeTypeFilter (scopeType) {
+            const t = getScopeType(scopeType)
+            return t ? t.label : scopeType
+        }
     },
-    /**
-     * 导入
-     */
-    handleImport() {
-      this.importFormVisible = true
+    mixins: [FixHeight],
+    data () {
+        const statusOptions = [{
+            label: '是',
+            value: 'Y'
+        }, {
+            label: '否',
+            value: 'N',
+            type: 'danger'
+        }]
+        return {
+            dialogFormVisible: false, // 弹窗
+            importFormVisible: false,
+            editId: '', // 编辑dialog需要使用
+            readonly: false, // 是否只读
+            pkKey: 'id', // 主键  如果主键不是pk需要传主键
+            title: '',
+            loading: true,
+            isLimitedEnabled: false,
+            isLimited: false,
+            height: document.clientHeight,
+            listData: [],
+            pagination: {},
+            sorts: {},
+            scopeOptions: [],
+            scope: '',
+            listConfig: {
+                toolbars: [
+                    {
+                        key: 'search'
+                    },
+                    {
+                        key: 'import'
+                    },
+                    {
+                        key: 'add'
+                    },
+                    {
+                        key: 'edit'
+                    },
+                    {
+                        key: 'remove'
+                    },
+                    {
+                        key: 'setSubmitLimit',
+                        label: '设置接口提交限制',
+                        icon: 'ibps-icon-plus-square-o',
+                        hidden: (data) => {
+                            return this.isLimitedEnabled === false || this.$store.getters.isSuper === false || this.isLimited === true
+                        }
+                    },
+                    {
+                        key: 'removeSubmitLimit',
+                        label: '取消接口提交限制',
+                        icon: 'ibps-icon-minus-square-o',
+                        hidden: (data) => {
+                            return this.isLimitedEnabled === false || this.$store.getters.isSuper === false || this.isLimited === false
+                        }
+                    }
+                ],
+                searchForm: {
+                    forms: [
+                        { prop: 'Q^APP_KEY_^SL', label: '应用标识' },
+                        { prop: 'Q^API_KEY_^SL', label: '接口标识' },
+                        { prop: 'Q^API_NAME_^SL', label: '接口名称' },
+                        { prop: 'Q^API_URI_^SL', label: '接口地址' },
+                        { prop: 'Q^SCOPE_^SL', label: '作用域', fieldType: 'slot', slotName: 'scope' },
+                        { prop: 'Q^SUBMIT_CTRl_^S', label: '提交限制', fieldType: 'select',
+                            options: statusOptions }
+                    ]
+                },
+                // 表格字段配置
+                columns: [
+                    { prop: 'appKey', label: '应用标识', width: 150 },
+                    { prop: 'apiKey', label: '接口标识', minWidth: 150 },
+                    { prop: 'apiName', label: '接口名称', width: 150 },
+                    { prop: 'apiUri', label: '接口地址', minWidth: 200 },
+                    { prop: 'scope', label: '作用域', slotName: 'scopeColumns', width: 100 },
+                    {
+                        prop: 'submitCtrl', label: '提交限制',
+                        tags: statusOptions,
+                        width: 100
+                    },
+                    { prop: 'limit', label: '频次', width: 80 },
+                    { prop: 'testLimit', label: '测试频次', width: 90 }
+                ],
+                rowHandle: {
+                    actions: [{
+                        key: 'edit'
+                    }, {
+                        key: 'remove'
+                    }, {
+                        key: 'detail'
+                    }]
+                }
+            }
+        }
     },
-    /**
-     * 处理编辑
-     */
-    handleEdit(id = '', readonly = false) {
-      this.editId = id
-      this.readonly = readonly
-      this.dialogFormVisible = true
+    created () {
+        this.loadData()
+        this.constant()
+        if (this.$store.getters.isSuper === true) {
+            this.loadSubmitLimit()
+        }
     },
-    /**
-     * 处理删除
-     */
-    handleRemove(ids) {
-      // 获取数据
-      remove({ authAppApiIds: ids }).then(response => {
-        ActionUtils.removeSuccessMessage()
-        this.search()
-      }).catch(() => {})
+    methods: {
+        constantInfo (...params) {
+            return { ...params }
+        },
+        dataConvert (data) {
+            return data.split(',')
+        },
+        loadSubmitLimit () {
+            getSubmitLimit().then(response => {
+                this.isLimited = response.data
+            }).catch(() => {})
+            getSubmitLimitEnabled().then(response => {
+                this.isLimitedEnabled = response.data
+            }).catch(() => {})
+        },
+        toggleSubmitLimit () {
+            if (this.isLimited) {
+                submitLimit({ limit: false }).then(response => {
+                    ActionUtils.success('取消接口限制成功')
+                    this.isLimited = false
+                    this.$router.replace('/refresh')
+                }).catch(() => {
+                })
+            } else {
+                submitLimit({ limit: true }).then(response => {
+                    ActionUtils.success('设置接口限制成功')
+                    this.isLimited = true
+                    this.$router.replace('/refresh')
+                }).catch(() => {
+                })
+            }
+        },
+        constant () {
+            findApiScope().then(response => { this.scopeOptions = response.data }).catch(() => {})
+        },
+        // 加载数据
+        loadData () {
+            this.loading = true
+            queryPageList(this.getSearcFormData()).then(response => {
+                ActionUtils.handleListData(this, response.data)
+                this.loading = false
+            }).catch(() => {
+                this.loading = false
+            })
+        },
+        /**
+         * 获取格式化参数
+         */
+        getSearcFormData () {
+            const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
+            params['Q^SCOPE_^SL'] = this.scope
+            return ActionUtils.formatParams(
+                params,
+                this.pagination,
+                this.sorts)
+        },
+        /**
+         * 处理分页事件
+         */
+        handlePaginationChange (page) {
+            ActionUtils.setPagination(this.pagination, page)
+            this.loadData()
+        },
+        /**
+         * 处理排序
+         */
+        handleSortChange (sort) {
+            ActionUtils.setSorts(this.sorts, sort)
+            this.loadData()
+        },
+        /**
+         * 查询
+         */
+        search () {
+            this.loadData()
+        },
+        /**
+         * 处理按钮事件
+         */
+        handleAction (command, position, selection, data) {
+            switch (command) {
+                case 'search':// 查询
+                    ActionUtils.setFirstPagination(this.pagination)
+                    this.search()
+                    break
+                case 'add':// 添加
+                    this.handleEdit()
+                    this.title = '添加接口'
+                    break
+                case 'import':// 导入
+                    this.title = '接口导入'
+                    this.handleImport()
+                    break
+                case 'edit':// 编辑
+                    ActionUtils.selectedRecord(selection).then((id) => {
+                        this.handleEdit(id)
+                        this.title = '编辑接口'
+                    }).catch(() => { })
+                    break
+                case 'detail':// 明细
+                    ActionUtils.selectedRecord(selection).then((id) => {
+                        this.handleEdit(id, true, true)
+                        this.title = '接口明细'
+                    }).catch(() => { })
+                    break
+                case 'remove':// 删除
+                    ActionUtils.removeRecord(selection).then((ids) => {
+                        this.handleRemove(ids)
+                    }).catch(() => { })
+                    break
+                case 'setSubmitLimit':// 设置接口限制
+                case 'removeSubmitLimit':// 取消接口限制
+                    this.toggleSubmitLimit()
+                    break
+                default:
+                    break
+            }
+        },
+        /**
+         * 导入
+         */
+        handleImport () {
+            this.importFormVisible = true
+        },
+        /**
+         * 处理编辑
+         */
+        handleEdit (id = '', readonly = false) {
+            this.editId = id
+            this.readonly = readonly
+            this.dialogFormVisible = true
+        },
+        /**
+         * 处理删除
+         */
+        handleRemove (ids) {
+            // 获取数据
+            remove({ authAppApiIds: ids }).then(response => {
+                ActionUtils.removeSuccessMessage()
+                this.search()
+            }).catch(() => {})
+        }
     }
-  }
 }
 </script>

+ 20 - 13
src/views/platform/bpmn/bpmInstHis/list.vue

@@ -11,7 +11,7 @@
                 @expand-collapse="handleExpandCollapse"
             />
         </div>
-        <template-list v-if="templateData.templateid_" :template-data="templateData" />
+        <template-list v-if="templateShow" :template-data="templateData" />
         <ibps-crud
             v-else
             ref="crud"
@@ -165,7 +165,6 @@ import ActionUtils from '@/utils/action'
 import IbpsTypeTree from '@/business/platform/cat/type/tree'
 import FixHeight from '@/mixins/height'
 import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
-import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
 import IbpsAttachment from '@/business/platform/file/attachment/selector'
 import { specialType, specialBtn, specialParams, specialTable, specialField } from './corresponding/index'
 import TemplateList from './templateList'
@@ -222,6 +221,7 @@ export default {
                 process: [],
                 template: []
             },
+            templateShow: false,
             templateData: {},
             listData: [],
             pagination: {},
@@ -322,13 +322,18 @@ export default {
         // 获取所有流程的报表配置数据
         getConfig () {
             const sql = `select * from t_lcidglbdbb`
-            curdPost('sql', sql).then((res) => {
+            this.$common.request('sql', sql).then((res) => {
                 const { data = [] } = res.variables || {}
                 data.forEach(i => {
-                    this.reportAll[i.gui_dang_lei_xing].push(i)
+                    if (!i.gui_dang_lei_xing) {
+                        this.reportAll.process.push(i)
+                    } else {
+                        this.reportAll[i.gui_dang_lei_xing].push(i)
+                    }
                 })
-            }).catch(() => {
-                console.log('获取流程配置报表数据失败!')
+            }).catch(err => {
+                this.$message.error('获取流程配置报表数据失败!')
+                console.log(err)
             })
         },
         // 获取报表数据及附件数据
@@ -371,7 +376,7 @@ export default {
                 })
                 this.getSpecicalFile(bizKey)
             }
-            console.log(typeIndex)
+            // console.log(typeIndex)
             if (typeIndex !== '') {
                 this.record.report = this.record.report.slice(0, typeIndex)
             }
@@ -399,7 +404,7 @@ export default {
         // 获取单个请求中的文件
         getFile (sql, fileField) {
             return new Promise((resolve, reject) => {
-                curdPost('sql', sql).then(res => {
+                this.$common.request('sql', sql).then(res => {
                     const result = []
                     const fileList = fileField.split(',')
                     // console.log(fileList)
@@ -436,8 +441,8 @@ export default {
         // 获取内审管审文件
         getSpecicalFile (id) {
             const sql = `select ${specialParams[this.typeId]} from ${specialTable[this.typeId]} where ${specialField[this.typeId]} = '${id}'`
-            console.log(sql)
-            curdPost('sql', sql).then(res => {
+            // console.log(sql)
+            this.$common.request('sql', sql).then(res => {
                 const { data = [] } = res.variables || {}
                 if (data.length) {
                     this.record.special = data.filter(i => i.beforeImprove || i.afterImprove)
@@ -562,7 +567,7 @@ export default {
                 // console.log(delList, formKeyArr)
                 const sql = `select a.bo_code_, b.key_ from ibps_form_bo a, ibps_form_def b where a.form_id_ = b.id_ and find_in_set(b.key_, '${formKeyArr.join(',')}')`
                 // 获取选中记录对应的数据表code
-                curdPost('sql', sql).then(res => {
+                this.$common.request('sql', sql).then(res => {
                     const result = res.variables && res.variables.data
                     const codeList = {}
                     result.forEach(m => {
@@ -573,14 +578,14 @@ export default {
                         paramWhere: { id_: selection.join(',') }
                     }
                     // 删除选中记录
-                    curdPost('delete', deleteParams1).then(() => {
+                    this.$common.request('delete', deleteParams1).then(() => {
                         // 循环删除对应数据表数据
                         Object.keys(codeList).forEach(k => {
                             const deleteParams2 = {
                                 tableName: `t_${codeList[k]}`,
                                 paramWhere: { id_: delList[k].join(',') }
                             }
-                            curdPost('delete', deleteParams2)
+                            this.$common.request('delete', deleteParams2)
                         })
                         this.$message.success('删除成功!')
                         this.search()
@@ -595,8 +600,10 @@ export default {
             this.typeId = typeId
             this.templateData = this.reportAll.template.find(i => i.fen_lei_id_ === typeId) || {}
             if (!this.templateData.templateid_) {
+                this.templateShow = false
                 this.loadData()
             } else {
+                this.templateShow = true
                 this.templateData.typeId = typeId
                 this.templateData.typeName = typeName.name
             }

+ 9 - 4
src/views/platform/bpmn/bpmInstHis/templateList.vue

@@ -1,7 +1,6 @@
 <template>
     <div class="template-container">
         <template-list
-            v-if="templateId"
             :template-id="templateId"
             :dynamic-params="dynamicParams"
             :filter-params="filterParams"
@@ -24,8 +23,6 @@ export default {
     },
     data () {
         const { templateid_, guo_lv_can_shu_, typeName } = this.templateData
-        console.log(guo_lv_can_shu_)
-        console.log(JSON.parse(guo_lv_can_shu_))
         return {
             typeName,
             templateId: templateid_,
@@ -33,8 +30,16 @@ export default {
             dynamicParams: {}
         }
     },
+    watch: {
+        templateData (v) {
+            const { templateid_, guo_lv_can_shu_, typeName } = v
+            this.typeName = typeName
+            this.templateId = templateid_
+            this.filterParams = guo_lv_can_shu_ ? JSON.parse(guo_lv_can_shu_) : []
+        }
+    }
     // methods: {
-        
+
     // }
 }
 </script>

+ 9 - 9
src/views/platform/data/dataTemplate/template-list.vue

@@ -70,16 +70,16 @@ export default {
             },
             deep: true,
             immediate: true
+        },
+        templateId: {
+            handler (val) {
+                if (this.$utils.isNotEmpty(val)) {
+                    this.dataTemplateId = val
+                    this.loadDataTemplate()
+                }
+            },
+            immediate: true
         }
-        // templateId: {
-        //     handler (val) {
-        //         if (this.$utils.isNotEmpty(val)) {
-        //             this.dataTemplateId = val
-        //             this.loadDataTemplate()
-        //         }
-        //     },
-        //     immediate: true
-        // }
     },
     // created () {
     //     this.loadDataTemplate()

+ 229 - 112
src/views/platform/org/employee/list.vue

@@ -1,16 +1,65 @@
 <template>
     <ibps-container type="full" class="page">
-        <ibps-crud ref="crud" style="width: 100%" :height="height" :data="listData" :toolbars="listConfig.toolbars" :search-form="listConfig.searchForm" :pk-key="pkKey" :columns="listConfig.columns" :row-handle="listConfig.rowHandle" :pagination="pagination" :loading="loading" display-field="用户管理" :display-field-data="listConfig.displayFieldData" @display-field-change="handleDisplayField" @header-dragend="handleHeaderDragend" @action-event="handleAction" @sort-change="handleSortChange" @pagination-change="handlePaginationChange"/>
+        <ibps-crud
+            ref="crud"
+            style="width: 100%"
+            :height="height"
+            :data="listData"
+            :toolbars="listConfig.toolbars"
+            :search-form="listConfig.searchForm"
+            :pk-key="pkKey"
+            :columns="listConfig.columns"
+            :row-handle="listConfig.rowHandle"
+            :pagination="pagination"
+            :loading="loading"
+            display-field="用户管理"
+            :display-field-data="listConfig.displayFieldData"
+            @display-field-change="handleDisplayField"
+            @header-dragend="handleHeaderDragend"
+            @action-event="handleAction"
+            @sort-change="handleSortChange"
+            @pagination-change="handlePaginationChange"
+        />
         <!-- 新增、编辑、明细 -->
-        <edit :id="editId" :title="title" :formType="formType" :visible="dialogFormVisible" :readonly="readonly" :span="span" @dialog-callback="search" @close="(visible) => (dialogFormVisible = visible)" />
+        <edit
+            :id="editId"
+            :title="title"
+            :form-type="formType"
+            :visible="dialogFormVisible"
+            :readonly="readonly"
+            :span="span"
+            @dialog-callback="search"
+            @close="(visible) => (dialogFormVisible = visible)"
+        />
         <!-- 重置密码 -->
-        <change-password :ids="changePasswordIds" :visible="changePasswordVisible" :title="$t('platform.org.employee.change-password.resetPassword')" is-reset :reg-open="true" @dialog-callback="search" @close="(visible) => (changePasswordVisible = visible)" />
-        <more-search ref="moreSearch" :title="moreSearchTitle" :visible="dialogMoreSearchVisible" party-type="employee" @callback="search" @close="(visible) => (dialogMoreSearchVisible = visible)" @action-event="handleMoreSearchAction" />
+        <change-password
+            :ids="changePasswordIds"
+            :visible="changePasswordVisible"
+            :title="$t('platform.org.employee.change-password.resetPassword')"
+            is-reset
+            :reg-open="true"
+            @dialog-callback="search"
+            @close="(visible) => (changePasswordVisible = visible)"
+        />
+        <more-search
+            ref="moreSearch"
+            :title="moreSearchTitle"
+            :visible="dialogMoreSearchVisible"
+            party-type="employee"
+            @callback="search"
+            @close="(visible) => (dialogMoreSearchVisible = visible)"
+            @action-event="handleMoreSearchAction"
+        />
     </ibps-container>
 </template>
 
 <script>
-import { queryPageList, remove, active, disable } from '@/api/platform/org/employee'
+import {
+    queryPageList,
+    remove,
+    active,
+    disable
+} from '@/api/platform/org/employee'
 import ActionUtils from '@/utils/action'
 import { statusOptions, genderOptions, typeOptions } from './constants'
 import { mapActions, mapMutations } from 'vuex'
@@ -18,7 +67,6 @@ import Edit from './edit/index'
 import ChangePassword from './change-password'
 import CustomDataDisplayMixin from '@/business/platform/system/mixins/customDataDisplay'
 import MoreSearch from './more-search'
-import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
 export default {
     components: {
         Edit,
@@ -26,7 +74,7 @@ export default {
         MoreSearch
     },
     mixins: [CustomDataDisplayMixin],
-    data() {
+    data () {
         return {
             height: document.clientHeight,
             title: '',
@@ -52,13 +100,31 @@ export default {
                     { key: 'add' },
                     { key: 'edit' },
                     { key: 'remove' },
-                    { key: 'changePassword', label: this.$t('platform.org.employee.button.changePassword'), icon: 'el-icon-refresh' }
+                    {
+                        key: 'changePassword',
+                        label: this.$t(
+                            'platform.org.employee.button.changePassword'
+                        ),
+                        icon: 'el-icon-refresh'
+                    }
                     // { key: 'more', icon: 'ibps-icon-ellipsis-h' }
                 ],
                 searchForm: {
                     forms: [
-                        { prop: 'Q^NAME_^SL', label: this.$t('platform.org.employee.prop.name'), labelWidth: 40, itemWidth: 150 },
-                        { prop: 'Q^ACCOUNT_^SL', label: this.$t('platform.org.employee.prop.account'), labelWidth: 40, itemWidth: 150 },
+                        {
+                            prop: 'Q^NAME_^SL',
+                            label: this.$t('platform.org.employee.prop.name'),
+                            labelWidth: 40,
+                            itemWidth: 150
+                        },
+                        {
+                            prop: 'Q^ACCOUNT_^SL',
+                            label: this.$t(
+                                'platform.org.employee.prop.account'
+                            ),
+                            labelWidth: 40,
+                            itemWidth: 150
+                        },
                         {
                             prop: 'Q^STATUS_^SL',
                             label: this.$t('platform.org.employee.prop.status'),
@@ -88,19 +154,44 @@ export default {
                 },
                 // 表格字段配置
                 columns: [
-                    { prop: 'name', label: this.$t('platform.org.employee.prop.name'),formatter: this.aaa, width: 120 },
-                    { prop: 'account', label: this.$t('platform.org.employee.prop.account'), width: 150 },
-                    //{ prop: 'wcAccount', label: this.$t('platform.org.employee.prop.wcAccount'),width:120},
-                    { prop: 'positionsName', label: this.$t('platform.org.employee.prop.orgPath'),sortable: false, width: 500 },
+                    {
+                        prop: 'name',
+                        label: this.$t('platform.org.employee.prop.name'),
+                        formatter: this.aaa,
+                        width: 120
+                    },
+                    {
+                        prop: 'account',
+                        label: this.$t('platform.org.employee.prop.account'),
+                        width: 150
+                    },
+                    // { prop: 'wcAccount', label: this.$t('platform.org.employee.prop.wcAccount'),width:120},
+                    {
+                        prop: 'positionsPath',
+                        label: this.$t('platform.org.employee.prop.orgPath'),
+                        sortable: false,
+                        minWidth: 300
+                    },
                     // { prop: 'qq', label: '客户单位名称', width: 250 },
-                    { prop: 'status', label: this.$t('platform.org.employee.prop.status'), tags: statusOptions, width: 100 },
-                    { prop: 'createTime', label: this.$t('common.field.createTime') }
+                    {
+                        prop: 'status',
+                        label: this.$t('platform.org.employee.prop.status'),
+                        tags: statusOptions,
+                        width: 100
+                    },
+                    {
+                        prop: 'createTime',
+                        label: this.$t('common.field.createTime'),
+                        width: 150
+                    }
                 ],
                 rowHandle: {
                     actions: [
                         {
                             key: 'changePassword',
-                            label: this.$t('platform.org.employee.button.changePassword'),
+                            label: this.$t(
+                                'platform.org.employee.button.changePassword'
+                            ),
                             icon: 'el-icon-refresh',
                             hidden: (rowData, index) => {
                                 if (rowData.status === 'deleted') {
@@ -147,7 +238,9 @@ export default {
                         },
                         {
                             key: 'actived',
-                            label: this.$t('platform.org.employee.button.actived'),
+                            label: this.$t(
+                                'platform.org.employee.button.actived'
+                            ),
                             icon: 'ibps-icon-unlock',
                             hidden: (rowData, index) => {
                                 if (rowData.status === 'actived') {
@@ -163,7 +256,9 @@ export default {
                         },
                         {
                             key: 'disable',
-                            label: this.$t('platform.org.employee.button.disable'),
+                            label: this.$t(
+                                'platform.org.employee.button.disable'
+                            ),
                             icon: 'ibps-icon-ban',
                             hidden: function (rowData, index) {
                                 if (rowData.status !== 'actived') {
@@ -179,13 +274,21 @@ export default {
                         },
                         {
                             key: 'switchUser',
-                            label: this.$t('platform.org.employee.button.switchUser'),
+                            label: this.$t(
+                                'platform.org.employee.button.switchUser'
+                            ),
                             icon: 'el-icon-sort',
                             hidden: function (rowData, index) {
                                 const userId = this.$store.getters.userId
                                 const isSuper = this.$store.getters.isSuper
-                                const isTenantAdmin = this.$store.getters.isTenantAdmin
-                                return isTenantAdmin === true || rowData.status !== 'actived' || userId === rowData.id || !isSuper
+                                const isTenantAdmin =
+                                    this.$store.getters.isTenantAdmin
+                                return (
+                                    isTenantAdmin === true ||
+                                    rowData.status !== 'actived' ||
+                                    userId === rowData.id ||
+                                    !isSuper
+                                )
                             }
                         }
                     ]
@@ -198,8 +301,8 @@ export default {
             positionsList: []
         }
     },
-    created() {
-        this.getOrg().then(res =>{
+    created () {
+        this.getOrg().then(res => {
             this.loadData()
             this.loadDisplayField()
         })
@@ -214,40 +317,62 @@ export default {
             switchUser: 'ibps/user/switchUser'
         }),
         // 加载数据
-        loadData() {
+        loadData () {
             this.loading = true
-            queryPageList(this.getSearcFormData())
-                .then((response) => {
-                    response.data.dataResult.forEach(item => {
-                        if(item.positions){
-                            let name = this.getPositionsName(item.positions)
-                            this.$set(item,'positionsName',name)
-                        }
-                    })
-                    ActionUtils.handleListData(this, response.data)
-                    this.loading = false
-                })
-                .catch(() => {
-                    this.loading = false
+            queryPageList(this.getSearcFormData()).then((response) => {
+                response.data.dataResult.forEach(item => {
+                    if (item.positions) {
+                        // 转换岗位名
+                        const name = this.getPositionsName(item.positions)
+                        this.$set(item, 'positionsName', name)
+                        // 转换岗位路径
+                        const path = this.getPositionsPath(item.positions)
+                        console.log(path)
+                        this.$set(item, 'positionsPath', path)
+                    }
                 })
+                ActionUtils.handleListData(this, response.data)
+                this.loading = false
+            }).catch(() => {
+                this.loading = false
+            })
         },
-        getPositionsName(valueList){
-            let postList = valueList.split(",")
-            let list = []
-            if(postList.length > 0){
-                postList.forEach(item => {
-                    let dataItem = this.positionsList.find(ite => ite.ID_ == item)
-                    list.push(dataItem.NAME_)
-                })
-                return list.join(",")
-            }else{
+        getPositionsName (valueList) {
+            const postList = valueList.split(',')
+            const list = []
+            if (!postList.length) {
                 return ''
             }
+            postList.forEach((item) => {
+                const dataItem = this.positionsList.find(i => i.ID_ === item)
+                list.push(dataItem.NAME_)
+            })
+            return list.join(',')
+        },
+        getPositionsPath (valueList) {
+            console.log(valueList)
+            const postList = valueList.split(',')
+            const list = []
+            if (!postList.length) {
+                return ''
+            }
+            postList.forEach((item) => {
+                const temp = this.positionsList.find(i => i.ID_ === item)
+                const pathList = temp ? temp.PATH_.split('.') : []
+                console.log(pathList)
+                let p = ''
+                pathList.filter(i => i).forEach(k => {
+                    const t = this.positionsList.find(i => i.ID_ === k)
+                    p += `${t.NAME_}.`
+                })
+                list.push(p)
+            })
+            return list.join('\r\n')
         },
         /**
          * 获取格式化参数
          */
-        getSearcFormData() {
+        getSearcFormData () {
             const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
             if (this.moreSearchParams) {
                 Object.assign(params, this.moreSearchParams)
@@ -257,14 +382,14 @@ export default {
         /**
          * 处理分页事件
          */
-        handlePaginationChange(page) {
+        handlePaginationChange (page) {
             ActionUtils.setPagination(this.pagination, page)
             this.loadData()
         },
         /**
          * 处理排序
          */
-        handleSortChange(sort) {
+        handleSortChange (sort) {
             ActionUtils.setSorts(this.sorts, sort)
             this.loadData()
         },
@@ -272,12 +397,12 @@ export default {
         /**
          * 获取显示字段
          */
-        loadDisplayField() {
+        loadDisplayField () {
             this.getCustomDataDisplay(this.listIdentity).then((data) => {
                 this.listConfig.displayFieldData = data
             })
         },
-        handleHeaderDragend(newWidth, oldWidth, column, event) {
+        handleHeaderDragend (newWidth, oldWidth, column, event) {
             const displayFieldData = this.listConfig.displayFieldData
             for (let i = 0; i < displayFieldData.length; i++) {
                 const displayField = displayFieldData[i]
@@ -296,26 +421,24 @@ export default {
         /**
          * 保存显示字段
          */
-        handleDisplayField(data, callback, hasMessage) {
-            this.saveCustomDataDisplay(data, this.listIdentity)
-                .then((response) => {
-                    if (hasMessage) ActionUtils.success(response.message)
-                    callback(true)
-                })
-                .catch(() => {
-                    callback(false)
-                })
+        handleDisplayField (data, callback, hasMessage) {
+            this.saveCustomDataDisplay(data, this.listIdentity).then((response) => {
+                if (hasMessage) ActionUtils.success(response.message)
+                callback(true)
+            }).catch(() => {
+                callback(false)
+            })
         },
         /**
          * 查询
          */
-        search() {
+        search () {
             this.loadData()
         },
         /**
          * 处理按钮事件
          */
-        handleAction(buttonKey, position, selection, data) {
+        handleAction (buttonKey, position, selection, data) {
             switch (buttonKey) {
                 case 'search': // 查询
                     ActionUtils.setFirstPagination(this.pagination)
@@ -323,40 +446,38 @@ export default {
                     break
                 case 'add': // 添加
                     this.handleEdit()
-                    this.title = this.$t('common.title.add', { title: this.$t('platform.org.employee.title') })
+                    this.title = this.$t('common.title.add', {
+                        title: this.$t('platform.org.employee.title')
+                    })
                     this.span = 13
                     break
                 case 'edit': // 编辑
-                    ActionUtils.selectedRecord(selection)
-                        .then((id) => {
-                            this.handleEdit(id,false,'edit')
-                            this.title = this.$t('common.title.edit', { title: this.$t('platform.org.employee.title') })
-                            this.span = 13
+                    ActionUtils.selectedRecord(selection).then((id) => {
+                        this.handleEdit(id, false, 'edit')
+                        this.title = this.$t('common.title.edit', {
+                            title: this.$t('platform.org.employee.title')
                         })
-                        .catch(() => {})
+                        this.span = 13
+                    }).catch(() => {})
                     break
                 case 'changePassword': // 重置密码
-                    ActionUtils.selectedMultiRecord(selection)
-                        .then((ids) => {
-                            this.handlereChangePassword(ids)
-                        })
-                        .catch(() => {})
+                    ActionUtils.selectedMultiRecord(selection).then((ids) => {
+                        this.handlereChangePassword(ids)
+                    }).catch(() => {})
                     break
                 case 'detail': // 明细
-                    ActionUtils.selectedRecord(selection)
-                        .then((id) => {
-                            this.handleEdit(id, true, 'detail')
-                            this.span = 24
-                            this.title = this.$t('common.title.detail', { title: this.$t('platform.org.employee.title') })
+                    ActionUtils.selectedRecord(selection).then((id) => {
+                        this.handleEdit(id, true, 'detail')
+                        this.span = 24
+                        this.title = this.$t('common.title.detail', {
+                            title: this.$t('platform.org.employee.title')
                         })
-                        .catch(() => {})
+                    }).catch(() => {})
                     break
                 case 'remove': // 删除
-                    ActionUtils.removeRecord(selection)
-                        .then((ids) => {
-                            this.handleRemove(ids)
-                        })
-                        .catch(() => {})
+                    ActionUtils.removeRecord(selection).then((ids) => {
+                        this.handleRemove(ids)
+                    }).catch(() => {})
                     break
                 case 'actived': // 激活
                     this.handleActived(selection)
@@ -377,10 +498,10 @@ export default {
         /**
          * 处理更多
          */
-        handleMoreSearchParams() {
+        handleMoreSearchParams () {
             this.dialogMoreSearchVisible = true
         },
-        handleMoreSearchAction(data) {
+        handleMoreSearchAction (data) {
             ActionUtils.setFirstPagination(this.pagination)
             this.moreSearchParams = data
             this.loadData()
@@ -388,7 +509,7 @@ export default {
         /**
          * 处理编辑
          */
-        handleEdit(editId, readonly = false,type = 'add') {
+        handleEdit (editId, readonly = false, type = 'add') {
             this.editId = editId || ''
             this.formType = type
             this.dialogFormVisible = true
@@ -397,30 +518,30 @@ export default {
         /**
          * 处理重置密码
          */
-        handlereChangePassword(ids) {
+        handlereChangePassword (ids) {
             this.changePasswordIds = ids
             this.changePasswordVisible = true
         },
-        handleRemove(ids) {
+        handleRemove (ids) {
             // 删除数据
             remove({ employeeIds: ids }).then((response) => {
                 ActionUtils.removeSuccessMessage()
                 this.search()
             })
         },
-        handleActived(id) {
+        handleActived (id) {
             active({ employeeId: id }).then((response) => {
                 ActionUtils.successMessage('激活成功!')
                 this.search()
             })
         },
-        handleDisable(id) {
+        handleDisable (id) {
             disable({ employeeId: id }).then((response) => {
                 ActionUtils.successMessage('禁用成功!')
                 this.search()
             })
         },
-        handleSwitchUser(username) {
+        handleSwitchUser (username) {
             this.switchUser(username).then(() => {
                 ActionUtils.successMessage('切换用户成功!')
                 // 由于已经加载过设置 需要清空缓存设置
@@ -429,27 +550,23 @@ export default {
                 this.$router.replace('/')
             })
         },
-        //获取组织的数据
-        getOrg(){
+        // 获取组织的数据
+        getOrg () {
             return new Promise((resolve, reject) => {
-                let sql = `select ID_,NAME_ FROM ibps_party_position order by CREATE_TIME_`
-                curdPost('sql', sql).then(res => {
-                    if(res.state == '200'){
-                        const datas = res.variables.data
-                        datas.forEach((item,index) => {
-                            this.$set(item,'value',item.ID_)
-                            this.$set(item,'label',item.NAME_)
-                        })
-                        this.positionsList = datas
+                const sql = `select a.ID_ as ID_, a.NAME_ as NAME_, b.path_ as PATH_ FROM ibps_party_position a, ibps_party_entity b where a.id_ = b.id_`
+                this.$common.request('sql', sql).then((res) => {
+                    const datas = res.variables.data
+                    datas.forEach((item, index) => {
+                        this.$set(item, 'value', item.ID_)
+                        this.$set(item, 'label', item.NAME_)
+                    })
+                    this.positionsList = datas
 
-                        this.listConfig.searchForm.forms[3].options = datas
-                        resolve()
-                    }
+                    this.listConfig.searchForm.forms[3].options = datas
+                    resolve()
                 })
-                
             })
-            
-        },
+        }
     }
 }
 </script>

+ 2 - 1
src/views/platform/system/news/edit.vue

@@ -219,7 +219,8 @@ export default {
                 status: '',
                 tenantId: '',
                 title: '',
-                type: '',
+                // 改字段暂时无用,改存当前层级第一级ID
+                type: this.$store.getters.level ? this.$store.getters.level.first : '',
                 typeId: '',
                 updateBy: '',
                 updateTime: '',

+ 3 - 1
src/views/platform/system/news/list.vue

@@ -131,8 +131,10 @@ export default {
          * 获取格式化参数
          */
         getSearcFormData () {
+            const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
+            params['Q^type_^SL'] = this.$store.getters.level ? this.$store.getters.level.first : ''
             return ActionUtils.formatParams(
-                this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {},
+                params,
                 this.pagination,
                 this.sorts)
         },

+ 31 - 28
src/views/system/dashboard/components/workbench.vue

@@ -463,6 +463,9 @@ export default {
             if (this.activeTab === 'finish') {
                 params.end = '1'
             }
+            if (this.activeTab === 'news') {
+                params['Q^type_^SL'] = this.$store.getters.level ? this.$store.getters.level.first : ''
+            }
             const s = this.activeTab === 'news' ? { 'PUBLIC_DATE_': 'DESC' } : this.sorts
             return ActionUtils.formatParams(params, page, s)
         },
@@ -641,35 +644,35 @@ export default {
                 // 筛选出不存在于主管提醒表的过期数据
                 if (!isExist) {
                     // 无部门信息的用户不往过期事务表加数据
-                    if (this.orgInfo.groupID) {
-                        const obj = {
-                            // 事务ID
-                            shi_wu_id_: item.taskId,
-                            // 完整名称
-                            wan_zheng_ming_ch: item.subject,
-                            // 事务说明
-                            shi_wu_shuo_ming_: item.subject.includes('#') ? item.subject.split('#')[1] : '',
-                            // 事务名称
-                            shi_wu_ming_cheng: item.workName,
-                            // 事务状态
-                            shi_wu_zhuang_tai: `待${item.name}`,
-                            // 事务类型
-                            shi_wu_lei_xing_: item.workType,
-                            chu_li_ren_ming_: item.ownerName,
-                            chu_li_ren_id_: this.getInfoByName(item.ownerName, 'id'),
-                            chu_li_ren_dian_h: this.getInfoByName(item.ownerName, 'phone'),
-                            bu_men_: this.orgInfo.orgName,
-                            bu_men_id_: this.orgInfo.groupID,
-                            // 主管ID与当前用户id相等时将主管ID设置为主任【】的ID,主管电话设为空
-                            zhu_guan_id_: this.orgInfo.id === userId ? '990927120278487040' : this.orgInfo.id,
-                            zhu_guan_dian_hua: this.orgInfo.id === userId ? '' : this.orgInfo.mobile,
-                            bian_zhi_shi_jian: item.createTime,
-                            ti_xing_ci_shu_: 1,
-                            duan_xin_ci_shu_: 0,
-                            ti_xing_shi_jian_: nowTime
-                        }
-                        addList.push(obj)
+                    // if (this.orgInfo.groupID) {
+                    const obj = {
+                        // 事务ID
+                        shi_wu_id_: item.taskId,
+                        // 完整名称
+                        wan_zheng_ming_ch: item.subject,
+                        // 事务说明
+                        shi_wu_shuo_ming_: item.subject.includes('#') ? item.subject.split('#')[1] : '',
+                        // 事务名称
+                        shi_wu_ming_cheng: item.workName,
+                        // 事务状态
+                        shi_wu_zhuang_tai: `待${item.name}`,
+                        // 事务类型
+                        shi_wu_lei_xing_: item.workType,
+                        chu_li_ren_ming_: item.ownerName,
+                        chu_li_ren_id_: this.getInfoByName(item.ownerName, 'id'),
+                        chu_li_ren_dian_h: this.getInfoByName(item.ownerName, 'phone'),
+                        bu_men_: this.orgInfo.orgName,
+                        bu_men_id_: this.orgInfo.groupID,
+                        // 主管ID与当前用户id相等时将主管ID设置为主任【】的ID,主管电话设为空
+                        zhu_guan_id_: this.orgInfo.id === userId ? '990927120278487040' : this.orgInfo.id,
+                        zhu_guan_dian_hua: this.orgInfo.id === userId ? '' : this.orgInfo.mobile,
+                        bian_zhi_shi_jian: item.createTime,
+                        ti_xing_ci_shu_: 1,
+                        duan_xin_ci_shu_: 0,
+                        ti_xing_shi_jian_: nowTime
                     }
+                    addList.push(obj)
+                    // }
                     const msg = {
                         subject: msgTitle[item.workType],
                         content: `<p>事务【${item.workName}】${msgContent[item.workType]}<p>`,