tudc 3 年 前
コミット
fed5618e04

+ 40 - 0
front-vue/src/api/approval/approval.js

@@ -0,0 +1,40 @@
+import request from '@/utils/request'
+
+// 查询审批信息列表
+export function listApproval(query) {
+  return request({
+    url: '/common/flowable/approvalList',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 新增审批设置
+export function addApporval(data) {
+    return request({
+      url: '/common/flowable',
+      method: 'post',
+      data: data
+    })
+  }
+
+
+//查询详情
+export function approvalDetail(papId) {
+    return request({
+      url: '/common/flowable/' + papId,
+      method: 'get'
+    })
+  }  
+
+
+
+//修改
+  export function updateApproval(data) {
+    return request({
+      url: '/common/flowable',
+      method: 'put',
+      data: data
+    })
+  }

+ 259 - 0
front-vue/src/views/approval/approval/approval.vue

@@ -0,0 +1,259 @@
+<template>
+  <div class="app-container">
+    <el-card class="fiche">
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList">收起</right-toolbar>
+          <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
+         <div  style="float: right;margin-right:1%">
+            <el-button type="cyan"  icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"  style="float: ;">重置</el-button>
+         </div>
+         <hr  style="margin-top: 16px;">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+     
+      <el-form-item label="业务名称" prop="papBusinessName">
+        <el-input
+          v-model="queryParams.papBusinessName"
+          placeholder="请输入业务名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+          maxlength="20"
+        />
+      </el-form-item>
+  
+    </el-form>
+    </el-card>
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['approval:approval:add']"
+        >新增</el-button>
+      </el-col>
+
+    </el-row>
+    <el-table stripe v-loading="loading" :data="approvalList" @selection-change="handleSelectionChange">
+      <el-table-column label="序号" type="index" width="55" align="center" fixed>
+        <template slot-scope="scope">
+        <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="业务名称" align="center" prop="papBusinessName" width="140" :show-overflow-tooltip="true"   fixed/>
+      <el-table-column label="类型" align="center" :formatter="typeFormat" prop="cifType" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250"  fixed="right">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['approval:approval:edit']"
+          >修改</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改信息对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body :before-close = "cancel">
+      <el-form ref="form" :disabled="disabled" :model="form" :rules="rules" label-width="80px" class="demo-form-inline" :inline="true">
+         
+        <el-form-item label="业务名称" prop="papBusinessName">
+          <el-input v-model.trim="form.papBusinessName" placeholder="请输入业务名称" maxlength="30" style="width: 200px"/>
+        </el-form-item>
+        <el-form-item label="表名称" prop="papTableName">
+          <el-input v-model.trim="form.papTableName" placeholder="请输入表名称"  maxlength="30" style="width: 200px"/>
+        </el-form-item>
+        <el-form-item label="类型" prop="papType">
+          <el-select v-model="form.papType" placeholder="请选择类型" style="width: 200px">
+                <el-option
+                  v-for="(item, index) in papTypeOptions"
+                  :key="index"
+                  :label="item.dictLabel"
+                  :value="item.dictValue"
+                ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="链接" prop="papUrl">
+          <el-input v-model.trim="form.papUrl" placeholder="请输入链接"  maxlength="100" style="width: 200px"/>
+        </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>
+
+<script>
+import {listApproval,addApporval,approvalDetail,updateApproval} from "@/api/approval/approval";
+export default {
+  name: "approval",
+ components: {},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 审批信息表格数据
+      approvalList: [],
+      // 审批类型数据字典
+      papTypeOptions: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      sealOpen: false,
+      // 查询参数:
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        papBusinessName:''
+      },
+      // 表单参数
+      form: {},
+      disabled: true,
+      // 表单校验
+      rules: {
+        papBusinessName: [
+          { required: true, message: '请输入业务名称', trigger: ["blur",'change'] },
+        ],
+        papTableName: [
+          { required: true, message: '请输入表名称', trigger: 'blur'},
+        ],
+        papType: [
+          { required: true, message: '请选择类型', trigger: 'blur'},
+        ],
+      
+  
+      },
+      // 远程搜索
+      options: [],
+      value: [],
+      list: [],
+      loading: false,
+    };
+  },
+ 
+  created() {
+    this.getList();
+    this.getDicts("pub_approval_type").then((response) => {
+      this.papTypeOptions = response.data;
+    });
+  },
+ 
+  methods: {
+    /** 查询信息列表 */
+    getList() {
+      this.loading = true;
+      listApproval(this.queryParams).then(response => {
+        this.approvalList = response.data.records;
+        this.total = response.data.total;
+        this.loading = false;
+      }).catch(()=>{
+        this.loading = false;
+      });
+    },
+  
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.sealOpen = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        papId: null,
+        papBusinessName: null,
+        papTableName: null,
+        papType: null,
+        papUrl: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+     
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.papId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 类型字典 */
+    typeFormat(row, column){
+      return this.selectDictLabel(this.papTypeOptions, row.papType);
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.disabled = false;
+      this.title = "添加审批设置信息";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const papId = row.papId || this.papId;
+      this.disabled = false;
+      approvalDetail(papId).then(response => {
+        this.open = true;
+        this.form = response.data;
+        this.title = "修改审批设置信息";
+      });
+    },
+   
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+         if (valid) {
+          if (this.form.papId != null) {
+            updateApproval(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else { 
+            addApporval(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        } 
+      }); 
+    },
+    
+    
+  }
+};
+</script>

+ 29 - 0
front-vue/src/views/approval/approval/deal.vue

@@ -0,0 +1,29 @@
+<template>
+  <div class="app-container">
+   <iframe :src="wordUrl" width='100%' height='1000'  frameborder='0' v-if="iframeShow" />
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/utils/auth";
+export default {
+  name: "deal",
+ components: {},
+    data() {
+        return {
+            // wordUrl:window.location.protocol+'//'+window.location.host+'/flowablePc/#/myTask?token='+getToken(),
+            wordUrl:'',
+            iframeShow : false
+        };
+    },
+    created() {
+        const processId = this.$route.params && this.$route.params.processId;
+        const nodeId = this.$route.params && this.$route.params.nodeId;
+        const taskId = this.$route.params && this.$route.params.taskId;
+        const instId = this.$route.params && this.$route.params.instId;
+        this.wordUrl = window.location.protocol+'//'+window.location.host+'/flowablePc/#/openDeal?instId='+ instId + '&processId=' + processId + '&nodeId=' + nodeId + '&taskId=' + taskId + '&token=' + getToken();
+        // this.wordUrl = 'http://localhost:8080/flowablePc/#/openDeal?instId='+ instId + '&processId=' + processId + '&nodeId=' + nodeId + '&taskId=' + taskId + '&token' + getToken();
+        this.iframeShow = true
+    },
+};
+</script>

+ 19 - 0
front-vue/src/views/approval/approval/getMyJoinProcint.vue

@@ -0,0 +1,19 @@
+<template>
+  <div class="app-container">
+   <iframe :src="wordUrl" width='100%' height='1000'  frameborder='0'/>
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/utils/auth";
+export default {
+  name: "getMyJoinProcint",
+ components: {},
+  data() {
+    return {
+      wordUrl:'http://192.168.0.127/flowablePc/#/getMyJoinProcint?token='+getToken(),
+        // wordUrl:window.location.protocol+'//'+window.location.host+'/flowablePc/#/getMyJoinProcint?token='+getToken(),
+    };
+  },
+};
+</script>

+ 19 - 0
front-vue/src/views/approval/approval/menuConfig.vue

@@ -0,0 +1,19 @@
+<template>
+  <div class="app-container">
+   <iframe :src="wordUrl" width='100%' height='1000'  frameborder='0'/>
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/utils/auth";
+export default {
+  name: "menuConfig",
+ components: {},
+  data() {
+    return {
+      wordUrl:'http://192.168.0.127/flowablePc/#/menuConfig?token='+getToken(),
+       // wordUrl:window.location.protocol+'//'+window.location.host+'/flowablePc/#/menuConfig?token='+getToken(),
+    };
+  },
+};
+</script>

+ 19 - 0
front-vue/src/views/approval/approval/myStartFlow.vue

@@ -0,0 +1,19 @@
+<template>
+  <div class="app-container">
+   <iframe :src="wordUrl" width='100%' height='1000'  frameborder='0'/>
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/utils/auth";
+export default {
+  name: "myStartFlow",
+ components: {},
+  data() {
+    return {
+     wordUrl:'http://192.168.0.127/flowablePc/#/myStartFlow?token='+getToken(),
+        // wordUrl:window.location.protocol+'//'+window.location.host+'/flowablePc/#/myStartFlow?token='+getToken(),
+    };
+  },
+};
+</script>

+ 19 - 0
front-vue/src/views/approval/approval/myTask.vue

@@ -0,0 +1,19 @@
+<template>
+  <div class="app-container">
+   <iframe :src="wordUrl" width='100%' height='1000'  frameborder='0'/>
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/utils/auth";
+export default {
+  name: "myTask",
+ components: {},
+  data() {
+    return {
+      // wordUrl:window.location.protocol+'//'+window.location.host+'/flowablePc/#/myTask?token='+getToken(),
+      wordUrl:'http://192.168.0.127/flowablePc/#/myTask?token='+getToken(),
+    };
+  },
+};
+</script>

+ 10 - 7
front-vue/src/views/system/user/index.vue

@@ -117,7 +117,7 @@
                 <el-row>
                     <el-col :span="12">
                         <el-form-item label="手机号" prop="userName">
-                            <el-input v-model="form.userName" placeholder="请输入登手机号" maxlength="11" />
+                            <el-input v-model="form.userName" placeholder="请输入登手机号" maxlength="11" :disabled="isUpdate" />
                         </el-form-item>
                     </el-col>
                     <el-col :span="12">
@@ -130,9 +130,7 @@
                     <el-col :span="12">
                         <el-form-item label="角色" prop="roleIds">
                             <el-select v-model="form.roleIds" multiple placeholder="请选择">
-                                <template v-for="item in roleOptions">
-                                    <el-option :key="item.roleId" :label="item.roleName" :value="item.roleId" v-if="item.status == 0"></el-option>
-                                </template>
+                              <el-option v-for="item in roleOptions" :key="item.roleId" :label="item.roleName" :value="item.roleId" v-if="item.status == 0"></el-option>
                             </el-select>
                         </el-form-item>
                     </el-col>
@@ -386,11 +384,11 @@ export default {
                     },
                 ],
                 email: [
-                    {
+/*                    {
                         required: true,
                         message: "邮箱地址不能为空",
                         trigger: "blur",
-                    },
+                    }, */
                     {
                         // type: "email",
                         pattern:
@@ -433,6 +431,7 @@ export default {
                 ],
             },
             peoplpeName: false,
+            isUpdate : false
         };
     },
     watch: {
@@ -600,6 +599,7 @@ export default {
         },
         /** 新增按钮操作 */
         handleAdd() {
+            this.isUpdate = false;
             this.reset();
             this.peoplpeName = false;
             this.getTreeselect();
@@ -614,6 +614,7 @@ export default {
         },
         /** 修改按钮操作 */
         handleUpdate(row) {
+            this.isUpdate = true;
             var self =this;
             this.reset();
             this.peoplpeName = true;
@@ -625,7 +626,8 @@ export default {
                 this.postOptions = response.posts;
                 this.roleOptions = response.roles;
                 this.form.postIds = response.postIds;
-                this.form.roleIds = response.roleIds;
+                this.$set(this.form, 'roleIds', response.roleIds)
+                // this.form.roleIds = response.roleIds;
                 this.open = true;
                 this.leave = true;
                 this.title = "修改用户";
@@ -678,6 +680,7 @@ export default {
                             spinner: "el-icon-loading",
                             background: "rgba(0, 0, 0, 0.7)",
                         });
+                        this.$set(this.form, 'createTime', null);
                         updateUser(this.form)
                             .then((response) => {
                                 loading.close();