qinzhipeng_v 5 lat temu
rodzic
commit
91e8d1a699

+ 56 - 0
src/api/modulePage.js

@@ -0,0 +1,56 @@
+import request from '@/utils/request'
+import { mockUrl } from '@/apiConfig/api'
+
+// 新增业务线
+export function addBizModule(data) {
+  return request({
+    url: mockUrl + `/setting/addBizModule`,
+    method: 'post',
+    data
+  })
+}
+
+// 修改
+export function updateBizModule(data) {
+  return request({
+    url: mockUrl + `/setting/updateBizModule`,
+    method: 'post',
+    data
+  })
+}
+
+// 删除
+export function deleteBizModule(data) {
+  return request({
+    url: mockUrl + `/setting/deleteBizModule`,
+    method: 'post',
+    data
+  })
+}
+
+// 查看列表
+export function queryBizModuleList(data) {
+  return request({
+    url: mockUrl + `/setting/queryBizModuleList`,
+    method: 'post',
+    data
+  })
+}
+
+// 获取biz列表
+export function queryBizTypeList(data) {
+  return request({
+    url: mockUrl + `/setting/queryBizTypeList`,
+    method: 'post',
+    data
+  })
+}
+
+// 平台列表
+export function queryPlatFormTypeList(data) {
+  return request({
+    url: mockUrl + `/setting/queryPlatFormTypeList`,
+    method: 'post',
+    data
+  })
+}

+ 47 - 0
src/api/platformPage.js

@@ -0,0 +1,47 @@
+import request from '@/utils/request'
+import { mockUrl } from '@/apiConfig/api'
+
+// 新增业务线
+export function addPlatFormType(data) {
+  return request({
+    url: mockUrl + `/setting/addPlatFormType`,
+    method: 'post',
+    data
+  })
+}
+
+// 修改
+export function updatePlatFormType(data) {
+  return request({
+    url: mockUrl + `/setting/updatePlatFormType`,
+    method: 'post',
+    data
+  })
+}
+
+// 删除
+export function deletePlatFormType(data) {
+  return request({
+    url: mockUrl + `/setting/deletePlatFormType`,
+    method: 'post',
+    data
+  })
+}
+
+// 查看列表
+export function queryPlatFormTypeList(data) {
+  return request({
+    url: mockUrl + `/setting/queryPlatFormTypeList`,
+    method: 'post',
+    data
+  })
+}
+
+// 获取biz列表
+export function queryBizTypeList(data) {
+  return request({
+    url: mockUrl + `/setting/queryBizTypeList`,
+    method: 'post',
+    data
+  })
+}

+ 53 - 0
src/api/projectTypePage.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+import { mockUrl } from '@/apiConfig/api'
+
+// 新增
+export function createModule(data) {
+  return request({
+    url: mockUrl + `/setting/createModule`,
+    method: 'post',
+    data
+  })
+}
+
+// 修改
+export function updateModule(data) {
+  return request({
+    url: mockUrl + `/setting/updateModule`,
+    method: 'post',
+    data
+  })
+}
+
+// 删除
+export function deleteModules(data) {
+  return request({
+    url: mockUrl + `/setting/deleteModules`,
+    method: 'post',
+    data
+  })
+}
+
+// 查看列表
+export function queryModuleInfoList(data) {
+  return request({
+    url: mockUrl + `/setting/queryModuleInfoList`,
+    method: 'post',
+    data
+  })
+}
+
+// 查看列表
+export function queryModuleInfoListByModuleName(data) {
+  return request({
+    url: mockUrl + `/setting/queryModuleInfoListByModuleName`,
+    method: 'post',
+    data
+  })
+}
+export function getTypeMap() {
+  return request({
+    url: mockUrl + `/setting/getTypeMap`,
+    method: 'get'
+  })
+}

+ 35 - 34
src/router/index.js

@@ -257,46 +257,47 @@ export const constantRoutes = [
         // component: Layout,
         name: '设置',
         // meta: { title: '设置' },
-        component: () =>
-            import('@/views/Platform/setUp/testa'),
+        component: () => import('@/views/Platform/setUp/testa'),
         meta: { title: '设置' },
         children: [{
-          path: 'bizPage',
-          name: '业务线',
-          // hidden: true,
-          component: () =>
-                    import('@/views/Platform/setUp/bizPage'),
-          meta: { title: '业务线' }
+          path: 'systemSetup',
+          name: '系统设置',
+          component: () => import('@/views/Platform/setUp/systemSetup/testa'),
+          meta: { title: '系统设置' },
+          children: [{
+            path: 'bizPage',
+            name: '业务线',
+            // hidden: true,
+            component: () => import('@/views/Platform/setUp/systemSetup/bizPage'),
+            meta: { title: '业务线' }
+          },
+          {
+            path: 'platformPage',
+            name: '平台类型',
+            // hidden: true,
+            component: () => import('@/views/Platform/setUp/systemSetup/platformPage'),
+            meta: { title: '平台类型' }
+          },
+          {
+            path: 'modulePage',
+            name: '业务模块',
+            // hidden: true,
+            component: () => import('@/views/Platform/setUp/systemSetup/modulePage'),
+            meta: { title: '业务模块' }
+          },
+          {
+            path: 'projectPage',
+            name: '工程模块',
+            hidden: true,
+            component: () => import('@/views/Platform/setUp/systemSetup/projectPage'),
+            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'),
+          component: () => import('@/views/Platform/setUp/teamPage'),
           meta: { title: '团队设置' }
         }
         ]

+ 2 - 2
src/views/Platform/presentation/testPresenyL.vue

@@ -178,14 +178,14 @@ export default {
       var canvas = document.createElement('canvas') // 创建一个canvas节点
       const contentWidth = shareContent.offsetWidth
       const contentHeight = shareContent.offsetHeight
-      var scale = 5 // 定义任意放大倍数 支持小数
+      var scale = 7 // 定义任意放大倍数 支持小数
       canvas.width = contentWidth * scale// 定义canvas 宽度 * 缩放
       canvas.height = contentHeight * scale// 定义canvas高度 *缩放
       canvas.getContext('2d').scale(scale, scale) // 获取context,设置scale
       var opts = {
         scale: scale, // 添加的scale 参数
         canvas: canvas, // 自定义 canvas
-        width: 1200, // dom 原始宽度
+        width: 2000, // dom 原始宽度
         height: 1800 // dom 原始高度
       }
       html2canvas(shareContent, opts).then(function(canvas) {

+ 5 - 3
src/views/Platform/setUp/bizPage.vue → src/views/Platform/setUp/systemSetup/bizPage.vue

@@ -4,7 +4,7 @@
     <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%;" />
+          业务线<el-input v-model="bizForm.bizName" clearable placeholder="请填写业务线" style="margin-left:10px;width:45%;" @keyup.enter.native="queryBizList(bizForm)" />
           <div style="float:right">
             <el-button type="primary" @click="queryBizList(bizForm)">搜索</el-button>
             <el-button type="primary" plain @click="handleaddBiz()">新增</el-button>
@@ -36,7 +36,7 @@
                 <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-input v-model="addBizData.bizName" placeholder="请填写" style="margin-left:-5px;margin-top:-10px;width:60%;" />
               </el-form-item>
             </el-form>
           </div>
@@ -147,6 +147,7 @@ export default {
       this.$refs.addBizForms.resetFields()
       this.$set(this.addBizData, 'id', '')
       this.$set(this.addBizData, 'bizName', '')
+      this.addBizData = {}
     },
     addBizType(ele) {
       this.$refs['addBizForms'].validate((valid) => {
@@ -178,7 +179,7 @@ export default {
       }
       queryBizTypeList(this.indexPage).then(response => {
         this.bizData = response.data.list
-        this.total = 10
+        this.total = response.data.total
         this.listLoading = false
       })
     },
@@ -194,6 +195,7 @@ export default {
         if (response.code === 200) {
           // this.getMyDevicesList()
           this.bizData = response.data.list
+          this.total = response.data.total
           this.dialogFormVisible = false
         } else {
           this.errorFun()

+ 402 - 0
src/views/Platform/setUp/systemSetup/modulePage.vue

@@ -0,0 +1,402 @@
+<template>
+  <!-- 业务模块 -->
+  <div class="set-background">
+    <div class="block">
+      <el-form :model="moduleForm">
+        <div class="set-head">
+          业务模块<el-input v-model="moduleForm.bizModuleName" clearable placeholder="请填写" style="margin-left:10px;width:18%;" /> &nbsp;&nbsp;
+          业务线<el-select v-model="moduleForm.bizId" placeholder="请选择" filterable clearable style="margin-left:10px;width:18%;" @change="choosePlatType()">
+            <el-option v-for="item in bizData" :key="item.id" :label="item.bizName" :value="item.id" />
+          </el-select>
+          平台类型<el-select v-model="moduleForm.platId" placeholder="请选择" filterable clearable style="margin-left:10px;width:18%;">
+            <el-option v-for="item in platData1" :key="item.id" :label="item.platName" :value="item.id" />
+          </el-select>
+          <div style="float:right">
+            <el-button type="primary" @click="queryModuleList(moduleForm)">查询</el-button>
+            <el-button type="primary" plain @click="handleaddModule()">新增</el-button>
+          </div>
+        </div>
+      </el-form>
+      <div class="set-locate">
+        <el-table :key="tableKey" :data="moduletData" fit highlight-current-row style="width: 100%;" border :header-cell-style="{background:'#F0F2F4',color:'#606266'}">
+          <el-table-column label="序号" prop="id" min-width="40px" align="center"><template slot-scope="scope"><span>{{ scope.row.id }}</span></template> </el-table-column>
+          <el-table-column label="业务模块" prop="bizModuleName" align="center" min-width="100">
+            <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff">{{ scope.row.bizModuleName }}</a></template>
+          </el-table-column>
+          <el-table-column label="平台类型" prop="platName" min-width="70px" align="center"><template slot-scope="scope"><span>{{ scope.row.platName }}</span></template> </el-table-column>
+          <el-table-column label="业务线" prop="bizName" min-width="70px" align="center"><template slot-scope="scope"><span>{{ scope.row.bizName }}</span></template> </el-table-column>
+          <el-table-column label="端类型" prop="clientType" min-width="120px" align="center"><template slot-scope="{row}"><span>{{ statusMaps.get(row.clientType) }}</span></template> </el-table-column>
+          <el-table-column label="操作人" prop="modifier" min-width="70px" align="center"><template slot-scope="scope"><span>{{ scope.row.modifier }}</span></template> </el-table-column>
+          <el-table-column label="操作" align="center" min-width="150px" class-name="small-padding fixed-width">
+            <template slot-scope="{row}">
+              <el-button type="primary" size="mini" @click="handelEditModule(row)">编辑</el-button>
+              <el-button type="danger" size="mini" @click="handelDeleteModule(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="addModuleForms" :rules="addModuleDataRules" :model="addModuleForm">
+              <el-form-item label="业务模块" prop="bizModuleName">
+                <el-input v-model="addModuleForm.bizModuleName" placeholder="请填写" style="margin-left:7px;width:60%;" />
+              </el-form-item>
+              <el-form-item label="业务线" prop="bizId">
+                <el-select v-model="addModuleForm.bizId" placeholder="请选择" filterable clearable style="margin-left:20px;width:60%;" @change="getPlatType()">
+                  <el-option v-for="item in bizData" :key="item.id" :label="item.bizName" :value="item.id" />
+                </el-select>
+              </el-form-item>
+              <el-form-item label="平台类型" prop="platId">
+                <el-select v-model="addModuleForm.platId" placeholder="请选择" filterable clearable style="margin-left:7px;width:60%;" @change="changePlat()">
+                  <el-option v-for="item in platData" :key="item.id" :label="item.platName" :value="item.id" />
+                </el-select>
+              </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 === '新增' ? addModuleType(addModuleForm) :editModuleType(addModuleForm)">确定</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="deleteModuleType()">确定</el-button>
+            <el-button type="danger" size="mini" @click="dialogDeleteVisible=false">取消</el-button>
+          </div>
+          <div style="margin-top:4%" />
+        </el-dialog>
+        <div>
+          <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>
+  </div></template>
+
+<script>
+import { addBizModule, updateBizModule, deleteBizModule, queryBizModuleList, queryBizTypeList, queryPlatFormTypeList } from '@/api/modulePage'
+import waves from '@/directive/waves' // waves directive
+
+var envSelections = []
+var consumerSelections = []
+
+export default {
+  name: 'ModulePage',
+  // 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'),
+      statusMaps: new Map([[1, '服务端 '], [2, '客户端']]),
+      clientOptions: [{
+        value: 1,
+        label: '服务端'
+      }, {
+        value: 2,
+        label: '客户端'
+      }, {
+        value: 0,
+        label: '默认选项'
+      }],
+      userData: '',
+      envSelections,
+      addModuleForm: {},
+      consumerSelections,
+      bizData: [],
+      total: 0,
+      titleName: '',
+      bizForm: {
+        bizName: ''
+      },
+      moduleForm: {
+        platId: '',
+        bizId: '',
+        bizModuleName: ''
+      },
+      platData: [],
+      platData1: [],
+      platType: {},
+      deleteData: {},
+      moduletData: {},
+      addModuleData: {},
+      currentBizData: [],
+      tableKey: 0,
+      curIndex: 0,
+      pageSize: 10,
+      listLoading: true,
+      dialogFormVisible: false,
+      dialogDeleteVisible: false,
+      // dialogName: '业务线名称',
+      addModuleDataRules: {
+        bizModuleName: [{ required: true, message: '业务类型不能为空', trigger: 'change' }],
+        platId: [{ required: true, message: '平台类型不能为空', trigger: 'change' }],
+        bizId: [{ required: true, message: '业务线不能为空', trigger: 'change' }]
+      }
+
+    }
+  },
+
+  created() {
+    this.getBizList()
+    // this.getPlatList()
+    this.getList()
+  },
+  methods: {
+    // 获得biztype
+    getBizList() {
+      this.bizForm.bizName = ''
+      this.bizForm.curIndex = this.curIndex - 1
+      queryBizTypeList(this.bizForm).then(response => {
+        if (response.code === 200) {
+          this.bizData = response.data.list
+        } else {
+          this.errorFun()
+        }
+      })
+    },
+    // 获取平台类型
+    choosePlatType() {
+      // this.listLoading = true
+      this.indexPage = {
+        bizId: this.moduleForm.bizId,
+        pageSize: this.pageSize,
+        curIndex: this.curIndex - 1
+      }
+      queryPlatFormTypeList(this.indexPage).then(response => {
+        this.platData1 = response.data.list
+        this.$set(this.moduleForm, 'platId', '')
+        this.total = response.data.total
+        this.listLoading = false
+      })
+    },
+
+    // 新增获取平台类型
+    getPlatType() {
+      // this.listLoading = true
+      this.indexPage = {
+        bizId: this.addModuleForm.bizId,
+        pageSize: this.pageSize,
+        curIndex: this.curIndex - 1
+      }
+      queryPlatFormTypeList(this.indexPage).then(response => {
+        this.platData = response.data.list
+        // this.$set(this.addModuleForm, 'platId', '')
+        // this.total = response.data.total
+        this.listLoading = false
+      })
+    },
+
+    changePlat() {
+      this.addData = { id: this.addModuleForm.platId }
+      queryPlatFormTypeList(this.addData).then(response => {
+        this.platType = response.data.list
+        console.log(this.platType)
+        console.log(this.platType[0].bizId)
+        this.total = 30
+        this.listLoading = false
+      })
+    },
+
+    // 新增平台类型
+    handleaddModule() {
+      this.titleName = '新增'
+      this.dialogFormVisible = true
+      this.$refs.addModuleForms.resetFields()
+      this.$set(this.addModuleForm, 'bizModuleName', '')
+      this.$set(this.addModuleForm, 'platId', '')
+      this.$set(this.addModuleForm, 'bizId', '')
+      this.addModuleForm = {}
+    },
+    addModuleType(ele) {
+      this.$refs['addModuleForms'].validate((valid) => {
+        if (valid) {
+          this.addModuleForm = ele
+          this.addModuleForm.bizModuleName = ele.bizModuleName
+          this.addModuleForm.platId = ele.platId
+          this.addModuleForm.bizId = ele.bizId
+          this.addModuleForm.clientType = this.platType[0].clientType
+          this.addModuleForm.creator = this.userInformation
+          this.addModuleForm.modifier = this.userInformation
+          addBizModule(this.addModuleForm).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
+      }
+      queryBizModuleList(this.indexPage).then(response => {
+        this.moduletData = response.data.list
+        this.total = response.data.total
+        this.listLoading = false
+      })
+    },
+
+    // 查看
+    queryModuleList(ele) {
+      this.moduleForm.bizModuleName = ele.bizModuleName
+      this.moduleForm.bizId = ele.bizId
+      this.moduleForm.platId = ele.platId
+      // this.bizForm.pageSize = this.pageSize
+      // this.platForm.curIndex = this.curIndex - 1
+      // this.listLoading = true
+      queryBizModuleList(this.moduleForm).then(response => {
+        if (response.code === 200) {
+          // this.getMyDevicesList()
+          this.moduletData = response.data.list
+          this.total = response.data.total
+          this.dialogFormVisible = false
+          // this.listLoading = false
+        } else {
+          this.errorFun()
+        }
+      })
+    },
+    // 删除
+    handelDeleteModule(ele) {
+      this.dialogDeleteVisible = true
+      this.addModuleForm = ele
+    },
+    deleteModuleType() {
+      var bizModuleIds = [this.addModuleForm.id]
+      this.deleteData.modifier = this.userInformation
+      this.deleteData.bizModuleIds = bizModuleIds
+      deleteBizModule(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
+        }
+      })
+    },
+
+    // 编辑
+    handelEditModule(ele) {
+      // 不能直接赋值变量,使用Object.assign复制一级属性(注意Object.assign不算完全的深拷贝)
+      this.addModuleForm = Object.assign({}, ele)
+      // this.addModuleForm = JSON.parse(JSON.stringify(ele))
+      this.titleName = '编辑'
+      this.getPlatType()
+      this.dialogFormVisible = true
+      this.$refs.addModuleForms.resetFields()
+      this.$set(this.platData, [])
+      console.log(ele)
+    },
+    editModuleType(ele) {
+      this.$refs['addModuleForms'].validate((valid) => {
+        if (valid) {
+          var myDate = new Date()
+          this.addModuleForm = ele
+          this.addModuleForm.bizModuleName = ele.bizModuleName
+          this.addModuleForm.platId = ele.platId
+          // this.addModuleForm.platName = this.platData.filter((value) => value.code === ele.platId)
+          this.addModuleForm.modifyTime = myDate
+          this.addModuleForm.modifier = this.userInformation
+          // this.bizTypeInfo = { bizTypeInfo: this.addBizData }
+          updateBizModule(this.addModuleForm).then(response => {
+            this.$set(this.platData, [])
+            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>

+ 356 - 0
src/views/Platform/setUp/systemSetup/platformPage.vue

@@ -0,0 +1,356 @@
+<template>
+  <!-- 平台类型 -->
+  <div class="set-background">
+    <div class="block">
+      <el-form :model="platForm">
+        <div class="set-head">
+          平台类型<el-input v-model="platForm.platName" clearable placeholder="请填写" style="margin-left:10px;width:30%;" @keyup.enter.native="queryBizList(platForm)" /> &nbsp;&nbsp;
+          业务线<el-select v-model="platForm.bizId" placeholder="请选择" filterable clearable style="margin-left:10px;width:30%;">
+            <el-option v-for="item in bizData" :key="item.id" :label="item.bizName" :value="item.id" />
+          </el-select>
+          <div style="float:right">
+            <el-button type="primary" @click="queryBizList(platForm)">查询</el-button>
+            <el-button type="primary" plain @click="handleaddPlat()">新增</el-button>
+          </div>
+        </div>
+      </el-form>
+      <div class="set-locate">
+        <el-table :key="tableKey" v-loading="listLoading" :data="platData" fit highlight-current-row style="width: 100%;" border :header-cell-style="{background:'#F0F2F4',color:'#606266'}">
+          <el-table-column label="序号" prop="id" min-width="50px" align="center"><template slot-scope="scope"><span>{{ scope.row.id }}</span></template> </el-table-column>
+          <el-table-column label="平台类型" prop="platName" align="center" min-width="120">
+            <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff">{{ scope.row.platName }}</a></template>
+          </el-table-column>
+          <el-table-column label="业务线" prop="bizName" min-width="110px" align="center"><template slot-scope="scope"><span>{{ scope.row.bizName }}</span></template> </el-table-column>
+          <el-table-column label="端类型" prop="clientType" min-width="120px" align="center"><template slot-scope="{row}"><span>{{ statusMaps.get(row.clientType) }}</span></template> </el-table-column>
+          <el-table-column label="操作人" prop="modifier" min-width="120px" align="center"><template slot-scope="scope"><span>{{ scope.row.modifier }}</span></template> </el-table-column>
+          <el-table-column label="操作" align="center" min-width="200px" class-name="small-padding fixed-width">
+            <template slot-scope="{row}">
+              <el-button type="primary" size="mini" @click="handelEditPlat(row)">编辑</el-button>
+              <el-button type="danger" size="mini" @click="handelDeletePlat(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="addPlatForms" :rules="addPlatDataRules" :model="addPlatForm">
+              <el-form-item label="平台类型" prop="platName">
+                <el-input v-model="addPlatForm.platName" placeholder="请填写" style="margin-left:7px;width:60%;" />
+              </el-form-item>
+              <el-form-item label="业务线" prop="bizId">
+                <el-select v-model="addPlatForm.bizId" placeholder="请选择" filterable clearable style="margin-left:20px;width:60%;">
+                  <el-option v-for="item in bizData" :key="item.id" :label="item.bizName" :value="item.id" />
+                </el-select>
+              </el-form-item>
+              <el-form-item label="端类型" prop="clientType">
+                <el-select v-model="addPlatForm.clientType" placeholder="请选择" filterable clearable style="margin-left:20px;width:60%;">
+                  <el-option v-for="item in clientOptions" :key="item.value" :label="item.label" :value="item.value" />
+                </el-select>
+              </el-form-item>
+
+            </el-form>
+          </div>
+          <div align="center" style="margin-top:30px">
+            <el-button type="info" plain size="mini" @click="dialogFormVisible=false">取消</el-button>
+            <el-button type="primary" size="mini" @click="titleName === '新增' ? addPlatType(addPlatForm) :editPlatType(addPlatForm)">确定</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:35px">
+            <el-button type="primary" size="mini" @click="deletePlatType()">确定</el-button>
+            <el-button type="danger" size="mini" @click="dialogDeleteVisible=false">取消</el-button>
+          </div>
+          <div style="margin-top:4%" />
+        </el-dialog>
+        <div>
+          <!-- <el-pagination
+            align="center"
+            background
+            layout="prev, pager, next"
+            :total="50"
+            :current-page="curIndex"
+            :page-size="pageSize"
+            @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>
+  </div></template>
+
+<script>
+import { queryBizTypeList, addPlatFormType, updatePlatFormType, deletePlatFormType, queryPlatFormTypeList } from '@/api/platformPage'
+import waves from '@/directive/waves' // waves directive
+
+var envSelections = []
+var consumerSelections = []
+
+export default {
+  name: 'PlatformPage',
+  // 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'),
+      statusMaps: new Map([[1, '服务端 '], [2, '客户端']]),
+      clientOptions: [{
+        value: 1,
+        label: '服务端'
+      }, {
+        value: 2,
+        label: '客户端'
+      }],
+      userData: '',
+      envSelections,
+      consumerSelections,
+      bizData: [],
+      total: 0,
+      titleName: '',
+      bizForm: {
+        bizName: ''
+      },
+      platForm: {
+        platName: '',
+        bizId: ''
+      },
+      platData: {},
+      deleteData: {},
+      addPlatForm: {},
+      currentBizData: [],
+      tableKey: 0,
+      curIndex: 0,
+      pageSize: 10,
+      listLoading: true,
+      dialogFormVisible: false,
+      dialogDeleteVisible: false,
+      // dialogName: '业务线名称',
+      addPlatDataRules: {
+        bizId: [{ required: true, message: '业务线不能为空', trigger: 'change' }],
+        clientType: [{ required: true, message: '端类型不能为空', trigger: 'change' }],
+        platName: [{ required: true, message: '平台类型名称不能为空', trigger: 'change' }]
+      }
+
+    }
+  },
+
+  created() {
+    this.getBizList()
+    this.getList()
+  },
+  methods: {
+    // 获得biztype
+    getBizList() {
+      this.bizForm.bizName = ''
+      this.bizForm.curIndex = this.curIndex - 1
+      queryBizTypeList(this.bizForm).then(response => {
+        if (response.code === 200) {
+          this.bizData = response.data.list
+        } else {
+          this.errorFun()
+        }
+      })
+    },
+    // 新增平台类型
+    handleaddPlat() {
+      this.titleName = '新增'
+      this.dialogFormVisible = true
+      this.$refs.addPlatForms.resetFields()
+      this.$set(this.addPlatForm, 'bizId', '')
+      this.$set(this.addPlatForm, 'clientType', '')
+      this.$set(this.addPlatForm, 'platName', '')
+      this.addPlatForm = {}
+    },
+    addPlatType(ele) {
+      this.$refs['addPlatForms'].validate((valid) => {
+        if (valid) {
+          this.addPlatForm = ele
+          this.addPlatForm.bizId = ele.bizId
+          this.addPlatForm.clientType = ele.clientType
+          this.addPlatForm.platName = ele.platName
+          this.addPlatForm.creator = this.userInformation
+          this.addPlatForm.modifier = this.userInformation
+          addPlatFormType(this.addPlatForm).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
+      }
+      queryPlatFormTypeList(this.indexPage).then(response => {
+        this.platData = response.data.list
+        this.total = response.data.total
+        this.listLoading = false
+      })
+    },
+
+    // 查看
+    queryBizList(ele) {
+      this.platForm.platName = ele.platName
+      this.platForm.bizId = ele.bizId
+      // this.bizForm.pageSize = this.pageSize
+      // this.platForm.curIndex = this.curIndex - 1
+      console.log(ele)
+      // this.listLoading = true
+      queryPlatFormTypeList(this.platForm).then(response => {
+        if (response.code === 200) {
+          // this.getMyDevicesList()
+          this.platData = response.data.list
+          this.total = response.data.total
+          this.dialogFormVisible = false
+          // this.listLoading = false
+        } else {
+          this.errorFun()
+        }
+      })
+    },
+    // 删除
+    handelDeletePlat(ele) {
+      this.dialogDeleteVisible = true
+      this.addPlatForm = ele
+    },
+    deletePlatType() {
+      console.log(typeof (this.addPlatForm.id))
+      var platIds = [this.addPlatForm.id]
+      // bizIds.push(this.addBizData.id)
+      this.deleteData.modifier = this.userInformation
+      this.deleteData.platIds = platIds
+      deletePlatFormType(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
+        }
+      })
+    },
+
+    // 编辑
+    handelEditPlat(ele) {
+      // 不能直接赋值变量,使用Object.assign复制一级属性(注意Object.assign不算完全的深拷贝)
+      this.addPlatForm = Object.assign({}, ele)
+      // this.addPlatform = JSON.parse(JSON.stringify(ele))
+      this.titleName = '编辑'
+      this.dialogFormVisible = true
+      this.$refs.addPlatForms.resetFields()
+      console.log(ele)
+    },
+    editPlatType(ele) {
+      this.$refs['addPlatForms'].validate((valid) => {
+        if (valid) {
+          var myDate = new Date()
+          this.addPlatForm = ele
+          this.addPlatForm.bizId = ele.bizId
+          this.addPlatForm.clientType = ele.clientType
+          this.addPlatForm.platName = ele.platName
+          this.addPlatForm.modifyTime = myDate
+          this.addPlatForm.modifier = this.userInformation
+          // this.bizTypeInfo = { bizTypeInfo: this.addBizData }
+          updatePlatFormType(this.addPlatForm).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>

+ 340 - 0
src/views/Platform/setUp/systemSetup/projectPage.vue

@@ -0,0 +1,340 @@
+<template>
+  <!-- 工程模块 -->
+  <div class="set-background">
+    <div class="block">
+      <el-form :model="projectForm">
+        <div class="set-head">
+          工程模块<el-input v-model="projectForm.platformType" placeholder="请填写" style="margin-left:10px;width:14%;" /> &nbsp;&nbsp;
+          业务线<el-select v-model="projectForm.bizId" placeholder="请选择" filterable clearable style="margin-left:10px;width:14%;" @change="getPlat(projectForm.bizId)">
+            <el-option v-for="item in bizType" :key="item.code" :label="item.name" :value="item.code" />
+          </el-select>
+          平台类型<el-select v-model="projectForm.platId" placeholder="请选择" filterable clearable style="margin-left:10px;width:14%;" @change="getProgect(projectForm.platId)">
+            <el-option v-for="item in platType" :key="item.code" :label="item.name" :value="item.code" />
+          </el-select>
+          业务模块<el-select v-model="projectForm.id" placeholder="请选择" filterable clearable style="margin-left:10px;width:14%;">
+            <el-option v-for="item in projectType" :key="item.code" :label="item.name" :value="item.code" />
+          </el-select>
+          <div style="float:right">
+            <el-button type="primary">查询</el-button>
+            <el-button type="primary" plain @click="handleaddBiz()">新增</el-button>
+          </div>
+        </div>
+      </el-form>
+      <div class="set-locate">
+        <el-table :key="tableKey" :data="projectData" fit highlight-current-row style="width: 100%;" border :header-cell-style="{background:'#F0F2F4',color:'#606266'}">
+          <el-table-column label="序号" prop="id" min-width="40px" align="center" />
+          <el-table-column label="工程模块" prop="bizName" align="center" min-width="100">
+            <template slot-scope="scope"><a href="javascript:void(0)" style="color:#20a0ff">{{ scope.row.bizName }}</a></template>
+          </el-table-column>
+          <el-table-column label="业务模块" prop="editor" min-width="70px" align="center" />
+          <el-table-column label="平台类型" prop="editor" min-width="70px" align="center" />
+          <el-table-column label="业务线" prop="editor" min-width="70px" align="center" />
+          <el-table-column label="端类型" prop="editor" min-width="70px" align="center" />
+          <el-table-column label="修改人" prop="editor" min-width="70px" align="center" />
+          <el-table-column label="操作" align="center" min-width="150px" class-name="small-padding fixed-width">
+            <!-- <template slot-scope="{row}"> -->
+            <el-button type="primary" size="mini">编辑</el-button>
+            <el-button type="danger" size="mini" @click="dialogDeleteVisible=true">删除</el-button>
+
+            <!-- </template> -->
+          </el-table-column>
+        </el-table>
+        <el-dialog :visible.sync="dialogFormVisible" width="32%">
+          <div class="set-dialogfont" style="margin-left:25px;margin-top:-8px">
+            <b>工程模块</b><el-input placeholder="请填写" style="margin-left:10px;width:72%;" />
+          </div>
+          <div class="set-dialogfont" style="margin-left:35px;margin-top:10px">
+            <b>Git地址</b><el-input placeholder="请填写" style="margin-left:10px;width:74%;" />
+          </div>
+          <div class="set-dialogfont" style="margin-left:23px;margin-top:10px">
+            <b>业务模块</b><el-select v-model="projectForm.biz" placeholder="请选择业务模块" filterable clearable style="margin-left:13px;width:71.5%;">
+              <el-option v-for="item in bizType" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+          </div>
+          <div class="set-dialogfont" style="margin-left:35px;margin-top:10px">
+            <b>odin节点</b><el-input placeholder="请填写" style="margin-left:10px;width:74%;" />
+          </div>
+          <div align="center" style="margin-top:30px">
+            <el-button type="info" plain size="mini" @click="dialogFormVisible=false">确定</el-button>
+            <el-button type="danger" size="mini" @click="dialogFormVisible=false">取消</el-button>
+            <div style="margin-top:3%" />
+          </div>
+        </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="dialogDeleteVisible=false">确定</el-button>
+            <el-button type="danger" size="mini" @click="dialogDeleteVisible=false">取消</el-button>
+          </div>
+          <div style="margin-top:4%" />
+        </el-dialog>
+        <div>
+          <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>
+  </div></template>
+
+<script>
+import { getTypeMap, createModule } from '@/api/projectTypePage'
+//  updateModule, deleteModules, queryModuleInfoList, queryModuleInfoListByModuleName
+import waves from '@/directive/waves' // waves directive
+
+var envSelections = []
+var consumerSelections = []
+
+export default {
+  name: 'ProjectPage',
+  // 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,
+      projectData: [],
+      bizType: [],
+      platType: [],
+      projectType: [],
+      total: 0,
+      titleName: '',
+      projectForm: {
+        bizId: '',
+        platId: '',
+        id: ''
+      },
+      addBizData: {},
+      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.getBizTypeMap()
+  },
+  methods: {
+    // 获取业务类型
+    getBizTypeMap() {
+      getTypeMap().then(response => {
+        this.bizType = response.data
+        console.log(this.bizType)
+        // this.lockSupplierList = response.data.supplierInfos
+      })
+    },
+
+    // 新增业务线
+    handleaddBiz() {
+      this.titleName = '新增'
+      this.dialogFormVisible = true
+      this.$refs.addBizForms.resetFields()
+    },
+    addModuleType(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 }
+          createModule(this.addBizData).then(response => {
+            console.log(response)
+            if (response.code === 200) {
+              this.getList()
+              this.successFun()
+              this.dialogFormVisible = false
+            } else {
+              this.errorFun()
+            }
+          })
+        }
+      })
+    },
+    getPlat(e) {
+      if (this.bizType.filter((value) => value.code === e)[0]) {
+        this.platType = this.bizType.filter((value) => value.code === e)[0].child
+        this.$set(this.projectForm, 'platId', '')
+        this.$set(this.projectForm, 'id', '')
+      }
+    },
+    getProgect(e) {
+      console.log(e)
+      if (this.platType.filter((value) => value.code === e)[0]) {
+        this.projectType = this.platType.filter((value) => value.code === e)[0].child
+        this.$set(this.projectForm, 'id', '')
+      }
+    },
+    // // 进首页
+    // 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 - 1
+    //   // 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 = ele
+    //   this.titleName = '编辑'
+    //   this.dialogFormVisible = 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.getMyDevicesList()
+    //           this.successFun()
+    //           // this.$refs.addBizForms.resetFields()
+    //           this.dialogFormVisible = false
+    //         } else {
+    //           this.errorFun()
+    //           // this.$refs.addBizForms.resetFields()
+    //         }
+    //       })
+    //     }
+    //   })
+    // },
+
+    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>

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

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

+ 1 - 1
src/views/Platform/setUp/teamPage.vue

@@ -53,7 +53,7 @@
       <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="team" width="180" align="center"><template slot-scope="scope"><span>{{ scope.row.teamName }}</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">

+ 15 - 47
src/views/Platform/useCase/createUse.vue

@@ -25,55 +25,15 @@
         </el-form>
       </el-header>
       <el-main style="background:#ffffff;height:auto; width:94%;margin: 0 3% 3% 3%; font-size:14px;border-radius:8px;">
-        <!-- <div ref="div1">
-          <div style="box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04); margin-bottom:2%;">
-            <el-form ref="caseData" :model="caseData" label-width="90pt" :rules="createFormData">
-              <el-row>
-                <el-col :span="20" style="margin:2% 0 0 0; white-space:nowrap;">
-                  <el-form-item label="执行步骤">
-                    <el-input v-model="textarea" type="textarea" :rows="4" placeholder="请输入内容" />
-                    <el-button size="mini" type="primary" icon="el-icon-plus" style="margin-bottom: 6%;" @click="addform" />
-                    <el-button size="mini" icon="el-icon-minus" @click="deleteData" />
-                  </el-form-item>
-                </el-col>
-              </el-row>
-              <el-row>
-                <el-col :span="22">
-                  <el-form-item label="预期结果">
-                    <el-input v-model="textarea" placeholder="请输入内容" />
-                  </el-form-item>
-                </el-col>
-              </el-row>
-              <div style="display:flex;">
-                <el-row style="flex:1;">
-                  <el-col :span="22">
-                    <el-form-item label="附件">
-                      <el-upload class="upload-demo" drag action="https://jsonplaceholder.typicode.com/posts/" multiple>
-                        <i class="el-icon-plus avatar-uploader-icon"> 添加图片 </i>
-                      </el-upload>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-                <el-row style="flex:1;">
-                  <el-col :span="20">
-                    <el-form-item label="备注">
-                      <el-input v-model="textarea" type="textarea" :rows="8" placeholder="请输入内容" />
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </div>
-            </el-form>
-          </div>
-        </div> -->
-        <div v-for="(item, key) in arr" ref="for" :key="key">
+        <div v-for="(item, index) in arr" ref="for" :key="index">
           <div ref="div1">
             <div style="box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04); margin-bottom:2%;">
-              <el-form ref="caseData" :model="caseData" label-width="90pt" :rules="createFormData">
+              <el-form :model="caseData" label-width="90pt">
                 <el-row>
                   <el-col :span="20" style="margin:2% 0 0 0; white-space:nowrap;">
                     <el-form-item label="执行步骤">
                       <el-input v-model="caseData.description" type="textarea" :rows="4" placeholder="请输入内容" />
-                      <el-button v-show="plus" size="mini" type="primary" icon="el-icon-plus" style="margin-bottom: 6%;" @click="addform" />
+                      <el-button v-show="plus" size="mini" type="primary" icon="el-icon-plus" style="margin-bottom: 6%;" @click="addform(caseData, key)" />
                       <el-button v-show="plus" size="mini" icon="el-icon-minus" @click="deleteData" />
                     </el-form-item>
                   </el-col>
@@ -103,8 +63,8 @@
                     </el-col>
                   </el-row>
                 </div>
-                <div align="center" class="cla">
-                  <el-table :data="uptataKey" fit style="width: 90%;">
+                <div v-show="btn_show" align="center" class="cla">
+                  <el-table v-show="btn_show" :data="uptataKey" fit style="width: 90%;">
                     <el-table-column label="" min-width="150">
                       <template slot-scope="scope">{{ scope.row.name }}</template>
                     </el-table-column>
@@ -143,6 +103,8 @@ export default {
       startId: '',
       caseFolderId: '',
       caseData: {},
+      add_obj: {},
+      btn_show: true,
       plus: true,
       dis: false,
       id: '',
@@ -155,7 +117,7 @@ export default {
       },
       textarea: '',
       priorityStrings: [{ name: 'p0', value: 0 }, { name: 'p1', value: 1 }, { name: 'p2', value: 2 }, { name: 'p3', value: 3 }],
-      arr: [`<div style="box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04); margin-bottom:2%;"><el-form ref="caseData" :model="caseData" label-width="90pt" :rules="createFormData"><el-row><el-col :span="20" style="margin:2% 0 0 0; white-space:nowrap;"><el-form-item label="执行步骤"><el-input v-model="textarea" type="textarea" :rows="4" placeholder="请输入内容" /><el-button id="addData" size="mini" type="primary" icon="el-icon-plus" style="margin-bottom: 6%;" @click="addform" /><el-button id="deleteData" size="mini" icon="el-icon-minus" @click="deleteData" /></el-form-item></el-col></el-row><el-row><el-col :span="22"><el-form-item label="预期结果"><el-input v-model="textarea" placeholder="请输入内容" /></el-form-item></el-col></el-row><div style="display:flex;"><el-row style="flex:1;"><el-col :span="22"><el-form-item label="附件"><el-upload class="upload-demo" drag action="https://jsonplaceholder.typicode.com/posts/" multiple><i class="el-icon-plus avatar-uploader-icon"> 添加图片 </i></el-upload></el-form-item></el-col></el-row><el-row style="flex:1;"><el-col :span="20"><el-form-item label="备注"><el-input v-model="textarea" type="textarea" :rows="8" placeholder="请输入内容" /></el-form-item></el-col></el-row></div></el-form></div>`]
+      arr: [`<div style="box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04); margin-bottom:2%;"><el-form ref="caseData" :model="caseData" label-width="90pt"><el-row><el-col :span="20" style="margin:2% 0 0 0; white-space:nowrap;"><el-form-item label="执行步骤"><el-input v-model="textarea" type="textarea" :rows="4" placeholder="请输入内容" /><el-button id="addData" size="mini" type="primary" icon="el-icon-plus" style="margin-bottom: 6%;" @click="addform" /><el-button id="deleteData" size="mini" icon="el-icon-minus" @click="deleteData" /></el-form-item></el-col></el-row><el-row><el-col :span="22"><el-form-item label="预期结果"><el-input v-model="textarea" placeholder="请输入内容" /></el-form-item></el-col></el-row><div style="display:flex;"><el-row style="flex:1;"><el-col :span="22"><el-form-item label="附件"><el-upload class="upload-demo" drag action="https://jsonplaceholder.typicode.com/posts/" multiple><i class="el-icon-plus avatar-uploader-icon"> 添加图片 </i></el-upload></el-form-item></el-col></el-row><el-row style="flex:1;"><el-col :span="20"><el-form-item label="备注"><el-input v-model="textarea" type="textarea" :rows="8" placeholder="请输入内容" /></el-form-item></el-col></el-row></div></el-form></div>`]
     }
   },
   created() {
@@ -165,6 +127,7 @@ export default {
     initCode() {
       if (this.$route.query.data) { // 新增
         this.titleName = '新增'
+        this.btn_show = false
         this.startId = this.$route.query.data
         if (this.$refs['caseData'] !== undefined) {
           this.$refs['caseData'].resetFields()
@@ -222,9 +185,12 @@ export default {
     },
 
     // 添加事件
-    addform(e) {
+    addform(vel, e) {
       this.arr.push(this.$refs.div1.innerHTML)
+      console.log(this.arr)
+      console.log(this.$refs.div1)
     },
+
     deleteData(e) {
       this.arr.splice(e, 1)
     },
@@ -242,6 +208,7 @@ export default {
 
     // 新建Data
     caseCreateCase(vel, e) {
+      debugger
       if (e === '编辑') {
         this.caseData = vel
         this.caseData.accessory = JSON.stringify(this.uptataKey)
@@ -254,6 +221,7 @@ export default {
         this.$refs['caseData'].validate((valid) => {
           if (valid) {
             this.caseData = vel
+            this.caseData.accessory = JSON.stringify(this.uptataKey)
             this.caseData.creator = this.userInformation
             this.caseData.creatorName = this.userNames
             this.caseData.modifier = this.userInformation

+ 55 - 128
src/views/Platform/useCasePage.vue

@@ -14,28 +14,30 @@
                 <el-button type="info" @click="createCase(formData)">新增</el-button>
               </span>
             </el-dialog>
-            <div v-show="createCaseCode" style="background: #E9EEF3; height:88vh; text-align:center; padding:50% 0;">
-              <p>请先创建任务,再继续·····</p>
-              <el-button type="primary" @click="changeStartId">新</el-button>
+            <div v-show="createCaseCode" style="background: #E9EEF3; height:80vh; text-align:center; padding:50% 0;">
+              <p>请先创建文件夹 ·····</p>
+              <el-button type="primary" @click="changeStartId">新</el-button>
             </div>
-            <el-tree
-              v-show="dataShow"
-              style="background: #fff; height:88vh; padding:15%;"
-              :data="data1"
-              node-key="id"
-              draggable
-              :allow-drop="allowDrop"
-              :allow-drag="allowDrag"
-              @node-drag-start="handleDragStart"
-              @node-drag-enter="handleDragEnter"
-              @node-drag-leave="handleDragLeave"
-              @node-drag-over="handleDragOver"
-              @node-drag-end="handleDragEnd"
-              @node-drop="handleDrop"
-              @node-contextmenu="createUpdate"
-              @node-click="clickFun"
-            />
-            <div style="background: #fff; padding:15%; text-align: center;" icon="el-icon-circle-plus">新建文件夹</div>
+            <div style="background: #fff; height:73vh; padding:15%;">
+              <el-tree
+                v-show="dataShow"
+                :data="data1"
+                node-key="id"
+                draggable
+                :allow-drop="allowDrop"
+                :allow-drag="allowDrag"
+                @node-drag-start="handleDragStart"
+                @node-drag-enter="handleDragEnter"
+                @node-drag-leave="handleDragLeave"
+                @node-drag-over="handleDragOver"
+                @node-drag-end="handleDragEnd"
+                @node-drop="handleDrop"
+                @node-contextmenu="createUpdate"
+                @node-click="clickFun"
+              />
+              <el-input v-show="Folder_Show" ref="input1" v-model="add_Folder" placeholder="新建文件夹" clearable @blur="hide_input(add_Folder)" />
+            </div>
+            <div style="background: #fff; padding:15%; text-align: center;"><el-button icon="el-icon-circle-plus" style="border:none;" @click="createFolder">新建文件夹</el-button></div>
           </el-aside>
           <el-container>
             <el-header style="background:#ffffff;height:auto; width:94%;margin:3%; font-size:14px;border-radius:8px;">
@@ -119,74 +121,6 @@
             </el-main>
           </el-container>
         </el-container>
-
-        <!-- 新增-编辑 -->
-        <!-- <el-dialog :title="titleName" :visible.sync="dialogFormVisibleUpdate" width="80%">
-          <el-form ref="caseData" :model="caseData" label-width="90pt" :rules="createFormData">
-            <div style="display:flex;">
-              <div style="flex:1;">
-                <el-form-item label="用例名" prop="caseName"><el-input v-model="caseData.caseName" clearable autocomplete="off" style="width: 200px" /></el-form-item>
-                <el-form-item label="期望结果" prop="expectedResult"><el-input v-model="caseData.expectedResult" clearable autocomplete="off" style="width: 200px" /></el-form-item>
-                <el-form-item label="对应api" prop="api"><el-input v-model="caseData.api" clearable autocomplete="off" style="width: 200px" /></el-form-item>
-              </div>
-              <div style="flex:1;">
-                <el-form-item label="项目类型" prop="projectType">
-                  <el-select v-model="caseData.projectType" clearable placeholder="项目类型" style="width: 200px">
-                    <el-option v-for="item in projectTypeStrings" :key="item.value" :label="item.name" :value="item.value" />
-                  </el-select>
-                </el-form-item>
-                <el-form-item label="平台类型" prop="taskType">
-                  <el-select v-model="caseData.taskType" clearable placeholder="任务类型" style="width: 200px" @change="taskTypeChange(caseData.taskType)">
-                    <el-option v-for="item in taskTypeStrings" :key="item.value" :label="item.name" :value="item.value" />
-                  </el-select>
-                </el-form-item>
-                <el-form-item label="用例优先级" prop="casePriority">
-                  <el-select v-model="caseData.casePriority" clearable placeholder="用例优先级" style="width: 200px">
-                    <el-option v-for="item in priorityStrings" :key="item.value" :label="item.name" :value="item.value" />
-                  </el-select>
-                </el-form-item>
-              </div>
-              <div style="flex:1;">
-                <el-form-item v-show="moduleTypeShow" label="模块名" prop="casePriority">
-                  <el-select v-model="caseData.moduleType" clearable placeholder="模块类型" style="width: 200px">
-                    <el-option v-for="item in moduleTypeStr" :key="item.id" :label="item.moduleName" :value="item.id" />
-                  </el-select>
-                </el-form-item>
-              </div>
-            </div>
-            <el-form-item label="用例描述" prop="description"><el-input v-model="caseData.description" clearable type="textarea" style="width: 95%" :rows="5" placeholder="请输入内容" /></el-form-item>
-            <el-form-item label="备注"><el-input v-model="caseData.remark" clearable type="textarea" style="width: 95%" :rows="5" placeholder="请输入内容" /></el-form-item>
-          </el-form>
-          <div slot="footer" class="dialog-footer">
-            <el-button type="primary" @click="dialogFormVisibleUpdate = false">关 闭</el-button>
-            <el-button type="primary" @click="caseCreateCase(caseData, titleName)">确 定</el-button>
-          </div>
-        </el-dialog> -->
-
-        <!-- <el-dialog title="查看" :visible.sync="dialogFormVisibleQuery" width="80%">
-          <el-form ref="caseData" :model="caseData" label-width="90pt">
-            <div style="display:flex;">
-              <div style="flex:1;">
-                <el-form-item label="用例名 :">{{ caseData.caseName }}</el-form-item>
-                <el-form-item label="期望结果 :">{{ caseData.expectedResult }}</el-form-item>
-                <el-form-item label="对应接口 :">{{ caseData.api }}</el-form-item>
-              </div>
-              <div style="flex:1;">
-                <el-form-item label="项目类型 :">{{ caseData.projectTypeName }}</el-form-item>
-                <el-form-item label="任务类型 :">{{ caseData.taskTypeName }}</el-form-item>
-                <el-form-item label="用例优先级 :">{{ caseData.casePriorityName }}</el-form-item>
-              </div>
-              <div style="flex:1;">
-                <el-form-item v-show="moduleTypeShow" label="模块类型 :">{{ caseData.moduleTypeName }}</el-form-item>
-              </div>
-            </div>
-            <el-form-item label="用例描述 :">{{ caseData.description }}</el-form-item>
-            <el-form-item label="备注 :">{{ caseData.remark }}</el-form-item>
-          </el-form>
-          <div slot="footer" class="dialog-footer">
-            <el-button type="primary" @click="dialogFormVisibleQuery = false">关 闭</el-button>
-          </div>
-        </el-dialog> -->
       </div>
     </div>
   </div>
@@ -204,6 +138,8 @@ export default {
   data() {
     return {
       value: '',
+      Folder_Show: false,
+      add_Folder: '',
       centerDialogVisible: false,
       // dialogFormVisibleQuery: false,
       moduleTypeShow: false,
@@ -358,45 +294,36 @@ export default {
         this.tableData = res.data
       })
     },
-    // taskTypeChange(ele) {
-    //   if (ele === 2) {
-    //     this.moduleTypeShow = true
-    //   } else {
-    //     this.moduleTypeShow = false
-    //   }
-    // },
-    // 新增
-    // caseCreateCase(vel, e) {
-    //   if (e === '编辑') {
-    //     updateCaseData(this.caseData).then(res => {
-    //       this.successFun()
-    //       // this.dialogFormVisibleUpdate = false
-    //     })
-    //   }
-    //   if (vel !== '' && e === '新增') {
-    //     this.$refs['caseData'].validate((valid) => {
-    //       if (valid) {
-    //         this.caseData = vel
-    //         this.caseData.creator = this.userInformation
-    //         this.caseData.creatorName = this.userNames
-    //         this.caseData.modifier = this.userInformation
-    //         this.caseData.pageSize = 5
-    //         this.caseData.curIndex = 0
-    //         this.caseData.caseFolderId = this.startId
-    //         this.caseData.bizId = this.bizJson
-    //         createCaseData(this.caseData).then(res => {
-    //           if (res.code === 200) {
-    //             this.gridData = res.data
-    //             this.successFun()
-    //             // this.dialogFormVisibleUpdate = false
-    //           } else {
-    //             this.$message({ message: '提示, 请选择目录', type: 'success', duration: 1000, offset: 150 })
-    //           }
-    //         })
-    //       }
-    //     })
-    //   }
-    // },
+    // 隐藏input
+    hide_input(vel) {
+      vel === '' ? vel = '新建文件夹' : ''
+      this.formData = {
+        bizId: this.bizJson,
+        folderName: vel,
+        parentFolderId: this.startId,
+        creator: this.userInformation,
+        modifier: this.userInformation
+      }
+      createFolderData(this.formData).then(res => {
+        if (res.code === 200) {
+          this.successFun(res.msg)
+          this.createCaseCode = false
+          this.dataShow = true
+          this.data1 = []
+          this.AllQueryFolderData()
+        } else {
+          this.errorFun(res.msg)
+        }
+      })
+      this.Folder_Show = false
+    },
+
+    // 新建文件夹
+    createFolder() {
+      this.Folder_Show = true
+      this.add_Folder = ''
+      setTimeout(() => { this.$refs.input1.focus() }, 100)
+    },
     // 查询
     queryCaseData(ele) {
       if (this.createParticipation.caseName === '') return false