hyf 3 лет назад
Родитель
Сommit
b434f94e3f

+ 1 - 0
src/views/system/doc/index.vue

@@ -11,6 +11,7 @@
 </template>
 
 <script>
+
 import DirTree from './components/DirTree'
 import FileList from './components/FileList'
 

+ 1 - 0
src/views/system/industry/manage/components/Industry.vue

@@ -42,6 +42,7 @@ import { ACTION_ADD, ACTION_UPDATE } from '@/utils/actionType'
 import { getIndustryById, createIndustry, updateIndustry } from '@/api/system/industryApi'
 
 export default {
+  name: 'Industry',
   props: {
     title: {
       type: String,

+ 16 - 23
src/views/system/industry/manage/index.vue

@@ -71,6 +71,7 @@ import { toTree } from '@/utils/build-tree'
 import { getIndustryByList, deleteIndustryById } from '@/api/system/industryApi'
 
 export default {
+  name: 'IndustryList',
   components: {
     Industry
   },
@@ -106,23 +107,19 @@ export default {
     getData() {
       this.listLoading = true
       getIndustryByList().then((resp) => {
-        const { code, data, total, msg } = resp
+        const { data, total } = resp
         this.listLoading = false
-        if (code === 200) {
-          const temp = toTree(data, {
-            value: 'industryId',
-            name: 'label',
-            pValue: 'parentId'
-          }, {
-            value: 'industryId',
-            name: 'industryName',
-            pValue: 'parentId'
-          })
-          this.dataList = temp
-          this.total = total
-        } else {
-          this.$message.error(msg)
-        }
+        const temp = toTree(data, {
+          value: 'industryId',
+          name: 'label',
+          pValue: 'parentId'
+        }, {
+          value: 'industryId',
+          name: 'industryName',
+          pValue: 'parentId'
+        })
+        this.dataList = temp
+        this.total = total
       }).catch((error) => {
         console.log(error)
       })
@@ -154,13 +151,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteIndustryById(industryId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 200) {
-            this.getData()
-            this.$message.success(msg)
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.getData()
+          this.$message.success(msg)
         })
       }).catch(() => {
         this.$message.info('已取消操作')

+ 7 - 15
src/views/system/industry/type/index.vue

@@ -38,7 +38,7 @@ import IndustryType from './components/IndustryType.vue'
 import { getIndustryTypeByList, deleteIndustryTypeById } from '@/api/system/industryTypeApi'
 
 export default {
-  name: 'Index',
+  name: 'IndustryTypeList',
   components: {
     IndustryType
   },
@@ -64,13 +64,9 @@ export default {
     getData() {
       this.listLoading = true
       getIndustryTypeByList(this.conditions).then((resp) => {
-        const { code, msg, data, total } = resp
-        if (code === 200) {
-          this.conditions.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        const { data, total } = resp
+        this.conditions.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -103,13 +99,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteIndustryTypeById(industryTypeId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 200) {
-            this.getData()
-            this.$message.success(msg)
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.getData()
+          this.$message.success(msg)
         }).catch((error) => {
           console.log(error)
         })

+ 0 - 0
src/views/system/kms/art/index.vue


+ 0 - 0
src/views/system/kms/doc/index.vue


+ 0 - 0
src/views/system/kms/management/index.vue


+ 1 - 0
src/views/system/map/components/Map.vue

@@ -50,6 +50,7 @@ import FileUpload from '@/components/FileUpload/avatarUpload'
 import Vuescroll from 'vuescroll'
 
 export default {
+  name: 'MapList',
   components: {
     Vuescroll, FileUpload
   },

+ 3 - 1
src/views/system/msg/leftUtil.vue → src/views/system/msg/components/LeftUtil.vue

@@ -14,7 +14,7 @@
 </template>
 <script>
 
-import MsgComponent from './msg'
+import MsgComponent from './Msg.vue'
 
 export default {
   name: 'LeftUtil',
@@ -46,6 +46,8 @@ export default {
     handleAdd() {
       this.$refs['AddTask'].handler()
     },
+
+    // 选择事件
     selectItem(data, index) {
       this.currentSelect = index
       this.$emit('selectItem', data.type)

+ 8 - 5
src/views/system/msg/msg.vue → src/views/system/msg/components/Msg.vue

@@ -12,6 +12,7 @@
         <el-form-item label="标题" prop="msgTitle">
           <el-input v-model="formData.msgTitle" />
         </el-form-item>
+
         <el-form-item label="接受者" prop="msgTo">
           <user-selector v-model="formData.msgTo" />
         </el-form-item>
@@ -25,8 +26,8 @@
         </el-form-item>
       </el-form>
       <div class="btn-group">
-        <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
-        <el-button class="cancel-btn" @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
+        <el-button class="cancel-btn" @click="dialogVisible = false">取消</el-button>
       </div>
     </div>
   </el-drawer>
@@ -35,10 +36,10 @@
 <script>
 import { ACTION_UPDATE } from '@/utils/actionType'
 import { sendMessage, getMessageById } from '@/api/system/messageApi'
-import UserSelector from '@/components/UserSelector'
+import UserSelector from '@/components/UserSelector/index.vue'
 
 export default {
-  name: 'OutcomeEvaluation',
+  name: 'Msg',
   components: { UserSelector },
   props: {
     title: {
@@ -49,7 +50,6 @@ export default {
   data() {
     return {
       dialogVisible: false,
-      // dialogVisible: false,
       formData: {
         msgTitle: '',
         msgCatId: 1,
@@ -79,6 +79,7 @@ export default {
     this.getUserList()
   },
   methods: {
+
     // 添加
     handlerAdd() {
       this.dialogVisible = true
@@ -106,6 +107,7 @@ export default {
         this.handlerAdd()
       }
     },
+
     resetRuleForm() {
       this.ruleForm = {
         appIds: '',
@@ -134,6 +136,7 @@ export default {
     formSuccess() {
       this.$emit('formSuccess')
     },
+
     resetForm(formName) {
       this.$refs[formName].resetFields()
     }

+ 0 - 0
src/views/system/msg/MsgItem.vue → src/views/system/msg/components/MsgItem.vue


+ 5 - 5
src/views/system/msg/msgList.vue → src/views/system/msg/components/MsgList.vue

@@ -32,10 +32,10 @@
 
 <script>
 import vuescroll from 'vuescroll'
-import Msg from './msg'
-import { getMsgByPage, deleteMsgById } from '@/api/system/msgApi'
-import MsgItem from './MsgItem'
-import Pagination from '@/components/Pagination'
+import Msg from './Msg.vue'
+import { getMsgReceivedByPage, deleteMsgById } from '@/api/system/msgApi'
+import MsgItem from './MsgItem.vue'
+import Pagination from '@/components/Pagination/index.vue'
 
 export default {
   name: 'MsgManage',
@@ -83,7 +83,7 @@ export default {
 
     // Fetch Data
     getData() {
-      getMsgByPage(this.conditions).then((resp) => {
+      getMsgReceivedByPage(this.conditions).then((resp) => {
         const { data, count } = resp
         this.conditions.total = count
         this.dataList = data

+ 4 - 2
src/views/system/msg/index.vue

@@ -7,6 +7,7 @@
       <el-col :span="4" class="left-counter-wrap">
         <LeftUtil @selectItem="selectItem" />
       </el-col>
+
       <el-col :span="20" class="right-counter-wrap">
         <msg-list ref="MsgList" />
       </el-col>
@@ -14,9 +15,10 @@
   </div>
 </template>
 <script>
-import LeftUtil from './leftUtil.vue'
-import MsgList from './msgList.vue'
+import LeftUtil from './components/LeftUtil.vue'
+import MsgList from './components/MsgList.vue'
 export default {
+  name: 'MsgIndex',
   components: {
     LeftUtil,
     MsgList

+ 1 - 0
src/views/system/permit/account/index.vue

@@ -65,6 +65,7 @@ import { getAccountPermitViewByList, createAccountPermit, deleteAccountPermitByI
 import { permitTplId } from '@/settings'
 import { mapGetters } from 'vuex'
 export default {
+  name: 'AccountPermitList',
   props: {
     title: {
       type: String,

+ 8 - 6
src/views/system/permit/position/index.vue

@@ -53,7 +53,7 @@ import { getPositionPermitViewByList, createPositionPermit, deletePositionPermit
 import { permitTplId } from '@/settings'
 import { mapGetters } from 'vuex'
 export default {
-  name: 'PositionPermitIndex',
+  name: 'PositionPermitList',
   props: {
     title: {
       type: String,
@@ -114,12 +114,14 @@ export default {
     formSuccess() {
       this.$emit('formSuccess')
     },
-    permitChange(rows) {
-      const positionId = this.conditions.positionId// this.userData.positionId
-      if (rows.positionPermitted === 1) {
-        createPositionPermit(positionId, rows.permitId)
+
+    // 修改事件处理
+    permitChange(row) {
+      const positionId = this.conditions.positionId
+      if (row.positionPermitted === 1) {
+        createPositionPermit(positionId, row.permitId)
       } else {
-        deletePositionPermitById(positionId, rows.permitId)
+        deletePositionPermitById(positionId, row.permitId)
       }
     }
   }

+ 3 - 2
src/views/system/permit/role/index.vue

@@ -16,14 +16,15 @@ import RoleList from './components/RoleList.vue'
 import PermitList from './components/PermitList.vue'
 
 export default {
+  name: 'RolePermitIndex',
   components: {
     RoleList,
     PermitList
   },
 
   methods: {
-    selChange(clientId, roleId) {
-      this.$refs['PermitList'].loadData(clientId, roleId)
+    selChange(appId, roleId) {
+      this.$refs['PermitList'].loadData(appId, roleId)
     }
   }
 }

+ 32 - 38
src/views/system/regulation/view.vue → src/views/system/regulation/components/Detail.vue

@@ -32,8 +32,8 @@
 
 <script>
 import vuescroll from 'vuescroll'
-import { getRegulationById } from '@/api/aqpt/artRegulationApi'
-import AttachList from '@/components/AttachList'
+import { getArtById } from '@/api/system/artApi'
+import AttachList from '@/components/AttachList/index.vue'
 export default {
   components: {
     vuescroll,
@@ -54,7 +54,6 @@ export default {
           onlyShowBarOnScroll: false
         }
       },
-      // dialogVisible: true,
       dialogVisible: false,
       formData: {
         artId: undefined,
@@ -67,7 +66,6 @@ export default {
       },
       // validate rules
       rules: {},
-      regulationCatList: null,
       actionType: ''
     }
   },
@@ -76,14 +74,14 @@ export default {
   methods: {
 
     // Upload List Change
-    attchListChange(dataList) {
+    attachListChange(dataList) {
       this.formData.attachList = dataList
     },
 
-    // Edit Model
-    showInfoModel(artId) {
+    // View Model
+    showModel(artId) {
       this.dialogVisible = true
-      getRegulationById(artId).then((resp) => {
+      getArtById(artId).then((resp) => {
         const { data } = resp
         this.formData = data
       }).catch((error) => {
@@ -101,10 +99,6 @@ export default {
         artAuthor: '',
         attachList: []
       }
-    },
-
-    resetFormField(formName) {
-      this.$refs[formName].resetFields()
     }
   }
 }
@@ -113,37 +107,37 @@ export default {
 <style lang="scss">
 </style>
 <style lang="scss" scoped>
-    .msg-component {
-        margin: 15px;
-        position: relative;
-        height: calc(100% - 15px);
-        color: cornsilk;
-
-        .btn-group {
-            position: absolute;
-            bottom: 0;
-            left: 0;
-            width: 100%;
+.msg-component {
+  margin: 15px;
+  position: relative;
+  height: calc(100% - 15px);
+  color: cornsilk;
 
-            .el-button {
-                width: 120px;
-                margin: 0 0 15px 110px;
-            }
+  .btn-group {
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    width: 100%;
 
-            .cancel-btn {
-                margin-left: 30px;
-                background: #004F7B;
-                border-color: #004F7B;
-                color: #FFF;
+    .el-button {
+      width: 120px;
+      margin: 0 0 15px 110px;
+    }
 
-                &:hover {
-                    background: #026197;
-                    border-color: #026197;
-                }
-            }
-        }
+    .cancel-btn {
+      margin-left: 30px;
+      background: #004F7B;
+      border-color: #004F7B;
+      color: #FFF;
 
+      &:hover {
+        background: #026197;
+        border-color: #026197;
+      }
     }
+  }
+
+}
 .attachList-container{
   padding: 10px 0;
   border-top: 1px solid #464646;

+ 43 - 58
src/views/system/regulation/regulation.vue → src/views/system/regulation/components/Regulation.vue

@@ -7,16 +7,15 @@
     size="99%"
     :visible.sync="dialogVisible"
   >
-    <div class="msg-component">
+    <div class="content-container">
       <vuescroll :ops="ops" style="height: calc(100vh - 260px)">
         <el-form ref="ruleForm" :model="formData" :rules="rules" label-position="right" label-width="100px">
-          <el-form-item label="制度名称" prop="artTitle">
+          <el-form-item label="名称" prop="artTitle">
             <el-input v-model="formData.artTitle" />
           </el-form-item>
+
           <el-form-item label="分类" prop="artCatId">
-            <el-select v-model="formData.artCatId" style="width: 100%" filterable placeholder="请选择">
-              <el-option v-for="item in regulationCatList" :key="item.artCatId" :label="item.artCatTitle" :value="item.artCatId" />
-            </el-select>
+            <art-cat-selector v-model="formData.artCatId" :parent-id="parentId" />
           </el-form-item>
 
           <el-form-item label="内容" prop="artContent">
@@ -38,8 +37,8 @@
       </vuescroll>
 
       <div class="btn-group">
-        <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
-        <el-button class="cancel-btn" @click="dialogVisible = false">取 消</el-button>
+        <el-button class="cancel-btn" @click="dialogVisible = false">取消</el-button>
+        <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
       </div>
     </div>
 
@@ -50,9 +49,11 @@
 import vuescroll from 'vuescroll'
 import { ACTION_ADD, ACTION_UPDATE } from '@/utils/actionType'
 import FileUpload from '@/components/FileUpload/multiUpload.vue'
-import { createRegulation, getRegulationById, updateRegulation, getRegulationCatByList } from '@/api/aqpt/artRegulationApi'
+import { createArt, getArtById, updateArt } from '@/api/system/artApi'
+import ArtCatSelector from '@/components/ArtCatSelector/index.vue'
 export default {
   components: {
+    ArtCatSelector,
     FileUpload,
     vuescroll
   },
@@ -82,6 +83,7 @@ export default {
         artAuthor: '',
         attachList: []
       },
+      parentId: 1,
       // validate rules
       rules: {
         artTitle: [
@@ -101,25 +103,13 @@ export default {
   mounted() {
   },
   methods: {
-
-    // Init Regulation Category List
-    initRegulationCatData() {
-      getRegulationCatByList().then((resp) => {
-        const { data } = resp
-        this.regulationCatList = data
-      }).catch((error) => {
-        console.log(error)
-      })
-    },
-
     // Upload List Change
-    attchListChange(dataList) {
+    attachListChange(dataList) {
       this.formData.attachList = dataList
     },
 
     //  Add Model
     showAddModel(artCatId, artCatTitle) {
-      this.initRegulationCatData()
       this.resetFormData()
       this.actionType = ACTION_ADD
       this.dialogVisible = true
@@ -129,11 +119,10 @@ export default {
 
     // Edit Model
     showEditModel(artId) {
-      this.initRegulationCatData()
       this.resetFormData()
       this.actionType = ACTION_UPDATE
       this.dialogVisible = true
-      getRegulationById(artId).then((resp) => {
+      getArtById(artId).then((resp) => {
         const { data } = resp
         this.formData = data
       }).catch((error) => {
@@ -159,19 +148,19 @@ export default {
         if (valid) {
           switch (this.actionType) {
             case ACTION_ADD:
-              createRegulation(this.formData).then((resp) => {
+              createArt(this.formData).then((resp) => {
                 const { msg } = resp
                 this.dialogVisible = false
                 this.$message.success(msg)
                 this.formSuccess()
-                this.$message({ type: 'success', message: msg })
+                this.$message.success(msg)
               }).catch((error) => {
                 console.log(error)
               })
               break
 
             case ACTION_UPDATE:
-              updateRegulation(this.formData).then((resp) => {
+              updateArt(this.formData).then((resp) => {
                 const { msg } = resp
                 this.dialogVisible = false
                 this.$message.success(msg)
@@ -190,10 +179,6 @@ export default {
 
     formSuccess() {
       this.$emit('formSuccess')
-    },
-
-    resetFormField(formName) {
-      this.$refs[formName].resetFields()
     }
   }
 }
@@ -202,35 +187,35 @@ export default {
 <style lang="scss">
 </style>
 <style lang="scss" scoped>
-    .msg-component {
-        margin: 15px;
-        position: relative;
-        height: calc(100% - 15px);
-
-        .btn-group {
-            position: absolute;
-            bottom: 0;
-            left: 0;
-            width: 100%;
-
-            .el-button {
-                width: 120px;
-                margin: 0 0 15px 110px;
-            }
-
-            .cancel-btn {
-                margin-left: 30px;
-                background: #004F7B;
-                border-color: #004F7B;
-                color: #FFF;
-
-                &:hover {
-                    background: #026197;
-                    border-color: #026197;
-                }
-            }
-        }
+.content-container {
+  margin: 15px;
+  position: relative;
+  height: calc(100% - 15px);
+
+  .btn-group {
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+
+    .el-button {
+      width: 120px;
+      margin: 0 0 15px 110px;
+    }
+
+    .cancel-btn {
+      margin-left: 30px;
+      background: #004F7B;
+      border-color: #004F7B;
+      color: #FFF;
 
+      &:hover {
+        background: #026197;
+        border-color: #026197;
+      }
     }
+  }
+
+}
 
 </style>

+ 12 - 12
src/views/system/regulation/index.vue

@@ -24,11 +24,11 @@
 
         <el-table-column prop="artCatTitle" width="120" label="分类" header-align="center" align="center">
           <template v-slot="{row}">
-            <span>{{ row.artCatTitle }}</span>
+            <el-tag type="info">{{ row.artCatTitle }}</el-tag>
           </template>
         </el-table-column>
 
-        <el-table-column prop="artAuthor" width="120" label="发布人" header-align="center" align="center">
+        <el-table-column prop="artAuthor" width="120" label="发布人" header-align="center" align="center">
           <template v-slot="{row}">
             <span><i class="el-icon-user-solid" />{{ row.editorName }}</span>
           </template>
@@ -40,10 +40,10 @@
           </template>
         </el-table-column>
 
-        <el-table-column label="操作" header-align="center" align="center" width="260">
+        <el-table-column label="操作" header-align="center" align="center" width="230">
           <template v-slot="scope">
             <el-button size="mini" type="primary" icon="el-icon-view" @click="handleView(scope.row)">详情</el-button>
-            <el-button size="mini" type="info" icon="el-icon-edit" @click="handleEdit(scope.row)">修改</el-button>
+            <el-button size="mini" type="warning" icon="el-icon-edit" @click="handleEdit(scope.row)">修改</el-button>
             <el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
           </template>
         </el-table-column>
@@ -56,16 +56,16 @@
 
     <regulation ref="AddRegulation" title="新增制度" @formSuccess="getData" />
     <regulation ref="EditRegulation" title="编辑制度" @formSuccess="getData" />
-    <view-regulation ref="ViewRegulation" title="制度内容" />
+    <regulation-detail ref="RegulationDetail" title="制度内容" />
 
   </div>
 </template>
 
 <script>
-import Regulation from './regulation'
-import ViewRegulation from './view'
+import Regulation from './components/Regulation.vue'
+import RegulationDetail from './components/Detail.vue'
 
-import { getRegulationByPage, deleteRegulationById } from '@/api/aqpt/artRegulationApi'
+import { getArtByPage, deleteArtById } from '@/api/system/artApi'
 import Pagination from '@/components/Pagination'
 
 export default {
@@ -73,7 +73,7 @@ export default {
   components: {
     Pagination,
     Regulation,
-    ViewRegulation
+    RegulationDetail
   },
   props: {},
   data() {
@@ -100,7 +100,7 @@ export default {
     },
     getData() {
       this.listLoading = true
-      getRegulationByPage(this.conditions).then((resp) => {
+      getArtByPage(this.conditions).then((resp) => {
         const { data, total } = resp
         this.listLoading = false
         this.total = total
@@ -123,7 +123,7 @@ export default {
     // 查看
     handleView(data) {
       const { artId } = data
-      this.$refs['ViewRegulation'].showInfoModel(artId)
+      this.$refs['RegulationDetail'].showModel(artId)
     },
     // 删除
     handleDelete(data) {
@@ -133,7 +133,7 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        deleteRegulationById(artId).then((resp) => {
+        deleteArtById(artId).then((resp) => {
           const { msg } = resp
           this.getData()
           this.$message.success(msg)