Kaynağa Gözat

用户管理修改完成

zhangh 2 yıl önce
ebeveyn
işleme
423658f803

+ 17 - 0
src/api/manager/AdjustForm.js

@@ -0,0 +1,17 @@
+import request from '@/router/axios';
+
+export const dictionary = () => {
+    return request({
+        url: '/api/blade-system/dict/dictionary?code=sys_text_type',
+        method: 'get',
+    })
+}
+
+// 设置文本类型
+export const saveInput = (data) => {
+    return request({
+        url: '/api/blade-manager/textdictinfo/save',
+        method: 'post',
+        data
+    })
+}

+ 13 - 13
src/router/axios.js

@@ -8,33 +8,33 @@
 import axios from 'axios';
 import store from '@/store/';
 import router from '@/router/router';
-import {serialize} from '@/util/util';
-import {getToken} from '@/util/auth';
-import {Message} from 'element-ui';
+import { serialize } from '@/util/util';
+import { getToken } from '@/util/auth';
+import { Message } from 'element-ui';
 import website from '@/config/website';
-import {Base64} from 'js-base64';
+import { Base64 } from 'js-base64';
 import NProgress from 'nprogress';
 import 'nprogress/nprogress.css';
 
 //默认超时时间
 axios.defaults.timeout = 10000;
 //返回其他状态码
-axios.defaults.validateStatus = function (status) {
-  return status >= 200 && status <= 500;
+axios.defaults.validateStatus = function(status) {
+    return status >= 200 && status <= 500;
 };
 //跨域请求,允许保存cookie
 axios.defaults.withCredentials = true;
 // NProgress 配置
 NProgress.configure({
-  showSpinner: false
+    showSpinner: false
 });
 //http request拦截
 axios.interceptors.request.use(config => {
-  //开启 progress bar
-  NProgress.start();
-  const meta = (config.meta || {});
-  const isToken = meta.isToken === false;
-  config.headers['Authorization'] = `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`;
+            //开启 progress bar
+            NProgress.start();
+            const meta = (config.meta || {});
+            const isToken = meta.isToken === false;
+            config.headers['Authorization'] = `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`;
   //让每个请求携带token
   if (getToken() && !isToken) {
     config.headers[website.tokenHeader] = 'bearer ' + getToken()
@@ -77,4 +77,4 @@ axios.interceptors.response.use(res => {
   return Promise.reject(new Error(error));
 });
 
-export default axios;
+export default axios;

+ 11 - 15
src/views/manager/contractinfo/detail.vue

@@ -684,15 +684,10 @@ export default {
           } else {
             this.postList = []
           }
+        } else {
+          this.findAllUserByCondition(this.rId)
         }
       })
-      // findPostByType(newValue).then((res) => {
-      //   this.postList = res.data.data;
-      // }).catch(() => {
-      //   this.postList = [];
-      // }).finally(() => {
-      //   this.postId = '';
-      // })
     },
     postId: function (newValue) {
       if (newValue) {
@@ -738,12 +733,7 @@ export default {
       const { data: res } = await searchRole()
       console.log(res);
       if (res.code === 200) {
-        this.roleList = []
-        res.data.forEach(val => {
-          if (val.roleName == "施工方" || val.roleName == "监理方" || val.roleName == "业主方") {
-            this.roleList.push(val)
-          }
-        })
+        this.roleList = res.data
       }
     },
     async init () {
@@ -968,12 +958,18 @@ export default {
       })
     },
 
-    findAllUserByCondition () {
+    findAllUserByCondition (val) {
+      let rId
+      if (this.postId) {
+        rId = this.postId
+      } else {
+        rId = val
+      }
       findAllUserByCondition({
         cId: this.contractForm.id,
         pId: this.pid,
         // "postId": this.postId,
-        rId: this.postId,
+        rId: rId,
       },
         this.pagesize,
         this.pageindx,

+ 39 - 48
src/views/manager/projectinfo/tree.vue

@@ -286,7 +286,7 @@
                 <el-link
                   class="mg-l-10"
                   type="primary"
-                  @click="adjustExcel"
+                  @click="adjustExcel(scope.row.pkeyId)"
                 >调整表单</el-link>
                 <el-link
                   class="mg-l-10"
@@ -310,6 +310,7 @@
       <dynamicExcel
         @remove="removeExcel"
         v-if="excelHtml"
+        :pkeyId='GLExcelFrom.id'
       />
     </div>
 
@@ -1076,6 +1077,7 @@
       :visible.sync="nodeInfoVisible"
       width="800px"
       append-to-body
+      class="jiedian"
       :close-on-click-modal="false"
       :show-close="false"
     >
@@ -1086,6 +1088,13 @@
           class="right-btn"
           @click="infoNameVisible = true"
         ></el-button>
+        <div class="flexEnd">
+          <i
+            class="el-icon-circle-plus marbottom10"
+            @click="addNodeInfoTable()"
+            style="font-size:24px;color:rgb(37, 193, 99);cursor: pointer;"
+          ></i>
+        </div>
         <el-table
           :data="nodeInfoTable"
           border
@@ -1098,23 +1107,18 @@
             label="参数名称"
           >
             <template slot-scope="scope">
-              <template v-if="scope.row.isEdit">
-                <el-select
-                  v-model="scope.row.name"
-                  placeholder="请选择"
-                  class="w-100p"
-                >
-                  <el-option
-                    v-for="item in namelist"
-                    :key="item.id"
-                    :label="item.dictValue"
-                    :value="item.dictKey"
-                  ></el-option>
-                </el-select>
-              </template>
-              <template v-else>
-                {{scope.row.name}}
-              </template>
+              <el-select
+                v-model="scope.row.name"
+                placeholder="请选择"
+                class="w-100p"
+              >
+                <el-option
+                  v-for="item in namelist"
+                  :key="item.id"
+                  :label="item.dictValue"
+                  :value="item.dictKey"
+                ></el-option>
+              </el-select>
             </template>
           </el-table-column>
           <el-table-column
@@ -1123,12 +1127,7 @@
             label="参数值设置"
           >
             <template slot-scope="scope">
-              <template v-if="scope.row.isEdit">
-                <el-input v-model="scope.row.value"></el-input>
-              </template>
-              <template v-else>
-                {{scope.row.value}}
-              </template>
+              <el-input v-model="scope.row.value"></el-input>
             </template>
           </el-table-column>
           <el-table-column
@@ -1137,12 +1136,7 @@
             label="描述"
           >
             <template slot-scope="scope">
-              <template v-if="scope.row.isEdit">
-                <el-input v-model="scope.row.describe"></el-input>
-              </template>
-              <template v-else>
-                {{scope.row.describe}}
-              </template>
+              <el-input v-model="scope.row.describe"></el-input>
             </template>
           </el-table-column>
           <el-table-column
@@ -1151,18 +1145,6 @@
             align="center"
           >
             <template slot-scope="scope">
-              <el-button
-                type="text"
-                size="small"
-                v-show="scope.row.isEdit"
-                @click="saveNodeInfoHandle(scope.$index, scope.row)"
-              >保存</el-button>
-              <el-button
-                type="text"
-                size="small"
-                v-show="!scope.row.isEdit"
-                @click="editNodeInfo(scope.$index, scope.row)"
-              >编辑</el-button>
               <el-button
                 type="text"
                 size="small"
@@ -1445,7 +1427,6 @@ export default {
         return resolve(arr);
       })
     },
-
     getNodeDetail (data, node) {
       //console.log(data,node,ref)
       let parentName = '';
@@ -1461,7 +1442,6 @@ export default {
       })
       this.updateNodeTable();
     },
-
     saveNode () {
       this.$refs['nodeDetail'].validate((valid) => {
         if (valid) {
@@ -2075,7 +2055,7 @@ export default {
     GLExcelMD () {//弹框关闭事件
       this.GLExcelFrom.name = ""
       this.GLExcelFrom.search = ''
-      this.GLExcelFrom.id
+      this.GLExcelFrom.id = ''
       this.$refs.tree.setCheckedKeys([])
       this.GLExcel = false
     },
@@ -2101,14 +2081,21 @@ export default {
         this.GLExcelMD()
       }
     },
-    filterNode222 (value, data) {
+    filterNode222 (GLExcelFromvalue, data) {
       if (!value) return true;
       return data.name.indexOf(value) !== -1;
     },
     //#endregion
 
+    //#region 节点参数
+    addNodeInfoTable () {//添加节点参数数据
+      this.nodeInfoTable.unshift({ name: '', value: '', describe: '' })
+    },
+    //#endregion
+
     //#region 调整表单
-    adjustExcel () {//调整表单
+    adjustExcel (pkeyId) {//调整表单
+      this.GLExcelFrom.id = pkeyId
       this.getExcelHtml()
     },
     async getExcelHtml () {
@@ -2118,7 +2105,6 @@ export default {
         localStorage.setItem('excelHtml', res.data)
         this.adjustmentExcel = res.data
         this.excelHtml = true
-
       }
     },
     removeExcel () {
@@ -2178,4 +2164,9 @@ export default {
   width: 100%;
   height: 100%;
 }
+.jiedian {
+  /deep/.el-dialog__body {
+    padding: 10px 20px !important;
+  }
+}
 </style>

+ 6 - 1
src/views/manager/projectinfo/treeTemplate/dynamicExcel.vue

@@ -11,18 +11,22 @@
         <el-button
           type="info"
           size="small"
+          @click="setUptype=0"
         >设置输入框</el-button>
         <el-button
           type="info"
           size="small"
+          @click="setUptype=1"
         >电签位置配置</el-button>
         <el-button
           type="success"
           size="small"
+          @click="setUptype=2"
         >设置公式开放条件</el-button>
         <el-button
           type="primary"
           size="small"
+          @click="setUptype=3"
         >编辑默认信息</el-button>
       </div>
     </div>
@@ -48,9 +52,10 @@ import setFormula from './template/setFormula.vue'
 import editDefault from './template/editDefault.vue'
 import Vue from 'vue'
 export default {
+  props: ['pkeyId'],
   data () {
     return {
-      setUptype: 3,//右侧显示的类型1
+      setUptype: 0,//右侧显示的类型1
     }
   },
   mounted () {

+ 56 - 13
src/views/manager/projectinfo/treeTemplate/template/setInputTPT.vue

@@ -2,7 +2,7 @@
   <div class="setInput">
     <div class="flexBetween ">
       <el-select
-        v-model="value"
+        v-model="from.value"
         clearable
         placeholder="请选择"
       >
@@ -15,15 +15,15 @@
         </el-option>
       </el-select>
       <el-select
-        v-model="value"
+        v-model="from.value"
         clearable
         placeholder="请选择"
       >
         <el-option
-          v-for="item in options"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value"
+          v-for="item in kjtype"
+          :key="item.dictKey"
+          :label="item.remark"
+          :value="item.dictKey"
         >
         </el-option>
       </el-select>
@@ -46,7 +46,8 @@
         >
           <tr>
             <th width='15%'>序号</th>
-            <th width='55%'>默认值</th>
+            <th width='65%'>默认值</th>
+            <th width='20%'>操作</th>
           </tr>
         </thead>
         <tbody height='36px'>
@@ -54,14 +55,27 @@
             v-for="(item,key) in setInputTable"
             :key="key"
           >
-            <td>{{item.id}}</td>
-            <td></td>
+            <td align="center">{{key+1}}</td>
+            <td>
+              <el-input
+                v-model="setInputTable[key].inputDa"
+                size="mini"
+                placeholder="请输入内容"
+              ></el-input>
+            </td>
+            <td align="center">
+              <el-link
+                type="warning"
+                @click="deleteTable(key)"
+              >删除</el-link>
+            </td>
           </tr>
         </tbody>
       </table>
       <div class="martop20 flexEnd marbottom10"><i
-          style="color:rgb(10, 134, 217);font-size:24px;"
+          style="color:rgb(10, 134, 217);font-size:24px;cursor: pointer;"
           class="el-icon-circle-plus"
+          @click="addTable()"
         ></i></div>
     </div>
 
@@ -70,10 +84,12 @@
       style="float:right;"
       type="info"
       size="mini"
+      @click="saveType()"
     >保存设置</el-button>
   </div>
 </template>
 <script>
+import { dictionary, saveInput } from "@/api/manager/AdjustForm";
 export default {
   data () {
     return {
@@ -93,12 +109,39 @@ export default {
         value: '选项5',
         label: '北京烤鸭'
       }],
-      value: '',
-      setInputTable: [{ id: 11 }],//数据体
+      kjtype: [],//框架类型
+      from: {
+        value: '',
+      },
+      setInputTable: [],//数据体
     }
   },
   methods: {
-
+    addTable () {//添加table表
+      this.setInputTable.push({ inputDa: '' })
+    },
+    deleteTable (key) {//删除数据
+      this.setInputTable.splice(key, 1)
+    },
+    saveType () {//保存设置按钮
+      // if(){
+      //   this.saveInput()
+      // }
+    },
+    async dictionary () {//获取文本类型接口
+      const { data: res } = await dictionary()
+      console.log(res);
+      if (res.code === 200) {
+        this.kjtype = res.data
+      }
+    },
+    async saveInput (data) {//保存设置文本接口
+      const { data: res } = await saveInput(data)
+      console.log(res);
+    },
+  },
+  created () {
+    this.dictionary()  //获取文本类型接口
   },
 }
 </script>

+ 36 - 56
src/views/manager/wbsinfo/edit.vue

@@ -1084,6 +1084,7 @@
       :visible.sync="nodeInfoVisible"
       width="800px"
       append-to-body
+      class="jiedian"
       :close-on-click-modal="false"
       :show-close="false"
     >
@@ -1094,6 +1095,13 @@
           class="right-btn"
           @click="infoNameVisible = true"
         ></el-button>
+        <div class="flexEnd">
+          <i
+            class="el-icon-circle-plus marbottom10"
+            @click="addNodeInfoTable()"
+            style="font-size:24px;color:rgb(37, 193, 99);cursor: pointer;"
+          ></i>
+        </div>
         <el-table
           :data="nodeInfoTable"
           border
@@ -1106,23 +1114,18 @@
             label="参数名称"
           >
             <template slot-scope="scope">
-              <template v-if="scope.row.isEdit">
-                <el-select
-                  v-model="scope.row.name"
-                  placeholder="请选择"
-                  class="w-100p"
-                >
-                  <el-option
-                    v-for="item in namelist"
-                    :key="item.id"
-                    :label="item.dictValue"
-                    :value="item.dictKey"
-                  ></el-option>
-                </el-select>
-              </template>
-              <template v-else>
-                {{scope.row.name}}
-              </template>
+              <el-select
+                v-model="scope.row.name"
+                placeholder="请选择"
+                class="w-100p"
+              >
+                <el-option
+                  v-for="item in namelist"
+                  :key="item.id"
+                  :label="item.dictValue"
+                  :value="item.dictKey"
+                ></el-option>
+              </el-select>
             </template>
           </el-table-column>
           <el-table-column
@@ -1131,12 +1134,7 @@
             label="参数值设置"
           >
             <template slot-scope="scope">
-              <template v-if="scope.row.isEdit">
-                <el-input v-model="scope.row.value"></el-input>
-              </template>
-              <template v-else>
-                {{scope.row.value}}
-              </template>
+              <el-input v-model="scope.row.value"></el-input>
             </template>
           </el-table-column>
           <el-table-column
@@ -1145,12 +1143,7 @@
             label="描述"
           >
             <template slot-scope="scope">
-              <template v-if="scope.row.isEdit">
-                <el-input v-model="scope.row.describe"></el-input>
-              </template>
-              <template v-else>
-                {{scope.row.describe}}
-              </template>
+              <el-input v-model="scope.row.describe"></el-input>
             </template>
           </el-table-column>
           <el-table-column
@@ -1159,23 +1152,11 @@
             align="center"
           >
             <template slot-scope="scope">
-              <el-button
-                type="text"
-                size="small"
-                v-show="scope.row.isEdit"
-                @click="saveNodeInfoHandle(scope.$index, scope.row)"
-              >保存</el-button>
-              <el-button
-                type="text"
-                size="small"
-                v-show="!scope.row.isEdit"
-                @click="editNodeInfo(scope.$index, scope.row)"
-              >编辑</el-button>
               <el-button
                 type="text"
                 size="small"
                 class="text-icon-danger"
-                @click="delNodeInfo(scope.$index, scope.row)"
+                @click="delNodeInfo(scope.$index)"
               >删除</el-button>
             </template>
           </el-table-column>
@@ -1415,6 +1396,9 @@ export default {
     editSort () {//修改排序
       this.wbsTreeSort()
     },
+    addNodeInfoTable () {//添加节点参数数据
+      this.nodeInfoTable.unshift({ name: '', value: '', describe: '' })
+    },
     async wbsTreeSort () {//修改排序
       const { data: res } = await wbsTreeSort(this.sort)
       console.log(res);
@@ -1921,8 +1905,7 @@ export default {
       })
     },
 
-    handleDownload () {
-      //WBS划分模板
+    handleDownload () {//WBS划分模板
       exportTemplate().then((res) => {
         this.downloadExcel(res.data, 'WBS划分模板')
       })
@@ -1942,23 +1925,15 @@ export default {
       this.upFile = file;
     },
 
-    nodeInfo () {
+    nodeInfo () { //打开节点参数弹框
       this.nodeInfoVisible = true;
     },
-    nodeInfoSave () {
+    nodeInfoSave () {//节点参数弹框保存按钮
 
     },
-
-    delNodeInfo () {
-
-    },
-    editNodeInfo (index, row) {
-      this.$set(row, 'isEdit', true);
-    },
-    saveNodeInfoHandle (index, row) {
-      row.isEdit = false;
+    delNodeInfo (index) {//节点参数弹框中删除按钮
+      this.nodeInfoTable.splice(index, 1)
     },
-
     downloadTmp () {
       getTemplate().then((res) => {
         //console.log(res)
@@ -2173,4 +2148,9 @@ export default {
     display: block;
   }
 }
+.jiedian {
+  /deep/.el-dialog__body {
+    padding: 10px 20px !important;
+  }
+}
 </style>

+ 9 - 18
src/views/system/user.vue

@@ -126,7 +126,7 @@
               <el-option
                 v-for="item in contractData"
                 :key="item.id"
-                :label="item.projectName"
+                :label="item.contractName"
                 :value="item.id"
               >
               </el-option>
@@ -1018,7 +1018,7 @@ export default {
         this.removeUsersByIds(this.fromss.projectAndUserList[key].id)
       }
     },
-    beforeClose (done) {//弹框关闭事件
+    async beforeClose (done) {//弹框关闭事件
       this.fromss = {
         userId: '',//
         projectAndUserList: [],
@@ -1026,7 +1026,8 @@ export default {
         contractId: '',//合同段
         roleIds: '',//用户类型
       },
-        done()
+        await this.onLoad(this.page);
+      done()
     },
     async removeUsersByIds (ids) {//删除参建项目
       const { data: res } = await removeUsersByIds(ids)
@@ -1091,22 +1092,11 @@ export default {
       this.onLoad(this.page);
     },
     initData (tenantId) {
-      // roletree(tenantId).then(res => {
-      //   const column = this.findObject(this.option.group, "roleId");
-      //   column.dicData = res.data.data;
-      // });
-
       //所属部门
       getDeptTree(tenantId).then(res => {
         const column = this.findObject(this.option.group, "deptId");
         column.dicData = res.data.data;
       });
-
-      // 所属岗位
-      // getPostList(tenantId).then(res => {
-      //   const column = this.findObject(this.option.group, "postId");
-      //   column.dicData = res.data.data;
-      // });
     },
     submitRole () {
       const roleList = this.$refs.treeRole.getCheckedKeys().join(",");
@@ -1132,13 +1122,14 @@ export default {
         loading();
       });
     },
-
-
     rowUpdate (row, index, done, loading) {//修改按钮
       row.deptId = row.deptId.join(",");
-      row.roleId = row.roleId.join(",");
+      // row.roleId = row.roleId.join(",");
       row.postId = row.postId.join(",");
-      update({ ...row, projectAndUserList: this.fromss.projectAndUserList }).then(() => {
+      let ks = { ...row }
+      delete ks.projectAndUserList
+      delete ks.roleId
+      update({ ...ks }).then(() => {
         this.initFlag = false;
         this.onLoad(this.page);
         this.$message({

+ 1 - 0
vue.config.js

@@ -28,6 +28,7 @@ module.exports = {
                 //本地服务接口地址
                 // target: 'http://localhost',
                 target: 'http://192.168.3.76',
+                // target: 'http://192.168.3.13',
                 //远程演示服务地址,可用于直接启动项目
                 //target: 'https://saber.bladex.vip/api',
                 ws: true,