chenying 4 жил өмнө
parent
commit
77e3ed5712

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 183 - 168
package-lock.json


+ 2 - 2
package.json

@@ -24,9 +24,7 @@
     "gulp-replace": "0.6.1",
     "gulp-shell": "0.6.5",
     "lodash": "4.17.5",
-    "node-sass": "4.13.1",
     "npm": "^6.9.0",
-    "sass-loader": "6.0.6",
     "svg-sprite-loader": "3.7.3",
     "vue": "2.5.16",
     "vue-cookie": "1.1.4",
@@ -68,12 +66,14 @@
     "jest-serializer-vue": "0.3.0",
     "nightwatch": "0.9.12",
     "node-notifier": "5.1.2",
+    "node-sass": "^4.13.1",
     "optimize-css-assets-webpack-plugin": "3.2.0",
     "ora": "1.2.0",
     "portfinder": "1.0.13",
     "postcss-import": "11.0.0",
     "postcss-loader": "2.0.8",
     "rimraf": "2.6.0",
+    "sass-loader": "^6.0.6",
     "selenium-server": "3.0.1",
     "semver": "5.3.0",
     "shelljs": "0.7.6",

+ 117 - 0
src/views/modules/process/process.vue

@@ -0,0 +1,117 @@
+<template>
+  <div class="mod-menu">
+    <div class="my-menu">
+      <div class="menu-head">流程类别</div>
+      <div v-for="(item, index) in menuList" :key="index" :class="{'menu-item': true, 'menu-active': active === index}">订单流程</div>
+    </div>
+    <div class="my-process">
+      <el-steps :active="process.length" align-center>
+        <el-step v-for="item in process" :key="item.num" :title="item.name" description="可以写流程备注"></el-step>
+      </el-steps>
+    </div>
+    <!-- 弹窗, 新增 / 修改 -->
+    <!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> -->
+  </div>
+</template>
+
+<script>
+  // import AddOrUpdate from './menu-add-or-update'
+  export default {
+    data () {
+      return {
+        dataForm: {},
+        active: 0,
+        menuList: ['订单流程', '采购流程'],
+        process: [{name: '开始', num: 0}, { name: '发起申请', num: 1 }, { name: '结束', num: 2 }],
+        addOrUpdateVisible: false
+      }
+    },
+    // components: {
+    //   AddOrUpdate
+    // },
+    activated () {
+      this.getDataList()
+    },
+    methods: {
+      // 获取数据列表
+      getDataList () {
+        this.dataListLoading = true
+        this.$http({
+          url: this.$http.adornUrl('/user-service/menu/tree'),
+          method: 'get',
+          params: this.$http.adornParams()
+        }).then(({data}) => {
+          if (data.code === '200') {
+            this.dataList = JSON.parse(JSON.stringify(data.data).replace(/"list":/g, '"children":').replace(/"children":null/g, '"children":[]'))
+            console.log(this.dataList)
+          }
+          this.dataListLoading = false
+        })
+      },
+      // 新增 / 修改
+      addOrUpdateHandle (id) {
+        this.addOrUpdateVisible = true
+        this.$nextTick(() => {
+          this.$refs.addOrUpdate.init(id)
+        })
+      },
+      // 删除
+      deleteHandle (id) {
+        this.$confirm(`确定对[id=${id}]进行[删除]操作?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$http({
+            url: this.$http.adornUrl(`/user-service/menu/delete?menuId=${id}`),
+            method: 'DELETE',
+            data: this.$http.adornData()
+          }).then(({data}) => {
+            if (data && data.code === '200') {
+              this.$message({
+                message: '操作成功',
+                type: 'success',
+                duration: 1500,
+                onClose: () => {
+                  this.getDataList()
+                }
+              })
+            } else {
+              this.$message.error(data.msg)
+            }
+          })
+        }).catch(() => {})
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+.my-menu{
+  width: 200px;
+  position: absolute;
+  .menu-head{
+    background-color: #17B3A3;
+    color: #fff;
+    font-size: 20px;
+    line-height: 40px;
+    padding-left: 10px;
+    margin-bottom: 10px;
+  }
+  .menu-item{
+    padding-left: 10px;
+    line-height: 30px;
+    font-size: 14px;
+    &:hover{
+      background-color: #efefef;
+      cursor: pointer;
+    }
+  }
+  .menu-active{
+    color: #fff;
+    background-color: #17B3A3;
+  }
+}
+.my-process{
+  padding-left: 210px;
+}
+</style>

+ 55 - 28
src/views/modules/sys/role-add-or-update.vue

@@ -34,27 +34,31 @@
         </el-popover>
         <el-input v-model="dataForm.orgName" v-popover:menuListPopover :readonly="true" placeholder="点击选择所属机构" class="menu-list__input"></el-input>
       </el-form-item>
-      <el-form-item size="mini" label="授权">
-        <el-tree
-          :data="menuList"
-          :props="menuListTreeProps"
-          node-key="menuId"
-          ref="menuListTree"
-          :default-expand-all="true"
-          show-checkbox>
-        </el-tree>
-      </el-form-item>
-      <el-form-item size="mini" label="数据权限">
-        <el-tree
-          :data="orgList"
-          :props="orgListTreeProps"
-          node-key="orgId"
-          ref="orgListDatta"
-          :default-expand-all="true"
-          :highlight-current="true"
-          show-checkbox>
-        </el-tree>
-      </el-form-item>
+      <div class="myitem">
+        <el-form-item size="mini" label="授权">
+          <el-tree
+            :data="menuList"
+            :props="menuListTreeProps"
+            node-key="menuId"
+            ref="menuListTree"
+            :default-expand-all="true"
+            show-checkbox>
+          </el-tree>
+        </el-form-item>
+      </div>
+      <div class="myitem">
+        <el-form-item size="mini" label="数据权限">
+          <el-tree
+            :data="orgList"
+            :props="orgListTreeProps"
+            node-key="orgId"
+            ref="orgListDatta"
+            :default-expand-all="true"
+            :highlight-current="true"
+            show-checkbox>
+          </el-tree>
+        </el-form-item>
+      </div>
     </el-form>
     <span slot="footer" class="dialog-footer">
       <el-button @click="visible = false">取消</el-button>
@@ -138,12 +142,26 @@
                 // this.dataForm.isCommon = data.data.isCommon
                 this.dataForm.orgId = data.data.orgId
                 this.menuListTreeSetCurrentNode()
-                var idx = data.data.menuIdList.indexOf(this.tempKey)
-                if (idx !== -1) {
-                  data.data.menuIdList.splice(idx, data.data.menuIdList.length - idx)
+                // var idx = data.data.menuIdList.indexOf(this.tempKey)
+                // if (idx !== -1) {
+                //   data.data.menuIdList.splice(idx, data.data.menuIdList.length - idx)
+                // }
+                if (data.data.menuIdList) {
+                  data.data.menuIdList.forEach(i => {
+                    const node = this.$refs.menuListTree.getNode(i)
+                    if (node.isLeaf) {
+                      this.$refs.menuListTree.setChecked(node, true)
+                    }
+                  })
+                }
+                if (data.data.orgIdList) {
+                  data.data.orgIdList.forEach(i => {
+                    const node = this.$refs.orgListDatta.getNode(i)
+                    if (node.isLeaf) {
+                      this.$refs.orgListDatta.setChecked(node, true)
+                    }
+                  })
                 }
-                this.$refs.menuListTree.setCheckedKeys(data.data.menuIdList)
-                this.$refs.orgListDatta.setCheckedKeys(data.data.orgIdList)
               }
             })
           }
@@ -174,8 +192,8 @@
                 'remark': this.dataForm.remark,
                 'isCommon': this.dataForm.isCommon,
                 'orgId': this.dataForm.orgId,
-                'menuIdList': [].concat(this.$refs.menuListTree.getCheckedKeys()),
-                'orgIdList': [].concat(this.$refs.orgListDatta.getCheckedKeys())
+                'menuIdList': [].concat(this.$refs.menuListTree.getCheckedKeys(), this.$refs.menuListTree.getHalfCheckedKeys()),
+                'orgIdList': [].concat(this.$refs.orgListDatta.getCheckedKeys(), this.$refs.orgListDatta.getHalfCheckedKeys())
               })
             }).then(({data}) => {
               if (data && data.code === '200') {
@@ -198,3 +216,12 @@
     }
   }
 </script>
+
+<style lang="scss" scoped>
+.myitem{
+  width: 49%;
+  overflow: auto;
+  display: inline-block;
+  vertical-align: top;
+}
+</style>

+ 1 - 1
static/config/index-prod.js

@@ -5,7 +5,7 @@
   window.SITE_CONFIG = {};
 
   // api接口请求地址
-  window.SITE_CONFIG['baseUrl'] = '';
+  window.SITE_CONFIG['baseUrl'] = '/dist';
 
   // cdn地址 = 域名 + 版本号
   window.SITE_CONFIG['domain']  = './'; // 域名

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно