Browse Source

页面更新

sr 4 years ago
parent
commit
8a226b8972

+ 21 - 1
ruoyi-ui/src/api/modeler.js

@@ -1,5 +1,25 @@
 import request from '@/utils/request'
 
+export const getTabList = (data) => {
+  return request({
+    headers: {
+      'accountName': 'guest'
+    },
+    url: '/jflow/p/c/meta/table/list',
+    method: 'post',
+    data
+  })
+}
+export const getColumnList = (data) => {
+  return request({
+    headers: {
+      'accountName': 'guest'
+    },
+    url: '/jflow/p/c/meta/column/list',
+    method: 'post',
+    data
+  })
+}
 // 流程模型列表
 export const getSearch = (data) => {
   return request({
@@ -93,4 +113,4 @@ export const getPublish = (data) => {
     method: 'post',
     data
   })
-}
+}

+ 3 - 3
ruoyi-ui/src/api/system/menu.js

@@ -35,14 +35,14 @@ export function roleMenuTreeselect(roleId) {
 // 根据角色ID查询菜单下拉树结构
 export function treeMenuNotAddLeafNode(roleId) {
   return request({
-    url: '/system/menu/treeMenuNotAddLeafNode/' + roleId,
+    url: '/system/menu/listTreeByRoleId/' + roleId,
     method: 'get'
   })
 }
 // 获取权限
-export function listMenus(id) {
+export function listMenus(id,menuId) {
   return request({
-    url: '/system/menu/listMenus/' + id,
+    url: '/system/menu/listMenus/roleId/' + menuId+'/menuId/'+id,
     method: 'get'
   })
 }

+ 1 - 1
ruoyi-ui/src/components/FlowChartComponent/index.vue

@@ -519,7 +519,7 @@ export default {
   }
 }
 </script>
-<style lang=scss" >
+<style lang="scss" >
 .FlowChartComponent{
   width: 100%;
   height: 100%;

+ 1 - 1
ruoyi-ui/src/components/FlowSuccess/index.vue

@@ -11,7 +11,7 @@ export default {
 
 }
 </script>
-<style lang=scss" scoped>
+<style lang="scss" scoped>
   .FlowSuccess{
     display: flex;
     flex-direction: column;

+ 5 - 4
ruoyi-ui/src/components/FormItemComponent/index.vue

@@ -28,7 +28,7 @@
 </template>
 <script>
 import Vue from "vue";
-import layoutAlgorithm from "../../utils/layoutAlgorithm.js";
+import layoutAlgorithm from "@/utils/layoutAlgorithm.js";
 export default {
   name: "FormItemComponent",
   props: {
@@ -57,12 +57,14 @@ export default {
     // 通过layoutAlgorithm算法得到对应的位置坐标
     dataColRol() {
       const list = layoutAlgorithm(this.defaultColumn, this.currentFormList);
-      return Object.keys(list).reduce((temp, current) => {
+      let obj = Object.keys(list).reduce((temp, current) => {
         // 计算显示行数
         list[current].component = Vue.extend(list[current].component);
         temp.push(list[current]);
         return temp;
       }, []);
+      console.log(obj,98882123)
+      return obj
     },
     // 计算属性的 div 的坐标起始点
     setDiv() {
@@ -92,7 +94,7 @@ export default {
   },
   created() {
     this.currentFormList = this.formItemLists.concat([]);
-    console.log(this.formItemLists,999999999)
+    console.log(this.currentFormList,999999999)
   },
   methods: {
     inputChange(value, items, type) {
@@ -146,4 +148,3 @@ export default {
   grid-auto-rows: minmax(auto);
 }
 </style>
-

+ 373 - 369
ruoyi-ui/src/components/ParameterConfiguration/index.vue

@@ -1,44 +1,42 @@
 //参数配置界面
 <template>
   <div class="ParameterConfiguration">
-    <FormItemComponent
-      class="form"
-      :formItemLists="formLists"
-      :buttonType="false"
-      :defaultColumn="1"
-      @formChange="formChange"
-    ></FormItemComponent>
+    <FormItemComponent class="form" :formItemLists="formLists" :buttonType="false" :defaultColumn="1" @formChange="formChange"></FormItemComponent>
   </div>
 </template>
 <script>
-import FormItemComponent from '@/components/FormItemComponent';
-import ItemComponent from '@/components/ItemComponent';
-export default {
-  components:{FormItemComponent},
-  props:{
-    data:{
-      type:Object
-    }
-  },
-  watch:{
-    data:{
-      handler () {
-        this.formLists = [
-            {
-              row:1,
-              col:1,
-              component:ItemComponent,
-              item:{
-                type:'select',
-                title:'模版类型',
-                filed:'moduleType',
-                value:this.data.moduleType,
-                props:{
-                  disabled:this.disabled,
+  import FormItemComponent from '@/components/FormItemComponent';
+  import ItemComponent from '@/components/ItemComponent';
+  import {
+    getColumnList,
+    getTabList
+  } from '@/api/modeler.js'
+  export default {
+    components: {
+      FormItemComponent
+    },
+    props: {
+      data: {
+        type: Object
+      }
+    },
+    watch: {
+      data: {
+        handler() {
+          this.formLists = [{
+              row: 1,
+              col: 1,
+              component: ItemComponent,
+              item: {
+                type: 'select',
+                title: '模版类型',
+                filed: 'moduleType',
+                value: this.data.moduleType,
+                props: {
+                  disabled: this.disabled,
                   clearable: false,
                 },
-                options:[
-                  {
+                options: [{
                     value: 0,
                     label: '固定模版'
                   },
@@ -50,28 +48,28 @@ export default {
               }
             },
             {
-              row:1,
-              col:1,
-              component:ItemComponent,
-              item:{
-                type:'DropDownSelectFilter',
-                title:'单据类型',
-                filed:'businessType',
-                required:true,
+              row: 1,
+              col: 1,
+              component: ItemComponent,
+              item: {
+                type: 'DropDownSelectFilter',
+                title: '单据类型',
+                filed: 'businessType',
+                required: true,
                 hidden: this.data.moduleType === 1,
-                props:{
-                  columnsKey:['NAME'],
-                  AutoData:[],
-                  hidecolumns:['id'],
-                  data:{},
-                  totalRowCount:0,
-                  defaultSelected:this.data.businessType,
-                  disabled:this.disabled
+                props: {
+                  columnsKey: ['NAME'],
+                  AutoData: [],
+                  hidecolumns: ['id'],
+                  data: {},
+                  totalRowCount: 0,
+                  defaultSelected: this.data.businessType,
+                  disabled: this.disabled
                 },
-                event:{
+                event: {
                   inputValueChange: (value) => {
-                      // 外键的模糊搜索
-                      this.fkFuzzyquerybyak(value)
+                    // 外键的模糊搜索
+                    this.fkFuzzyquerybyak(value)
                   },
                   'on-show': ($this) => {
                     // 当外键下拉站开始去请求数据
@@ -79,10 +77,11 @@ export default {
                   },
                   pageChange: (currentPage, $this) => {
                     // 外键的分页查询
-                    this.freshDropDownSelectFilterData($this,currentPage)
+                    this.freshDropDownSelectFilterData($this, currentPage)
                   },
-                  blur:(event,instance) => {
-                    if(Object.prototype.toString.call(this.data.businessType) !== '[object Array]' || this.data.businessType.length === 0){
+                  blur: (event, instance) => {
+                    if (Object.prototype.toString.call(this.data.businessType) !== '[object Array]' || this.data.businessType
+                      .length === 0) {
                       this.data.businessType = []
                       instance.inputValue = ''
                     }
@@ -92,58 +91,58 @@ export default {
               }
             },
             {
-              row:1,
-              col:1,
-              component:ItemComponent,
-              item:{
-                type:'input',
-                title:'模版名称',
-                filed:'name',
-                required:true,
-                value:this.data.name,
-                props:{
+              row: 1,
+              col: 1,
+              component: ItemComponent,
+              item: {
+                type: 'input',
+                title: '模版名称',
+                filed: 'name',
+                required: true,
+                value: this.data.name,
+                props: {
                   // disabled:this.data.status === 1
                 }
               }
             },
             {
-              row:1,
-              col:1,
-              component:ItemComponent,
-              item:{
-                type:'DropDownSelectFilter',
-                title:'查询索引',
-                filed:'businessNumber',
+              row: 1,
+              col: 1,
+              component: ItemComponent,
+              item: {
+                type: 'DropDownSelectFilter',
+                title: '查询索引',
+                filed: 'businessNumber',
                 hidden: this.data.moduleType === 1,
-                props:{
-                  columnsKey:['NAME'],
-                  AutoData:[],
-                  hidecolumns:['id'],
-                  data:{},
-                  totalRowCount:0,
-                  defaultSelected:this.data.businessNumber,
+                props: {
+                  columnsKey: ['NAME'],
+                  AutoData: [],
+                  hidecolumns: ['id'],
+                  data: {},
+                  totalRowCount: 0,
+                  defaultSelected: this.data.businessNumber,
                   // disabled:this.data.status === 1
                 },
-                event:{
-                  inputValueChange: (value,instance) => {
-                      if(!this.data.businessType || this.data.businessType.lengt == 0 || !this.data.businessType[0].ID){
-                        this.$Modal.fcWarning({
-                          title:'警告',
-                          content:'请先选择单据类型!'
-                        })
-                        this.data.businessNumber = []
-                        instance.inputValue = ''
-                        return
-                      }
-                      // 外键的模糊搜索
-                      this.fkFuzzyquerybyakcolumn(value)
+                event: {
+                  inputValueChange: (value, instance) => {
+                    if (!this.data.businessType || this.data.businessType.lengt == 0 || !this.data.businessType[0].ID) {
+                      this.$Modal.fcWarning({
+                        title: '警告',
+                        content: '请先选择单据类型!'
+                      })
+                      this.data.businessNumber = []
+                      instance.inputValue = ''
+                      return
+                    }
+                    // 外键的模糊搜索
+                    this.fkFuzzyquerybyakcolumn(value)
                   },
                   'on-show': ($this) => {
                     // 当外键下拉站开始去请求数据
-                    if(!this.data.businessType || this.data.businessType.lengt == 0 || !this.data.businessType[0].ID){
+                    if (!this.data.businessType || this.data.businessType.lengt == 0 || !this.data.businessType[0].ID) {
                       this.$Modal.fcWarning({
-                        title:'警告',
-                        content:'请先选择单据类型!'
+                        title: '警告',
+                        content: '请先选择单据类型!'
                       })
                       this.data.businessNumber = []
                       $this.inputValue = ''
@@ -153,10 +152,11 @@ export default {
                   },
                   pageChange: (currentPage, $this) => {
                     // 外键的分页查询
-                    this.freshDropDownSelectFilterDataColumn($this,currentPage)
+                    this.freshDropDownSelectFilterDataColumn($this, currentPage)
                   },
-                  blur:(event,instance) => {
-                    if(Object.prototype.toString.call(this.data.businessNumber) !== '[object Array]' || this.data.businessNumber.length === 0){
+                  blur: (event, instance) => {
+                    if (Object.prototype.toString.call(this.data.businessNumber) !== '[object Array]' || this.data.businessNumber
+                      .length === 0) {
                       this.data.businessNumber = []
                       instance.inputValue = ''
                     }
@@ -166,149 +166,148 @@ export default {
               }
             },
             {
-              row:1,
-              col:1,
-              component:ItemComponent,
-              item:{
-                type:'input',
-                title:'模版描述',
-                filed:'description',
-                value:this.data.description,
-                props:{
-                  type:'textarea',
+              row: 1,
+              col: 1,
+              component: ItemComponent,
+              item: {
+                type: 'input',
+                title: '模版描述',
+                filed: 'description',
+                value: this.data.description,
+                props: {
+                  type: 'textarea',
                   // disabled:this.data.status === 1
                 }
               }
             },
             {
-              row:1,
-              col:1,
-              component:ItemComponent,
-              item:{
-                type:'Switch',
-                title:'开启自动处理',
-                filed:'autoClose',
-                value:this.data.autoClose,
+              row: 1,
+              col: 1,
+              component: ItemComponent,
+              item: {
+                type: 'Switch',
+                title: '开启自动处理',
+                filed: 'autoClose',
+                value: this.data.autoClose,
               }
             },
             {
-              row:1,
-              col:1,
-              component:ItemComponent,
-              item:{
-                type:'input',
-                title:'业务数据检查',
-                filed:'businessCheckUrl',
-                value:this.data.businessCheckUrl
+              row: 1,
+              col: 1,
+              component: ItemComponent,
+              item: {
+                type: 'input',
+                title: '业务数据检查',
+                filed: 'businessCheckUrl',
+                value: this.data.businessCheckUrl
               }
             }
           ]
-      },
-      deep:true
-    }
-  },
-  data () {
-    return {
-      formLists:[
-        {
-          row:1,
-          col:1,
-          component:ItemComponent,
-          item:{
-            type:'select',
-            title:'模版类型',
-            filed:'moduleType',
-            value: 0,
-            props:{
-              disabled:false,
-              clearable: false
-            },
-            options:[
-              {
-                value: 0,
-                label: '固定模版'
-              },
-              {
-                value: 1,
-                label: '动态模版'
-              }
-            ]
-          }
         },
-        {
-          row:1,
-          col:1,
-          component:ItemComponent,
-          item:{
-            type:'DropDownSelectFilter',
-            title:'单据类型',
-            filed:'businessType',
-            required:true,
-            hidden: this.data.moduleType === 1,
-            props:{
-              columnsKey:['NAME'],
-              AutoData:[],
-              hidecolumns:['id'],
-              data:{},
-              totalRowCount:0
-            },
-            event:{
-              inputValueChange: (value) => {
-                  // 外键的模糊搜索
-                  this.fkFuzzyquerybyak(value)
-              },
-              'on-show': ($this) => {
-                // 当外键下拉站开始去请求数据
-                this.freshDropDownSelectFilterData($this)
-              },
-              pageChange: (currentPage, $this) => {
-                // 外键的分页查询
-                this.freshDropDownSelectFilterData($this,currentPage)
+        deep: true
+      }
+    },
+    data() {
+      return {
+        formLists: [{
+            row: 1,
+            col: 1,
+            component: ItemComponent,
+            item: {
+              type: 'select',
+              title: '模版类型',
+              filed: 'moduleType',
+              value: 0,
+              props: {
+                disabled: false,
+                clearable: false
               },
-              blur:(event,instance) => {
-                if(Object.prototype.toString.call(this.data.businessType) !== '[object Array]' || this.data.businessType.length === 0){
-                  this.data.businessType = []
-                  instance.inputValue = ''
+              options: [{
+                  value: 0,
+                  label: '固定模版'
+                },
+                {
+                  value: 1,
+                  label: '动态模版'
                 }
+              ]
+            }
+          },
+          {
+            row: 1,
+            col: 1,
+            component: ItemComponent,
+            item: {
+              type: 'DropDownSelectFilter',
+              title: '单据类型',
+              filed: 'businessType',
+              required: true,
+              hidden: this.data.moduleType === 1,
+              props: {
+                columnsKey: ['NAME'],
+                AutoData: [],
+                hidecolumns: ['id'],
+                data: {},
+                totalRowCount: 0
+              },
+              event: {
+                inputValueChange: (value) => {
+                  // 外键的模糊搜索
+                  this.fkFuzzyquerybyak(value)
+                },
+                'on-show': ($this) => {
+                  // 当外键下拉站开始去请求数据
+                  this.freshDropDownSelectFilterData($this)
+                },
+                pageChange: (currentPage, $this) => {
+                  // 外键的分页查询
+                  this.freshDropDownSelectFilterData($this, currentPage)
+                },
+                blur: (event, instance) => {
+                  if (Object.prototype.toString.call(this.data.businessType) !== '[object Array]' || this.data.businessType
+                    .length === 0) {
+                    this.data.businessType = []
+                    instance.inputValue = ''
+                  }
 
+                }
               }
             }
-          }
-        },
-        {
-          row:1,
-          col:1,
-          component:ItemComponent,
-          item:{
-            type:'input',
-            title:'模版名称',
-            filed:'name',
-            required:true,
-            value:this.data.name
-          }
-        },
-        {
-          row:1,
-          col:1,
-          component:ItemComponent,
-          item:{
-            type:'DropDownSelectFilter',
-            title:'查询索引',
-            filed:'businessNumber',
-            hidden: this.data.moduleType === 1,
-            props:{
-              columnsKey:['NAME'],
-              AutoData:[],
-              hidecolumns:['id'],
-              data:{},
-              totalRowCount:0
-            },
-            event:{
-              inputValueChange: (value,instance) => {
-                  if(!this.data.businessType || this.data.businessType.lengt == 0 || !this.data.businessType[0].ID){
+          },
+          {
+            row: 1,
+            col: 1,
+            component: ItemComponent,
+            item: {
+              type: 'input',
+              title: '模版名称',
+              filed: 'name',
+              required: true,
+              value: this.data.name
+            }
+          },
+          {
+            row: 1,
+            col: 1,
+            component: ItemComponent,
+            item: {
+              type: 'DropDownSelectFilter',
+              title: '查询索引',
+              filed: 'businessNumber',
+              hidden: this.data.moduleType === 1,
+              props: {
+                columnsKey: ['NAME'],
+                AutoData: [],
+                hidecolumns: ['id'],
+                data: {},
+                totalRowCount: 0
+              },
+              event: {
+                inputValueChange: (value, instance) => {
+                  if (!this.data.businessType || this.data.businessType.lengt == 0 || !this.data.businessType[0].ID) {
                     this.$Modal.fcWarning({
-                      title:'警告',
-                      content:'请先选择单据类型!'
+                      title: '警告',
+                      content: '请先选择单据类型!'
                     })
                     this.data.businessNumber = []
                     instance.inputValue = ''
@@ -316,128 +315,131 @@ export default {
                   }
                   // 外键的模糊搜索
                   this.fkFuzzyquerybyakcolumn(value)
-              },
-              'on-show': ($this) => {
-                // 当外键下拉站开始去请求数据
-                if(!this.data.businessType || this.data.businessType.lengt == 0 || !this.data.businessType[0].ID){
-                  this.$Modal.fcWarning({
-                    title:'警告',
-                    content:'请先选择单据类型!'
-                  })
-                  this.data.businessNumber = []
-                  $this.inputValue = ''
-                  return
-                }
-                this.freshDropDownSelectFilterDataColumn($this)
-              },
-              pageChange: (currentPage, $this) => {
-                // 外键的分页查询
-                this.freshDropDownSelectFilterDataColumn($this,currentPage)
-              },
-              blur:(event,instance) => {
+                },
+                'on-show': ($this) => {
+                  // 当外键下拉站开始去请求数据
+                  if (!this.data.businessType || this.data.businessType.lengt == 0 || !this.data.businessType[0].ID) {
+                    this.$Modal.fcWarning({
+                      title: '警告',
+                      content: '请先选择单据类型!'
+                    })
+                    this.data.businessNumber = []
+                    $this.inputValue = ''
+                    return
+                  }
+                  this.freshDropDownSelectFilterDataColumn($this)
+                },
+                pageChange: (currentPage, $this) => {
+                  // 外键的分页查询
+                  this.freshDropDownSelectFilterDataColumn($this, currentPage)
+                },
+                blur: (event, instance) => {
 
-                if(Object.prototype.toString.call(this.data.businessNumber) !== '[object Array]' || this.data.businessNumber.length === 0){
-                  this.data.businessNumber = []
-                  instance.inputValue = ''
-                }
+                  if (Object.prototype.toString.call(this.data.businessNumber) !== '[object Array]' || this.data.businessNumber
+                    .length === 0) {
+                    this.data.businessNumber = []
+                    instance.inputValue = ''
+                  }
 
+                }
               }
             }
-          }
-        },
-        {
-          row:1,
-          col:1,
-          component:ItemComponent,
-          item:{
-            type:'input',
-            title:'模版描述',
-            filed:'description',
-            value:this.data.description,
-            props:{
-              type:'textarea',
+          },
+          {
+            row: 1,
+            col: 1,
+            component: ItemComponent,
+            item: {
+              type: 'input',
+              title: '模版描述',
+              filed: 'description',
+              value: this.data.description,
+              props: {
+                type: 'textarea',
+              }
+            }
+          },
+          {
+            row: 1,
+            col: 1,
+            component: ItemComponent,
+            item: {
+              type: 'Switch',
+              title: '开启自动处理',
+              filed: 'autoClose',
+              value: true,
+            }
+          },
+          {
+            row: 1,
+            col: 1,
+            component: ItemComponent,
+            item: {
+              type: 'input',
+              title: '业务数据检查',
+              filed: 'businessCheckUrl',
+              value: this.data.businessCheckUrl
             }
           }
-        },
-        {
-          row:1,
-          col:1,
-          component:ItemComponent,
-          item:{
-            type:'Switch',
-            title:'开启自动处理',
-            filed:'autoClose',
-            value:true,
-          }
-        },
-        {
-          row:1,
-          col:1,
-          component:ItemComponent,
-          item:{
-            type:'input',
-            title:'业务数据检查',
-            filed:'businessCheckUrl',
-            value:this.data.businessCheckUrl
-          }
-        }
-      ],
-      formData:{},
-      row:[],
-      disabled: false
-    }
-  },
-  methods:{
-    formChange (data) {  //数据修改
-      if(data.businessType && data.businessType.length > 0){
-        this.row.map(item => {
-          if(item.ID.val === data.businessType[0].ID){
-            data.businessType[0].val = item.DESCRIPTION.val
-            data.businessType[0].Label = item.NAME.val
-          }
-          return item
-        })
-      }
-
-      if(data.businessNumber && data.businessNumber.length > 0){
-        this.row.map(item => {
-          if(item.ID.val === data.businessNumber[0].ID){
-            data.businessNumber[0].val = item.DESCRIPTION.val
-            data.businessNumber[0].Label = item.NAME.val
-          }
-          return item
-        })
+        ],
+        formData: {},
+        row: [],
+        disabled: false
       }
-
-      this.formData = Object.assign(this.formData,data)
-      this.$emit('dataChange',this.formData)
     },
-    fkFuzzyquerybyak (value) {  //单据类型模糊搜素
-      this.formLists[1].item.props.AutoData = []
-      this.$network.post('/p/c/meta/table/list',{DESCRIPTION:value}).then(res => {
-        if(res.data.code === 0){
-          this.row = res.data.data.row.concat([])
-          this.formLists[1].item.props.AutoData = res.data.data.row.reduce((arr,item) => {
-            arr.push({
-              value:item.NAME.val,
-              id:item.ID.val,
-              NAME:item.DESCRIPTION.val
-            })
-            return arr
-          },[]);
+    methods: {
+      formChange(data) { //数据修改
+        if (data.businessType && data.businessType.length > 0) {
+          this.row.map(item => {
+            if (item.ID.val === data.businessType[0].ID) {
+              data.businessType[0].val = item.DESCRIPTION.val
+              data.businessType[0].Label = item.NAME.val
+            }
+            return item
+          })
         }
 
-      })
-    },
-    freshDropDownSelectFilterData (instance,currentPage) {  //外键列表查询
-        this.$network.post('/p/c/meta/table/list',{
-          pageSize:instance.pageSize,
-          page:currentPage?currentPage:1
+        if (data.businessNumber && data.businessNumber.length > 0) {
+          this.row.map(item => {
+            if (item.ID.val === data.businessNumber[0].ID) {
+              data.businessNumber[0].val = item.DESCRIPTION.val
+              data.businessNumber[0].Label = item.NAME.val
+            }
+            return item
+          })
+        }
+
+        this.formData = Object.assign(this.formData, data)
+        this.$emit('dataChange', this.formData)
+      },
+      fkFuzzyquerybyak(value) { //单据类型模糊搜素
+        this.formLists[1].item.props.AutoData = []
+        getTabList({
+          DESCRIPTION: value
         }).then(res => {
-          if(res.data.code === 0){
+          if (res.data.code === 0) {
+            this.row = res.data.data.row.concat([])
+            this.formLists[1].item.props.AutoData = res.data.data.row.reduce((arr, item) => {
+              arr.push({
+                value: item.NAME.val,
+                id: item.ID.val,
+                NAME: item.DESCRIPTION.val
+              })
+              return arr
+            }, []);
+          }
+
+        })
+      },
+      freshDropDownSelectFilterData(instance, currentPage) { //外键列表查询
+        getTabList({
+          pageSize: instance.pageSize,
+          page: currentPage ? currentPage : 1
+        }).then(res => {
+          if (res.data.code === 0) {
             this.row = res.data.data.row.concat([])
             res.data.data.tabth.forEach(item => {
-              if(item.colname === 'DESCRIPTION'){
+              if (item.colname === 'DESCRIPTION') {
                 item.isak = true
               }
               return item
@@ -451,35 +453,37 @@ export default {
           }
 
         })
-    },
-    fkFuzzyquerybyakcolumn (value) {  //单据类型模糊搜素
-      this.formLists[3].item.props.AutoData = []
-      this.$network.post('/p/c/meta/column/list',{ DESCRIPTION: value, AD_TABLE_ID: this.data.businessType[0].ID}).then(res => {
-        if(res.data.code === 0){
-          this.row = res.data.data.row.concat([])
-          this.formLists[3].item.props.AutoData = res.data.data.row.reduce((arr,item) => {
-            arr.push({
-              value:item.NAME.val,
-              id:item.ID.val,
-              NAME:item.DESCRIPTION.val
-            })
-            return arr
-          },[]);
-        }
-
-      })
-    },
-    freshDropDownSelectFilterDataColumn (instance,currentPage) {  //外键列表查询
+      },
+      fkFuzzyquerybyakcolumn(value) { //单据类型模糊搜素
+        this.formLists[3].item.props.AutoData = []
+        getColumnList({
+          DESCRIPTION: value,
+          AD_TABLE_ID: this.data.businessType[0].ID
+        }).then(res => {
+          if (res.data.code === 0) {
+            this.row = res.data.data.row.concat([])
+            this.formLists[3].item.props.AutoData = res.data.data.row.reduce((arr, item) => {
+              arr.push({
+                value: item.NAME.val,
+                id: item.ID.val,
+                NAME: item.DESCRIPTION.val
+              })
+              return arr
+            }, []);
+          }
 
-        this.$network.post('/p/c/meta/column/list',{
-          pageSize:instance.pageSize,
-          page:currentPage?currentPage:1,
+        })
+      },
+      freshDropDownSelectFilterDataColumn(instance, currentPage) { //外键列表查询
+        getColumnList({
+          pageSize: instance.pageSize,
+          page: currentPage ? currentPage : 1,
           AD_TABLE_ID: this.data.businessType[0].ID
         }).then(res => {
-          if(res.data.code === 0){
+          if (res.data.code === 0) {
             this.row = res.data.data.row.concat([])
             res.data.data.tabth.forEach(item => {
-              if(item.colname === 'DESCRIPTION'){
+              if (item.colname === 'DESCRIPTION') {
                 item.isak = true
               }
               return item
@@ -493,22 +497,22 @@ export default {
           }
 
         })
+      }
+    },
+    created() {
+      this.$route.params.id !== '-1' ? this.disabled = true : this.disabled = false
     }
-  },
-  created () {
-    this.$route.params.id !== '-1'?this.disabled = true:this.disabled = false
   }
-}
 </script>
-<style lang=scss" scoped>
-.ParameterConfiguration{
-  padding-top:50px;
-  display: flex;
-  justify-content:center;
+<style lang="scss" scoped>
+  .ParameterConfiguration {
+    padding-top: 50px;
+    display: flex;
+    justify-content: center;
 
-  .form{
-    border: none;
-    width: 420px;
+    .form {
+      border: none;
+      width: 420px;
+    }
   }
-}
 </style>

+ 4 - 3
ruoyi-ui/src/views/activiti/TemplateManagementNew/index.vue

@@ -476,14 +476,15 @@ export default {
   created () {
     Vue.component(`component_${this.currentSteps}`,Vue.extend(Object.assign({isKeepAliveModel:true},ParameterConfiguration)))
     this.currentComponent = `component_${this.currentSteps}`
+    console.log(this.$route.params.id,99998)
     if(this.$route.params.flag === '1'){
       this.readOnly = true
       this.noFreshFlag = true
       this.getModuleInfo(this.$route.params.id)
       return
     }
-    if(this.$route.params.id === '-1'){  //新增
-
+    if(this.$route.params.id === undefined){  //新增
+      console.log(22233)
     }else{  //编辑
       this.noFreshFlag = true
       this.currentSteps = 1
@@ -495,7 +496,7 @@ export default {
   }
 }
 </script>
-<style lang=scss" >
+<style lang="scss" >
 .TemplateManagementNew{
   padding:16px;
   background: white;

+ 113 - 109
ruoyi-ui/src/views/system/role/fz-index.vue

@@ -33,11 +33,13 @@
           </div>
         </div>
         <div class="searList">
-          <div class="searItem searItemLeft" element-loading-text="拼命加载中" v-loading.fullscreen.lock="fullscreenLoading" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.4)" v-for="item in roleList" @click="searBtnFn(item)" :class="{'active': item.id == roleId}" :key="item.id">
-            <span>
-              {{item.roleName}}
-            </span>
-            <i class="el-icon-delete" @click.stop="handleDelete(item)" v-if="item.id == roleId"></i>
+          <div class="searItem searItemLeft" element-loading-text="拼命加载中" v-loading.fullscreen.lock="fullscreenLoading"
+            element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.4)" v-for="item in roleList"
+            @click="searBtnFn(item)" :class="{'active': item.id == roleId}" :key="item.id">
+            <span>
+              {{item.roleName}}
+            </span>
+            <i class="el-icon-delete" @click.stop="handleDelete(item)" v-if="item.id == roleId"></i>
           </div>
         </div>
         <pagination sty v-show="total>0" :total="total" layout="prev, pager, next" :page.sync="queryParams.pageNum"
@@ -47,7 +49,8 @@
         <div class="roleContrBox">
           <el-col :span="7">
             <div class="searContLeft">
-              <el-tree class="tree-border" @node-click="qxList" :data="deptOptions" default-expand-all ref="dept" node-key="id" :props="defaultProps"></el-tree>
+              <el-tree class="tree-border" @node-click="qxList" :data="deptOptions"
+                default-expand-all ref="dept" node-key="id" :props="defaultProps"></el-tree>
             </div>
           </el-col>
           <el-col :span="17">
@@ -60,41 +63,42 @@
                   {{item.name}}
                 </div>
               </div>
-              <div class="searCont" v-if="menusList.sysMenus.length" v-for="items in menusList.sysMenus" @click="searIndex = items.id" :class="{'active': searIndex == items.id}" :key="items.id">
+              <div class="searCont" v-if="menusList.sysMenus.length" v-for="items in menusList.sysMenus" @click="searIndex = items.id"
+                :class="{'active': searIndex == items.id}" :key="items.id">
                 <div class="searName">
                   {{items.menuName}}
                 </div>
-                <div class="searItem" v-for="(itemChild,indexChild) in items.containsHead" :key="indexChild">
-                  <el-checkbox @change="checkChange" :disabled="itemChild.type==='0'" v-model="itemChild.type"></el-checkbox>
+                <div class="searItem" v-for="(itemChild,indexChild) in items.containsHead" :key="indexChild">
+                  <el-checkbox @change="checkChange" :disabled="itemChild.type==='0'" v-model="itemChild.type"></el-checkbox>
                 </div>
               </div>
             </div>
           </el-col>
         </div>
       </el-col>
-    </el-row>
-
-
-    <!-- 添加或修改角色配置对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="角色名称" prop="roleName">
-          <el-input v-model="form.roleName" placeholder="请输入角色名称" />
-        </el-form-item>
-        <el-form-item label="权限字符" prop="roleKey">
-          <el-input v-model="form.roleKey" placeholder="请输入权限字符" />
-        </el-form-item>
-        <el-form-item label="角色顺序" prop="roleSort">
-          <el-input-number v-model="form.roleSort" controls-position="right" :min="0" />
-        </el-form-item>
-        <el-form-item label="备注">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
+    </el-row>
+
+
+    <!-- 添加或修改角色配置对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="角色名称" prop="roleName">
+          <el-input v-model="form.roleName" placeholder="请输入角色名称" />
+        </el-form-item>
+        <el-form-item label="权限字符" prop="roleKey">
+          <el-input v-model="form.roleKey" placeholder="请输入权限字符" />
+        </el-form-item>
+        <el-form-item label="角色顺序" prop="roleSort">
+          <el-input-number v-model="form.roleSort" controls-position="right" :min="0" />
+        </el-form-item>
+        <el-form-item label="备注">
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
     </el-dialog>
   </div>
 </template>
@@ -107,12 +111,12 @@
     addRole,
     updateRole,
     exportRole,
-    dataScope,
-    setMenu,
+    dataScope,
+    setMenu,
     changeRoleStatus
   } from "@/api/system/role";
   import {
-    treeselect as menuTreeselect,
+    treeselect as menuTreeselect,
     listMenus,
     treeMenuNotAddLeafNode
   } from "@/api/system/menu";
@@ -122,19 +126,19 @@
   } from "@/api/system/dept";
 
   export default {
-    name: "Role",
+    name: "Role",
     inject: ['reload'],
     data() {
-      return {
-        modifyStatus: false,
+      return {
+        modifyStatus: false,
         fullscreenLoading: false,
         searIndex: '',
         data: [],
         defaultProps: {
           children: 'children',
-          label: 'label'
+          label: 'menuName'
         },
-        indexs: 3,
+        indexs: 3,
         menusList: '',
         // 遮罩层
         loading: true,
@@ -227,61 +231,60 @@
         this.statusOptions = response.data;
       });
     },
-    methods: {
-      checkChange() {
-        this.modifyStatus = true
-      },
-      handleMenu() {
-        if(!this.modifyStatus){
-          this.msgInfo('没有修改的内容!')
-          return
-        }
-        let data = []
-        for(let item of this.menusList.sysMenus){
-          let obj = {}
-          obj.roleId = this.roleId
-          obj.menuId = item.id
-          obj.head = []
-          for(let itemChild of item.containsHead){
-            if(itemChild.type === true){
-              obj.head.push(itemChild.name)
-            }
-          }
-          data.push(obj)
-        }
-        setMenu(JSON.stringify(data)).then(res => {
-          this.msgSuccess('保存成功')
-          this.modifyStatus = false
-        })
-      },
-      qxList(e) {
-        const _this = this
-        console.log(this.modifyStatus)
-        if(this.modifyStatus){
-          this.$confirm('当前页面存在未保存内容,是否保存后切换?', "提醒", {
-            confirmButtonText: "留下",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(function() {
-
-          }).catch(function() {
-            _this.modifyStatus = false
-            _this.qxList(e)
-          });
-          return
-        }
-        listMenus(e.id).then(res => {
-          let data = res.data
-          this.menusList = data
-        })
-      },
-      refreshFn() {
-        // this.getList()
-        this.reload()
-        // this.deptOptions = []
+    methods: {
+      checkChange() {
+        this.modifyStatus = true
+      },
+      handleMenu() {
+        if (!this.modifyStatus) {
+          this.msgInfo('没有修改的内容!')
+          return
+        }
+        let data = []
+        for (let item of this.menusList.sysMenus) {
+          let obj = {}
+          obj.roleId = this.roleId
+          obj.menuId = item.id
+          obj.head = []
+          for (let itemChild of item.containsHead) {
+            if (itemChild.type === true) {
+              obj.head.push(itemChild.name)
+            }
+          }
+          data.push(obj)
+        }
+        setMenu(JSON.stringify(data)).then(res => {
+          this.msgSuccess('保存成功')
+          this.modifyStatus = false
+        })
+      },
+      qxList(e) {
+        const _this = this
+        if (this.modifyStatus) {
+          this.$confirm('当前页面存在未保存内容,是否保存后切换?', "提醒", {
+            confirmButtonText: "留下",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+
+          }).catch(function() {
+            _this.modifyStatus = false
+            _this.qxList(e)
+          });
+          return
+        }
+        listMenus(e.id,this.roleId).then(res => {
+          let data = res.data
+          this.menusList = data
+        })
+      },
+      refreshFn() {
+        // this.getList()
+        this.reload()
+        // this.deptOptions = []
       },
       searBtnFn(item) {
-        this.roleId = item.id
+        this.roleId = item.id
         this.handleUpdate()
       },
       handleNodeClick() {
@@ -301,13 +304,13 @@
       /** 查询菜单树结构 */
       getMenuTreeselect() {
         menuTreeselect().then(response => {
-          this.menuOptions = response.data;
+          this.menuOptions = response.data;
         });
       },
       /** 查询部门树结构 */
       getDeptTreeselect() {
         deptTreeselect().then(response => {
-          this.deptOptions = response.data;
+          this.deptOptions = response.data;
         });
       },
       // 所有菜单节点数据
@@ -331,7 +334,7 @@
       /** 根据角色ID查询菜单树结构 */
       getRoleMenuTreeselect(id) {
         return treeMenuNotAddLeafNode(id).then(response => {
-          this.menuOptions = response.menus;
+          this.menuOptions = response.data;
           return response;
         });
       },
@@ -446,12 +449,12 @@
       },
       /** 修改按钮操作 */
       handleUpdate() {
-        this.reset();
+        this.reset();
         this.fullscreenLoading = true
         const roleMenu = this.getRoleMenuTreeselect(this.roleId);
-        roleMenu.then(res => {
+        roleMenu.then(res => {
           // let checkedKeys = res.checkedKeys
-          this.deptOptions = res.menus
+          this.deptOptions = res.data
           this.fullscreenLoading = false
         });
       },
@@ -515,12 +518,12 @@
         this.$confirm('是否确认删除角色编号为"' + ids + '"的数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning",
+          type: "warning",
 
         }).then(function() {
           return delRole(ids);
         }).then(() => {
-          this.getList();
+          this.getList();
           this.deptOptions = []
           this.msgSuccess("删除成功");
         })
@@ -534,12 +537,13 @@
     }
   };
 </script>
-<style lang="scss" scoped>
-  .searItemLeft{
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
+<style lang="scss" scoped>
+  .searItemLeft {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
   }
+
   .roleContrBox {
     background-color: #fff;
     border-radius: 6px;
@@ -579,7 +583,7 @@
 
         .searItem {
           flex: 1;
-          font-size: 12px;
+          font-size: 12px;
           text-align: center;
         }
       }
@@ -600,7 +604,7 @@
 
         .searItem {
           flex: 1;
-          font-size: 12px;
+          font-size: 12px;
           text-align: center;
         }
 
@@ -673,7 +677,7 @@
         line-height: 30px;
         font-size: 12px;
         color: #343434;
-        cursor: pointer;
+        cursor: pointer;
         text-align: center;
       }