Эх сурвалжийг харах

Merge branch 'master' of git.xiaojukeji.com:jacklijiajia/thoth-frontend

qinqiao 5 жил өмнө
parent
commit
e12e874a89

+ 38 - 0
src/api/bizPage.js

@@ -0,0 +1,38 @@
+import request from '@/utils/request'
+import { mockUrl } from '@/apiConfig/api'
+
+// 新增业务线
+export function addBiz(data) {
+  return request({
+    url: mockUrl + `/setting/addBiz`,
+    method: 'post',
+    data
+  })
+}
+
+// 修改
+export function updateBiz(data) {
+  return request({
+    url: mockUrl + `/setting/updateBiz`,
+    method: 'post',
+    data
+  })
+}
+
+// 删除
+export function deleteBiz(data) {
+  return request({
+    url: mockUrl + `/setting/deleteBiz`,
+    method: 'post',
+    data
+  })
+}
+
+// 查看列表
+export function queryBizTypeList(data) {
+  return request({
+    url: mockUrl + `/setting/queryBizTypeList`,
+    method: 'post',
+    data
+  })
+}

+ 49 - 6
src/router/index.js

@@ -231,12 +231,55 @@ export const constantRoutes = [
         ]
         ]
       },
       },
       {
       {
-        path: 'teamPage',
-        name: 'teamPage',
-        hidden: true,
-        component: () => import('@/views/Platform/teamPage'),
-        meta: { title: '团队管理' }
-      }]
+        path: '/Platform/setUp',
+        // component: Layout,
+        name: '设置',
+        // meta: { title: '设置' },
+        component: () =>
+            import('@/views/Platform/setUp/testa'),
+        meta: { title: '设置' },
+        children: [{
+          path: 'bizPage',
+          name: '业务线',
+          // hidden: true,
+          component: () =>
+                    import('@/views/Platform/setUp/bizPage'),
+          meta: { title: '业务线' }
+        },
+        // {
+        //     path: 'modulePage',
+        //     name: '业务模块',
+        //     hidden: true,
+        //     component: () =>
+        //         import ('@/views/Platform/setUp/modulePage'),
+        //     meta: { title: '业务模块' }
+        // },
+        // {
+        //     path: 'platformPage',
+        //     name: '平台类型',
+        //     hidden: true,
+        //     component: () =>
+        //         import ('@/views/Platform/setUp/platformPage'),
+        //     meta: { title: '平台类型' }
+        // },
+        // {
+        //     path: 'projectPage',
+        //     name: '工程模块',
+        //     hidden: true,
+        //     component: () =>
+        //         import ('@/views/Platform/setUp/projectPage'),
+        //     meta: { title: '工程模块' }
+        // },
+        {
+          path: 'teamPage',
+          name: '团队设置',
+          component: () =>
+                    import('@/views/Platform/setUp/teamPage'),
+          meta: { title: '团队设置' }
+        }
+        ]
+      }
+    ]
   },
   },
   {
   {
     path: '/env-platform',
     path: '/env-platform',

+ 15 - 13
src/views/Platform/bugManage/bugCreate.vue

@@ -129,7 +129,6 @@
             ref="upload"
             ref="upload"
             class="upload-demo"
             class="upload-demo"
             multiple
             multiple
-            accept="image/jpeg, image/png, image/gif, audio/mp4, video/mp4, audio/mpeg, application/vnd.ms-excel"
             :file-list="fileList"
             :file-list="fileList"
             action="http://star.xiaojukeji.com/upload/img.node"
             action="http://star.xiaojukeji.com/upload/img.node"
             :on-success="handleChange"
             :on-success="handleChange"
@@ -139,10 +138,11 @@
             <!-- action="http://star.xiaojukeji.com/upload/img.node" 线上 -->
             <!-- action="http://star.xiaojukeji.com/upload/img.node" 线上 -->
             <!-- action="https://jsonplaceholder.typicode.com/posts/" 原始地址-->
             <!-- action="https://jsonplaceholder.typicode.com/posts/" 原始地址-->
             <!-- <el-button size="small">点击上传</el-button> -->
             <!-- <el-button size="small">点击上传</el-button> -->
-            <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+            <el-button slot="trigger" size="small" type="primary" @click="createdDis">选取文件</el-button>
             <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
             <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
           </el-upload>
           </el-upload>
         </div>
         </div>
+        <!-- accept="image/jpeg, image/png, image/gif, audio/mp4, video/mp4, application/pdf, audio/mpeg, text/plain, application/vnd.ms-excel, application/vnd.ms-works, application/msword" -->
         <el-form-item class="submit">
         <el-form-item class="submit">
           <el-button size="mini" type="primary" @click="createFormData(form)">提 交</el-button>
           <el-button size="mini" type="primary" @click="createFormData(form)">提 交</el-button>
           <el-button class="move-button" size="mini" @click="$router.go(-1)">取 消</el-button>
           <el-button class="move-button" size="mini" @click="$router.go(-1)">取 消</el-button>
@@ -213,10 +213,8 @@ export default {
       serviceDataRules: {
       serviceDataRules: {
         bugName: [{ required: true, message: '标题不能为空', trigger: 'change' }],
         bugName: [{ required: true, message: '标题不能为空', trigger: 'change' }],
         bizId: [{ required: true, message: '业务线不能为空', trigger: 'change' }],
         bizId: [{ required: true, message: '业务线不能为空', trigger: 'change' }],
-        // bugName: [{ required: true, message: '主题不能为空', trigger: 'change' }],
         taskId: [{ required: true, message: '任务不能为空', trigger: 'change' }],
         taskId: [{ required: true, message: '任务不能为空', trigger: 'change' }],
         moduleId: [{ required: true, message: '工程模块不能为空', trigger: 'change' }],
         moduleId: [{ required: true, message: '工程模块不能为空', trigger: 'change' }],
-        // projectId: [{ required: true, message: '项目ID不能为空', trigger: 'change' }],
         bugType: [{ required: true, message: 'bug类型不能为空', trigger: 'change' }],
         bugType: [{ required: true, message: 'bug类型不能为空', trigger: 'change' }],
         reopenTimes: [{ required: true, message: 'reopen不能为空', trigger: 'change' }],
         reopenTimes: [{ required: true, message: 'reopen不能为空', trigger: 'change' }],
         discoveryMethod: [{ required: true, message: '发现方式不能为空', trigger: 'change' }],
         discoveryMethod: [{ required: true, message: '发现方式不能为空', trigger: 'change' }],
@@ -235,8 +233,12 @@ export default {
       userData: '',
       userData: '',
       businessTypeShow: false,
       businessTypeShow: false,
       moduleTypeShow: false,
       moduleTypeShow: false,
+      accessory: '',
       userInformation: localStorage.getItem('username'),
       userInformation: localStorage.getItem('username'),
-      userNames: localStorage.getItem('realname')
+      userNames: localStorage.getItem('realname'),
+      fileDbList: [],
+      dis: false
+      // fileDbList: [{ name: '智慧平台.png', url: 'http://pt-starimg.didistatic.com/static/starimg/node/qo4sKioLko1571277086594.png' }, { name: '智慧平台.png', url: 'http://pt-starimg.didistatic.com/static/starimg/node/qo4sKioLko1571277086594.png' }]
     }
     }
   },
   },
   created() {
   created() {
@@ -244,23 +246,23 @@ export default {
     this.forkDown()
     this.forkDown()
   },
   },
   methods: {
   methods: {
+    createdDis() {
+      this.dis = true
+    },
     submitUpload() {
     submitUpload() {
       this.$refs.upload.submit()
       this.$refs.upload.submit()
-    },
-    test() {
-      console.log('测试')
+      this.$message({ showClose: true, message: '文件正在上传······', type: 'success' })
     },
     },
     handleChange(response, file, fileList) {
     handleChange(response, file, fileList) {
       // setTimeout(function() {
       // setTimeout(function() {
-      console.log(response)
-      console.log(fileList)
-      console.log(fileList[0].response.url)
       this.fileDbList = []
       this.fileDbList = []
       this.fileList = fileList.slice(-3)
       this.fileList = fileList.slice(-3)
       for (var a of this.fileList) {
       for (var a of this.fileList) {
         this.fileDbList.push({ 'name': a.name, 'url': 'http:' + a.response.url })
         this.fileDbList.push({ 'name': a.name, 'url': 'http:' + a.response.url })
       }
       }
-      console.log(this.fileDbList)
+      this.accessory = JSON.stringify(this.fileDbList)
+      this.dis = false
+      this.$message({ showClose: true, message: '文件上传成功', type: 'success' })
       // }, 500)
       // }, 500)
     },
     },
     async bugListSelect() {
     async bugListSelect() {
@@ -310,7 +312,6 @@ export default {
     },
     },
     // 业务线取子数据
     // 业务线取子数据
     clickChangePlatform(e) {
     clickChangePlatform(e) {
-      console.log(this.form.taskId)
       this.platformTypeStr = this.bizOptions.filter(value => value.code === e)[0].child
       this.platformTypeStr = this.bizOptions.filter(value => value.code === e)[0].child
       this.businessTypeStr = []
       this.businessTypeStr = []
       this.moduleStr = []
       this.moduleStr = []
@@ -347,6 +348,7 @@ export default {
           if (this.$route.query.id && typeof this.form.bizId === 'string') {
           if (this.$route.query.id && typeof this.form.bizId === 'string') {
             form.bizId = this.bizOptions.filter(value => value.name === form.bizId)[0].code
             form.bizId = this.bizOptions.filter(value => value.name === form.bizId)[0].code
           }
           }
+          form.accessory = this.accessory
           form.reopenTimes = parseInt(form.reopenTimes)
           form.reopenTimes = parseInt(form.reopenTimes)
           form.projectId = this.taskIdStr.filter(value => value.id === this.form.taskId)[0].projectId
           form.projectId = this.taskIdStr.filter(value => value.id === this.form.taskId)[0].projectId
           this.userData = { id: '', ename: this.userInformation, name: this.userNames }
           this.userData = { id: '', ename: this.userInformation, name: this.userNames }

+ 36 - 0
src/views/Platform/bugManage/bugQuery.vue

@@ -70,7 +70,23 @@
           app版本号 :&nbsp;&nbsp;&nbsp;{{ form.remark }}
           app版本号 :&nbsp;&nbsp;&nbsp;{{ form.remark }}
         </div>
         </div>
       </div>
       </div>
+      <div class="block-end cla">
+        <div class="display-messege">
+          附件 :
+          <el-table :data="uptataKey" fit style="width: 100%;">
+            <el-table-column label="" min-width="150">
+              <template slot-scope="scope">{{ scope.row.name }}</template>
+            </el-table-column>
+            <el-table-column label="" min-width="300">
+              <template slot-scope="scope">
+                <a :href="scope.row.url" style="color:blue;">{{ scope.row.url }}</a>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
     </el-form>
     </el-form>
+
     <el-dialog :visible.sync="dialogInDevelopment" width="40%">
     <el-dialog :visible.sync="dialogInDevelopment" width="40%">
       <el-form ref="refeshDevelopmentDialog" :model="pauseData" :rules="serviceDataRules">
       <el-form ref="refeshDevelopmentDialog" :model="pauseData" :rules="serviceDataRules">
         <el-form-item label="开发RD" prop="pauseCurrentHandler" label-width="30%"><el-input v-model="pauseData.pauseCurrentHandler" autocomplete="off" style="width:55%;" /></el-form-item>
         <el-form-item label="开发RD" prop="pauseCurrentHandler" label-width="30%"><el-input v-model="pauseData.pauseCurrentHandler" autocomplete="off" style="width:55%;" /></el-form-item>
@@ -125,6 +141,7 @@ export default {
       form: {
       form: {
         id: ''
         id: ''
       },
       },
+      uptataKey: [],
       formUpdateValue: {},
       formUpdateValue: {},
       pauseData: {
       pauseData: {
         reasonPause: '',
         reasonPause: '',
@@ -164,8 +181,16 @@ export default {
   },
   },
   created() {
   created() {
     this._initBegin()
     this._initBegin()
+    // this.getLocalStor()
   },
   },
   methods: {
   methods: {
+    // getLocalStor() {
+    //   var str = localStorage.getItem('updata')
+    //   var obj = JSON.parse(str.split('{}')[0])
+    //   for (var a of obj) {
+    //     this.uptataKey.push(a)
+    //   }
+    // },
     // 先后获取
     // 先后获取
     async _initBegin() {
     async _initBegin() {
       await bugGetEnum().then(res => {
       await bugGetEnum().then(res => {
@@ -178,6 +203,11 @@ export default {
       })
       })
       bugGet(this.$route.query.id).then(res => {
       bugGet(this.$route.query.id).then(res => {
         this.form = res.data
         this.form = res.data
+        var str = res.data.accessory
+        var obj = JSON.parse(str.split('{}')[0])
+        for (var a of obj) {
+          this.uptataKey.push(a)
+        }
         for (const a of this.bizIdEnumList) {
         for (const a of this.bizIdEnumList) {
           if (this.form.bizId === a.code) {
           if (this.form.bizId === a.code) {
             this.bizId = this.form.bizName
             this.bizId = this.form.bizName
@@ -341,6 +371,12 @@ export default {
 }
 }
 </script>
 </script>
 
 
+<style>
+ .cla .el-table td {
+    padding:0px;
+  }
+</style>
+
 <style lang="stylus" scoped>
 <style lang="stylus" scoped>
   .set-background
   .set-background
     background-color #F2F3F6
     background-color #F2F3F6

+ 56 - 9
src/views/Platform/bugManage/bugUpdate.vue

@@ -126,24 +126,42 @@
         <el-input v-model="form.remark" type="textarea" autocomplete="off" rows="5" style="margin: 20px 0;" />
         <el-input v-model="form.remark" type="textarea" autocomplete="off" rows="5" style="margin: 20px 0;" />
         <div>
         <div>
           <el-upload
           <el-upload
+            ref="upload"
             class="upload-demo"
             class="upload-demo"
             multiple
             multiple
-            capture
             accept="image/jpeg, image/png, image/gif, audio/mp4, video/mp4, audio/mpeg, application/vnd.ms-excel"
             accept="image/jpeg, image/png, image/gif, audio/mp4, video/mp4, audio/mpeg, application/vnd.ms-excel"
-            :on-change="handleChange"
             :file-list="fileList"
             :file-list="fileList"
             action="http://star.xiaojukeji.com/upload/img.node"
             action="http://star.xiaojukeji.com/upload/img.node"
+            :on-success="handleChange"
+            :auto-upload="false"
           >
           >
             <!-- action="http://page-daily.kuaidadi.com/upload/img.node" 线下 -->
             <!-- action="http://page-daily.kuaidadi.com/upload/img.node" 线下 -->
             <!-- action="http://star.xiaojukeji.com/upload/img.node" 线上 -->
             <!-- action="http://star.xiaojukeji.com/upload/img.node" 线上 -->
             <!-- action="https://jsonplaceholder.typicode.com/posts/" 原始地址-->
             <!-- action="https://jsonplaceholder.typicode.com/posts/" 原始地址-->
-            <el-button size="small">点击上传</el-button>
+            <!-- <el-button size="small">点击上传</el-button> -->
+            <el-button slot="trigger" size="small" type="primary" @click="createdDis">选取文件</el-button>
+            <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
           </el-upload>
           </el-upload>
         </div>
         </div>
-        <el-form-item class="submit">
-          <el-button size="mini" type="primary" @click="createFormData(form)">提 交</el-button>
-          <el-button class="move-button" size="mini" @click="$router.go(-1)">取 消</el-button>
-        </el-form-item>
+        <div class="cla">
+          <el-table :data="uptataKey" fit style="width: 100%;">
+            <el-table-column label="" min-width="150">
+              <template slot-scope="scope">{{ scope.row.name }}</template>
+            </el-table-column>
+            <el-table-column label="" min-width="300">
+              <template slot-scope="scope"> <a :href="scope.row.url" style="color:blue;">{{ scope.row.url }}</a></template>
+            </el-table-column>
+            <el-table-column fixed="right" label="" width="50" align="center">
+              <!-- <template slot-scope="scope"> -->
+              <div> x </div>
+              <!-- </template> -->
+            </el-table-column>
+          </el-table>
+          <el-form-item class="submit">
+            <el-button :disabled="dis" size="mini" type="primary" @click="createFormData(form)">提 交</el-button>
+            <el-button class="move-button" size="mini" @click="$router.go(-1)">取 消</el-button>
+          </el-form-item>
+        </div>
       </div>
       </div>
       <!-- <div style="flex:1">
       <!-- <div style="flex:1">
         <el-form-item v-show="statusShow" label="问题原因和修复方法" :label-width="formLabelWidth"><el-input v-model="form.reasonsAndSolutionForTheProblem" type="textarea" placeholder="问题原因和修复方法" rows="4" style="width:77.2%;" /></el-form-item>
         <el-form-item v-show="statusShow" label="问题原因和修复方法" :label-width="formLabelWidth"><el-input v-model="form.reasonsAndSolutionForTheProblem" type="textarea" placeholder="问题原因和修复方法" rows="4" style="width:77.2%;" /></el-form-item>
@@ -198,6 +216,8 @@ export default {
       moduleStr: [],
       moduleStr: [],
       stageStr: [],
       stageStr: [],
       fileList: [],
       fileList: [],
+      uptataKey: [],
+      // uptataKey: [{ name: '智慧平台.png', url: 'http://pt-starimg.didistatic.com/static/starimg/node/qo4sKioLko1571277086594.png' }, { name: '智慧平台.png', url: 'http://pt-starimg.didistatic.com/static/starimg/node/qo4sKioLko1571277086594.png' }],
       serviceTypeEnumList: [],
       serviceTypeEnumList: [],
       clientTypeEnumList: [],
       clientTypeEnumList: [],
       bugLevelStr: [{ name: 'p0', value: 0 }, { name: 'p1', value: 1 }, { name: 'p2', value: 2 }, { name: 'p3', value: 3 }],
       bugLevelStr: [{ name: 'p0', value: 0 }, { name: 'p1', value: 1 }, { name: 'p2', value: 2 }, { name: 'p3', value: 3 }],
@@ -227,7 +247,9 @@ export default {
       businessTypeShow: false,
       businessTypeShow: false,
       moduleTypeShow: false,
       moduleTypeShow: false,
       userInformation: localStorage.getItem('username'),
       userInformation: localStorage.getItem('username'),
-      userNames: localStorage.getItem('realname')
+      userNames: localStorage.getItem('realname'),
+      accessory: '',
+      dis: false
     }
     }
   },
   },
   created() {
   created() {
@@ -235,8 +257,22 @@ export default {
     this.taskIdGet()
     this.taskIdGet()
   },
   },
   methods: {
   methods: {
-    handleChange(file, fileList) {
+    createdDis() {
+      this.dis = true
+    },
+    submitUpload() {
+      this.$refs.upload.submit()
+      this.$message({ showClose: true, message: '文件正在上传······', type: 'success' })
+    },
+    handleChange(response, file, fileList) {
+      this.fileDbList = []
       this.fileList = fileList.slice(-3)
       this.fileList = fileList.slice(-3)
+      for (var a of this.fileList) {
+        this.fileDbList.push({ 'name': a.name, 'url': 'http:' + a.response.url })
+      }
+      this.accessory = JSON.stringify(this.fileDbList)
+      this.dis = false
+      this.$message({ showClose: true, message: '文件上传成功', type: 'success' })
     },
     },
     async _initBegin() {
     async _initBegin() {
       await bugGetEnum().then(res => {
       await bugGetEnum().then(res => {
@@ -258,6 +294,11 @@ export default {
       })
       })
       bugGet(this.$route.query.id).then(res => {
       bugGet(this.$route.query.id).then(res => {
         this.form = res.data
         this.form = res.data
+        var str = res.data.accessory
+        var obj = JSON.parse(str.split('{}')[0])
+        for (var a of obj) {
+          this.uptataKey.push(a)
+        }
         this.platformTypeStr = this.bizOptions.filter(value => value.code === this.form.bizId)[0].child
         this.platformTypeStr = this.bizOptions.filter(value => value.code === this.form.bizId)[0].child
         if (this.form.clientType) {
         if (this.form.clientType) {
           this.businessTypeShow = true
           this.businessTypeShow = true
@@ -311,6 +352,7 @@ export default {
       this.$refs.form.validate((valid) => {
       this.$refs.form.validate((valid) => {
         if (valid) {
         if (valid) {
           form.reopenTimes = parseInt(form.reopenTimes)
           form.reopenTimes = parseInt(form.reopenTimes)
+          form.accessory = this.accessory
           this.userData = { id: '', ename: this.userInformation, name: this.userNames }
           this.userData = { id: '', ename: this.userInformation, name: this.userNames }
           this.objData = { bugBaseInfo: form, user: this.userData }
           this.objData = { bugBaseInfo: form, user: this.userData }
           bugUpdate(this.objData).then(res => {
           bugUpdate(this.objData).then(res => {
@@ -329,6 +371,11 @@ export default {
   }
   }
 }
 }
 </script>
 </script>
+<style>
+ .cla .el-table td {
+    padding:0px;
+  }
+</style>
 
 
 <style lang="stylus" scoped>
 <style lang="stylus" scoped>
   .set-background
   .set-background

+ 317 - 0
src/views/Platform/setUp/bizPage.vue

@@ -0,0 +1,317 @@
+<template>
+  <!-- 业务线 -->
+  <div class="set-background">
+    <div class="block">
+      <el-form :model="bizForm">
+        <div class="set-head">
+          业务线<el-input v-model="bizForm.bizName" clearable placeholder="请填写业务线" style="margin-left:10px;width:45%;" />
+          <div style="float:right">
+            <el-button type="primary" @click="queryBizList(bizForm)">搜索</el-button>
+            <el-button type="primary" plain @click="handleaddBiz()">新增</el-button>
+          </div>
+        </div>
+      </el-form>
+      <div class="set-locate">
+        <el-table :key="tableKey" v-loading="listLoading" :data="bizData" fit highlight-current-row style="width: 100%;" border :header-cell-style="{background:'#F0F2F4',color:'#606266'}">
+          <el-table-column prop="id" label="序号" min-width="36px" align="center"><template slot-scope="scope"><span>{{ scope.row.id }}</span></template></el-table-column>
+          <!-- <el-table-column label="序号" prop="id" min-width="35px" align="center" /> -->
+          <el-table-column label="业务线" prop="bizName" min-width="140px" align="center">
+            <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff">{{ scope.row.bizName }}</a></template>
+          </el-table-column>
+          <el-table-column prop="modifier" label="操作人" min-width="140px" align="center"><template slot-scope="scope"><span>{{ scope.row.modifier }}</span></template> </el-table-column>
+          <!-- <el-table-column label="操作人" prop="modifier" min-width="140px" align="center" /> -->
+          <el-table-column label="操作" align="center" min-width="180px" class-name="small-padding fixed-width">
+            <template slot-scope="{row}">
+              <el-button type="primary" size="mini" @click="handelEditBiz(row)">编辑</el-button>
+              <el-button type="danger" size="mini" @click="handelDeleteBiz(row)">删除</el-button>
+
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <el-dialog :title="titleName" width="40%" :visible.sync="dialogFormVisible">
+          <div style="margin-left:30px">
+            <el-form ref="addBizForms" :rules="addBizDataRules" :model="addBizData">
+              <el-form-item label="业务线ID" prop="id">
+                <el-input v-model="addBizData.id" :disabled="idUnvisible" placeholder="请填写" style="margin-left:7px;width:60%;" />
+              </el-form-item>
+              <el-form-item label="业务线名称" prop="bizName">
+                <el-input v-model="addBizData.bizName" placeholder="请填写" style="margin-left:-3px;margin-top:10px;width:60%;" />
+              </el-form-item>
+            </el-form>
+          </div>
+          <div align="center" style="margin-top:18px">
+            <el-button type="info" plain size="mini" @click="dialogFormVisible=false">取消</el-button>
+            <el-button type="primary" size="mini" @click="titleName === '新增' ? addBizType(addBizData) :editBizType(addBizData)">确定</el-button>
+          </div>
+          <div style="margin-top:6%" />
+        </el-dialog>
+
+        <el-dialog :visible.sync="dialogDeleteVisible" width="30%">
+          <div align="center" style="margin-top:-6%">
+            <b>确定要删除这条业务线吗?</b>
+          </div>
+          <div align="center" style="margin-top:38px">
+            <el-button type="primary" size="mini" @click="deleteBizType()">确定</el-button>
+            <el-button type="danger" size="mini" @click="dialogDeleteVisible=false,idUnvisible = false">取消</el-button>
+          </div>
+          <div style="margin-top:4%" />
+        </el-dialog>
+
+        <!-- <el-pagination
+          v-show="total>0"
+          align="center"
+          background
+          :page.sync="bizData.curIndex"
+          :limit.sync="bizData.pageSize"
+          layout="prev, pager, next"
+          :total="total"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+        /> -->
+
+        <el-pagination style="margin-top:30px;" align="center" :current-page="curIndex" :page-sizes="[5, 10, 20]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
+      </div>
+
+    </div>
+  </div></template>
+
+<script>
+import { addBiz, updateBiz, deleteBiz, queryBizTypeList } from '@/api/bizPage'
+import waves from '@/directive/waves' // waves directive
+// import Pagination from '@/components/Pagination'
+import { } from '@/utils'
+
+var envSelections = []
+var consumerSelections = []
+
+export default {
+  name: 'BizPage',
+  // components: { Pagination },
+  // components: { Pagination },
+  directives: { waves },
+  filters: {
+    statusFilter(status) {
+      const statusMap = {
+        1: 'success',
+        draft: 'info',
+        0: 'danger'
+      }
+      return statusMap[status]
+    }
+  },
+  data() {
+    return {
+      userInformation: localStorage.getItem('username'),
+      userName: localStorage.getItem('realname'),
+      userData: '',
+      envSelections,
+      consumerSelections,
+      bizData: [],
+      total: 0,
+      idUnvisible: false,
+      titleName: '',
+      bizForm: {
+        bizName: ''
+      },
+      addBizData: {
+        id: '',
+        bizName: ''
+      },
+      deleteData: {},
+      currentBizData: [],
+      tableKey: 0,
+      curIndex: 0,
+      pageSize: 10,
+      listLoading: true,
+      dialogFormVisible: false,
+      dialogDeleteVisible: false,
+      dialogName: '业务线名称',
+      addBizDataRules: {
+        id: [{ required: true, message: 'id不能为空', trigger: 'change' }],
+        bizName: [{ required: true, message: '业务线名称不能为空', trigger: 'change' }]
+      }
+
+    }
+  },
+
+  created() {
+    this.getList()
+  },
+  methods: {
+  // 新增业务线
+    handleaddBiz() {
+      this.titleName = '新增'
+      this.dialogFormVisible = true
+      this.idUnvisible = false
+      this.$refs.addBizForms.resetFields()
+      this.$set(this.addBizData, 'id', '')
+      this.$set(this.addBizData, 'bizName', '')
+    },
+    addBizType(ele) {
+      this.$refs['addBizForms'].validate((valid) => {
+        if (valid) {
+          this.addBizData = ele
+          this.addBizData.creator = this.userInformation
+          this.addBizData.modifier = this.userInformation
+          // this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+          // this.bizTypeInfo = { bizTypeInfo: this.addBizData }
+          addBiz(this.addBizData).then(response => {
+            console.log(response)
+            if (response.code === 200) {
+              this.getList()
+              this.successFun()
+              this.dialogFormVisible = false
+            } else {
+              this.errorFun()
+            }
+          })
+        }
+      })
+    },
+    // 进首页
+    getList() {
+      this.listLoading = true
+      this.indexPage = {
+        pageSize: this.pageSize,
+        curIndex: this.curIndex - 1
+      }
+      queryBizTypeList(this.indexPage).then(response => {
+        this.bizData = response.data.list
+        this.total = 10
+        this.listLoading = false
+      })
+    },
+
+    // 查看
+    queryBizList(ele) {
+      this.bizForm.bizName = ele.bizName
+      // this.bizForm.pageSize = this.pageSize
+      // this.bizForm.curIndex = this.curIndex
+      // this.bizTypeInfo = { bizTypeInfo: this.bizForm }
+      console.log(ele)
+      queryBizTypeList(this.bizForm).then(response => {
+        if (response.code === 200) {
+          // this.getMyDevicesList()
+          this.bizData = response.data.list
+          this.dialogFormVisible = false
+        } else {
+          this.errorFun()
+        }
+      })
+    },
+    // 删除
+    handelDeleteBiz(ele) {
+      this.addBizData = ele
+      this.dialogDeleteVisible = true
+    },
+    deleteBizType() {
+      console.log(typeof (this.addBizData.id))
+      var bizIds = [this.addBizData.id]
+      // bizIds.push(this.addBizData.id)
+      this.deleteData.modifier = this.userInformation
+      this.deleteData.bizIds = bizIds
+      deleteBiz(this.deleteData).then(response => {
+        if (response.code === 200) {
+          this.successFun()
+          this.dialogDeleteVisible = false
+          this.getList()
+          this.bizData = response.data.list
+        } else {
+          this.errorFun()
+          // this.dialogDeleteVisible = false
+        }
+      })
+    },
+
+    // 编辑
+    handelEditBiz(ele) {
+      this.addBizData = Object.assign({}, ele)
+      this.titleName = '编辑'
+      this.dialogFormVisible = true
+      this.idUnvisible = true
+      this.$refs.addBizForms.resetFields()
+      console.log(ele)
+    },
+    editBizType(ele) {
+      this.$refs['addBizForms'].validate((valid) => {
+        if (valid) {
+          var myDate = new Date()
+
+          this.addBizData = ele
+          this.addBizData.modifyTime = myDate
+          this.addBizData.modifier = this.userInformation
+          // this.bizTypeInfo = { bizTypeInfo: this.addBizData }
+          updateBiz(this.addBizData).then(response => {
+            console.log(response)
+            if (response.code === 200) {
+              this.getList()
+              this.successFun()
+              this.dialogFormVisible = false
+            } else {
+              this.errorFun()
+            }
+          })
+        }
+      })
+    },
+
+    handleSizeChange(size) {
+      this.pageSize = size
+      this.getList()
+    },
+    handleCurrentChange(curIndex) {
+      this.curIndex = curIndex
+      this.getList()
+    },
+
+    clearValidate(formName) {
+      this.$refs[formName].clearValidate()
+    },
+
+    successFun() {
+      this.$notify({ title: 'Success', message: 'Created Successfully', type: 'success', duration: 5000 })
+    },
+    errorFun() {
+      this.$notify({ title: 'Failed', message: 'Created Failed', type: 'error', duration: 5000 })
+    }
+  }
+}
+</script>
+<style lang="stylus" scoped>
+  .set-background
+    background-color #F1F4F7
+    display flex
+    justify-content center
+    min-width 700px
+    .setPercent >>> .el-dialog__body
+      width 100%
+    .block
+      background-color rgba(255,255,255,1)
+      box-shadow 0px 0px 11px 0px rgba(238,240,245,1)
+      border-radius 7px
+      width 93%
+      margin 25px 0
+      padding 20px
+      min-height calc(100vh - 100px)
+    .set-head
+      font-size 13px
+      width 100%
+      color #333B4A
+      white-space nowrap
+    .set-dialogfont
+      font-size 13px
+      .set-dialogfont >>> .el-input
+        width 70%
+    // .set-between
+    //   display flex
+    // .set-between >>> .el-button
+      // height 40px
+    .set-locate
+      margin-top 25px
+      // border-bottom 1px solid #BFC6DC
+      // border-left 1px solid #BFC6DC
+      // border-top 1px solid #BFC6DC
+      // border-right 1px solid #BFC6DC
+
+</style>

+ 359 - 0
src/views/Platform/setUp/teamPage.vue

@@ -0,0 +1,359 @@
+<template>
+  <el-container>
+    <el-aside width="150pt">
+      <el-tree
+        style="background: #E9EEF3; height:110vh; padding:15%;"
+        :data="bizOptions"
+        node-key="id"
+        undraggable
+        :highlight-current="true"
+        @node-click="clickFun"
+      />
+    </el-aside>
+    <el-container>
+      <el-header style="height: auto; text-align:left">
+        <div style="margin: 4%;">
+          <el-input v-model="form.name" clearable filterable placeholder="姓名" style="width:22%;margin-right:5px;" />
+          <el-input v-model="form.email" clearable filterable placeholder="邮箱" style="width:22%;margin-right:5px;" />
+          <el-select v-model="form.role" width="200" clearable placeholder="请选择角色">
+            <el-option v-for="item in roleStrings" :key="item.value" :label="item.name" :value="item.name" />
+          </el-select>
+          <el-button type="primary" style="margin-left:8%;" @click="queryList(form)">查询</el-button>
+          <el-button type="primary" @click="createGetShow">新增</el-button>
+        </div>
+
+        <el-dialog :title="titleName" width="40%" :visible.sync="dialogFormVisible">
+          <el-form ref="MemberData" :model="MemberData" status-icon :rules="serviceDataRules" label-width="60px">
+            <el-form-item v-show="hide" label="id" prop="Id" :label-width="formLabelWidths">
+              <el-input v-model="MemberData.id" autocomplete="off" style="width:75%" :disabled="true" />
+            </el-form-item>
+            <el-form-item label="姓名" prop="name" :label-width="formLabelWidths">
+              <el-input v-model="MemberData.name" autocomplete="off" style="width:75%" />
+            </el-form-item>
+            <el-form-item label="邮箱" prop="email" :label-width="formLabelWidths">
+              <el-input v-model="MemberData.email" autocomplete="off" style="width:75%" />
+            </el-form-item>
+            <el-form-item label="业务线" prop="bizId" :label-width="formLabelWidths">
+              <el-select v-model="MemberData.bizId" placeholder="请选择业务线" style="width:75%">
+                <el-option v-for="item in bizOptions" :key="item.value" :label="item.label" :value="item.value" />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="角色" prop="role" :label-width="formLabelWidths">
+              <el-select v-model="MemberData.role" placeholder="请选择角色" style="width:75%">
+                <el-option v-for="item in roleStrings" :key="item.value" :label="item.name" :value="item.name" />
+              </el-select>
+            </el-form-item>
+          </el-form>
+          <div slot="footer" class="dialog-footer">
+            <el-button @click="dialogFormVisible = false,clickClose()">关 闭</el-button>
+            <el-button v-show="Determine" type="primary" @click="titleName === '新增'?createMembers(MemberData):updateData(MemberData)">确 定</el-button>
+          </div>
+        </el-dialog>
+      </el-header>
+      <el-table :data="list" style="width: 100%; height:570vh;" row-key="id" lazy align="center">
+        <el-table-column prop="id" label="ID" width="150" align="center"><template slot-scope="scope"><span>{{ scope.row.id }}</span></template></el-table-column>
+        <el-table-column prop="name" label="姓名" width="180" align="center"><template slot-scope="scope"><span>{{ scope.row.name }}</span></template> </el-table-column>
+        <el-table-column label="team" width="180" align="center"><template slot-scope="scope"><span>{{ scope.row.teamId }}</span></template></el-table-column>
+        <el-table-column label="邮箱" width="180" align="center"><template slot-scope="scope"><span>{{ scope.row.email }}</span></template></el-table-column>
+        <el-table-column prop="role" label="角色" width="150" align="center"><template slot-scope="scope"><span>{{ scope.row.role }}</span></template></el-table-column>
+        <el-table-column label="操作" align="center" min-width="220px" fixed="right">
+          <template slot-scope="{row}">
+            <el-button size="mini" type="primary" @click="dialogFormVisible = true,queryData(row)">查看</el-button>
+            <el-button size="mini" type="primary" @click="dialogFormVisible = true,changeData(row)">编辑</el-button>
+            <el-button size="mini" type="primary" @click="deleteCodeData(row)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-footer>
+        <el-pagination :current-page="curIndex" :page-sizes="[5, 10, 20]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" align="center" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
+      </el-footer>
+    </el-container>
+  </el-container>
+</template>
+
+<script>
+import { createMembers, updateMembers, deleteMembers, getMemberList } from '@/api/teamPage.js'
+
+const operateType = {
+  OPER_ADD: 1, // 新增
+  OPER_EDIT: 2, // 编辑
+  OPER_QUERY: 3 // 查看
+}
+export default {
+  name: 'TeamPage',
+  data() {
+    return {
+      centerDialogVisible: false,
+      dialogFormVisible: false,
+      Determine: true,
+      hide: true,
+      radioButton: 0,
+      titleName: '',
+      parameter: '',
+      startId: '',
+      startName: '',
+      parentFolderId: '',
+      formLabelWidths: '120px',
+      roleStrings: [{ value: 1, name: 'rd' }, { value: 2, name: 'qa' }, { value: 3, name: 'pm' }, { value: 4, name: 'other' }],
+      bizOptions: [{ label: '滴滴代驾', value: 261 }, { label: '企业级', value: 100 }, { label: 'prado', value: 330 }, { label: 'carbo', value: 331 }, { label: '海马', value: 309 }, { label: '万象', value: 102 }],
+      userInformation: localStorage.getItem('username'),
+      userNames: localStorage.getItem('realname'),
+      bizId: '',
+      curIndex: 1, // 初始页
+      pageSize: 10, // 每页的数据
+      total: 0,
+      userData: '',
+      folderName: '',
+      list: [],
+      form: {},
+      queryListData: {},
+      bizData: {},
+      MemberData: {
+        bizId: '',
+        teamId: '',
+        email: '',
+        role: '',
+        name: ''
+      },
+      formData: {
+        bizId: '',
+        teamId: '',
+        role: '',
+        email: '',
+        name: ''
+
+      },
+      serviceDataRules: {
+        name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
+        bizId: [{ required: true, message: '业务线不能为空', trigger: 'change' }],
+        teamId: [{ required: true, message: '业务线不能为空', trigger: 'change' }],
+        role: [{ required: true, message: '角色不能为空', trigger: 'change' }],
+        email: [{ required: true, message: '邮箱不能为空', trigger: 'blur' }]
+      },
+      defaultProps: {
+        children: 'children',
+        label: 'label'
+      },
+      multipleSelection: []
+    }
+  },
+  created() {
+    this.getAllList()
+  },
+
+  methods: {
+    updateDetailDialog(type) {
+      if (type === operateType.OPER_ADD) {
+        this.Determine = true
+        this.hide = false
+      } else if (type === operateType.OPER_EDIT) {
+        this.hide = true
+        this.Determine = true
+      } else if (type === operateType.OPER_QUERY) {
+        this.hide = true
+        this.Determine = false
+      }
+    },
+    handleSizeChange(size) {
+      this.pageSize = size
+      this.getAllList({
+        pageSize: this.pageSize,
+        curIndex: this.curIndex
+      })
+    },
+    handleCurrentChange(curIndex) {
+      this.curIndex = curIndex
+      this.getAllList({
+        pageSize: this.pageSize,
+        curIndex: this.curIndex
+      })
+    },
+    submitForm(formName) {
+      this.$refs[formName].validate(valid => {
+        if (valid) {
+          alert('submit!')
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    resetForm(formName) {
+      this.$refs[formName].resetFields()
+    },
+
+    // 全部列表
+    getAllList() {
+      var indexPage = {
+        pageSize: this.pageSize,
+        curIndex: this.curIndex
+      }
+      getMemberList(indexPage).then(res => {
+        this.list = res.data
+        for (var a of this.list) {
+          var b = a.teamId
+          for (var c of this.bizOptions) {
+            b === c ? b = c.label : ''
+          }
+        }
+        this.total = res.total
+      })
+    },
+
+    // 查看成员详情
+    queryData(vel) {
+      this.titleName = '查看详情'
+      this.MemberData = vel
+      this.updateDetailDialog(3)
+    },
+
+    // 查询
+    queryList(val) {
+      console.log(val)
+      getMemberList(val).then(res => {
+        this.list = res.data
+        // this.form = {}
+      })
+    },
+
+    deleteCodeData(e) {
+      this.$confirm('确定删除吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.handleDelete(e)
+        this.$message({ type: 'success', message: '删除成功!' })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        })
+      })
+    },
+
+    // 删除
+    handleDelete(e) {
+      this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+      deleteMembers(e.id, this.userData).then(response => {
+        if (response.code === 200) {
+          this.getAllList()
+          // this.queryList({ 'teamId': e.teamId })
+          this.successFun()
+        } else {
+          this.errorFun(response.msg)
+        }
+      })
+    },
+
+    // 编辑
+    changeData(vel) {
+      console.log(vel)
+      this.titleName = '编辑'
+      this.MemberData = vel
+      this.updateDetailDialog(2)
+    },
+
+    updateData(vel) {
+      if (vel === this.MemberData) {
+        this.bizData = {
+          name: vel.name,
+          id: vel.id,
+          role: vel.role,
+          email: vel.email,
+          teamId: vel.bizId,
+          bizId: vel.bizId
+        }
+      } else {
+        this.bizData = vel
+        this.bizData.name = vel.name
+        this.bizData.role = vel.role
+        this.bizData.email = vel.email
+        this.bizData.teamId = vel.teamId
+        this.bizData.bizId = vel.bizId
+      }
+      this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+      this.objData = { teamMembersInfo: this.bizData, user: this.userData }
+      updateMembers(this.objData).then(response => {
+        if (response.code === 200) {
+          this.dialogFormVisible = false
+          this.successFun()
+          this.getAllList()
+        } else {
+          this.errorFun()
+        }
+      })
+    },
+    // 新增需提示选择目录
+    createGetShow() {
+      this.titleName = '新增'
+      if (this.startId === '') {
+        this.$notify({ title: '提示', message: '请选择目录', duration: 2000 })
+      } else {
+        this.MemberData = {}
+        this.dialogFormVisible = true
+        this.$nextTick(() => {
+          this.$refs['MemberData'].clearValidate()
+        })
+        this.updateDetailDialog(1)
+      }
+    },
+    clickFun(e) {
+      console.log(e)
+      this.startId = e.value
+      this.startName = e.label
+      getMemberList({ teamId: e.value }).then(res => {
+        this.list = res.data
+      })
+    },
+
+    clickClose() {
+      this.startId = ''
+    },
+
+    // 新增
+    createMembers(vel) {
+      this.$refs['MemberData'].validate((valid) => {
+        if (valid) {
+          if (vel !== '') {
+            this.bizData = {
+              name: vel.name,
+              id: vel.id,
+              role: vel.role,
+              email: vel.email,
+              teamId: this.startId,
+              bizId: vel.bizId
+            }
+          }
+          this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+          this.objData = { teamMembersInfo: this.bizData, user: this.userData }
+          createMembers(this.objData).then(response => {
+            if (response.code === 200) {
+              this.dialogFormVisible = false
+              this.successFun()
+              this.getAllList()
+            } else {
+              this.errorFun()
+            }
+          })
+        } else {
+          return false
+        }
+      })
+    },
+
+    successFun() {
+      this.$notify({ title: 'Success', message: 'Created Successfully', type: 'success', duration: 5000 })
+    },
+    errorFun() {
+      this.$notify({ title: 'Failed', message: 'Created Failed', type: 'error', duration: 5000 })
+    }
+  }}
+
+</script>
+
+<style>
+.headerStyle {
+  margin: 10px;
+}
+</style>

+ 3 - 0
src/views/Platform/setUp/testa.vue

@@ -0,0 +1,3 @@
+<template>
+  <router-view />
+</template>