qinzhipeng_v 5 năm trước cách đây
mục cha
commit
e7b30b9864

+ 3 - 3
src/apiConfig/api.js

@@ -1,8 +1,8 @@
 /*eslint-disable*/   //规避eslint的检查,如没有eslint可不写
-// export const mockUrl = 'http://10.179.24.176:8980' // 线下
-export const mockUrl = 'http://10.179.24.123:8980' // 线上
+export const mockUrl = 'http://10.179.24.176:8980' // 线下
+// export const mockUrl = 'http://10.179.24.123:8980' // 线上
 
-// export const mockUrl = 'http://172.23.162.48:8980' // 美双姐本地
+// export const mockUrl = 'http://172.23.164.60:8980' // 舒宁本地
 
 export const qualityUrl = 'http://10.179.209.19:8898' // 质量度量
 

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

@@ -38,12 +38,12 @@
             <el-button ref="btn2" size="mini" @click="getQueryData(2)">任务</el-button>
           </div>
           <div>
-            <el-select v-model="queryDataState" filterable placeholder="请选择项目还是任务" style="width:100%;">
+            <el-select v-model="queryDataState.code" filterable placeholder="请选择项目还是任务" style="width:100%;">
               <el-option v-for="item in restaurants" :key="item.id" :label="item.name" :value="item.id" />
             </el-select>
           </div>
           <span slot="footer" class="dialog-footer">
-            <el-button type="primary" @click="createPresentation(queryDataState)">创建</el-button>
+            <el-button type="primary" @click="createPresentation(queryDataState.code)">创建</el-button>
           </span>
         </el-dialog>
       </div>

+ 56 - 17
src/views/Platform/useCasePage.vue

@@ -69,6 +69,20 @@
               </el-row>
             </el-header>
             <el-main style="background:#ffffff; width:98%;margin:0% 1% 1% 1%; font-size:14px;border-radius:8px;">
+              <el-upload
+                class="upload-demo"
+                action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
+                :on-preview="handlePreview"
+                :on-remove="handleRemove"
+                :before-remove="beforeRemove"
+                multiple
+                :limit="3"
+                :on-exceed="handleExceed"
+                :file-list="fileList"
+              >
+                <el-button size="small" type="primary">点击上传</el-button>
+                <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
+              </el-upload>
               <el-button type="primary" style="margin-left:1%;width:10%;" @click="uploadFile()">导入</el-button>
               <el-tooltip class="item" effect="light" content="导出勾选项,没有勾选将导出模版" placement="top">
                 <el-button style="margin-left:2%;width:10%;" @click="exportExcel">导出</el-button>
@@ -145,6 +159,7 @@ export default {
   },
   data() {
     return {
+      fileList: [],
       div1: true,
       id: '',
       label: '',
@@ -192,6 +207,18 @@ export default {
     this.AllQueryFolderData(localStorage.getItem('key'))
   },
   methods: {
+    handleRemove(file, fileList) {
+      console.log(file, fileList)
+    },
+    handlePreview(file) {
+      console.log(file)
+    },
+    handleExceed(files, fileList) {
+      this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${file.name}?`)
+    },
     // 左侧导航栏
     AllQueryFolderData(e) {
       if (e !== '') {
@@ -319,6 +346,9 @@ export default {
       }
     },
     moduleTypeArr() {
+      axios.get('https://star.xiaojukeji.com/upload/getPresignedUrl.node?name=“文件名”').then(res => {
+        console.log(res)
+      })
       settingQueryModuleInfoListData(this.formData).then(res => {
         this.moduleTypeStr = res.data
       })
@@ -498,6 +528,7 @@ export default {
           this.$message({ type: 'success', message: '已取消' })
         })
     },
+    // Nav 当前点击
     clickFun(e) {
       this.startId = e.id
       this.created_id = e.id
@@ -511,6 +542,8 @@ export default {
         this.total = res.data.total
       })
     },
+
+    // 表格信息删除
     deleteCaseData(e) {
       if (this.startId === '') {
         this.$message({ message: '提示, 👈请选择目录', type: 'success', duration: 1000, offset: 150 })
@@ -524,8 +557,6 @@ export default {
             this.caseInfo = { id: e, modifier: this.userInformation }
             deleteCaseData(this.caseInfo).then(res => {
               if (res.code === 200) {
-                // this.data1 = []
-                // this.AllQueryFolderData(localStorage.getItem('key'))
                 var data = {
                   pageSize: this.pageSize,
                   curIndex: this.curIndex,
@@ -543,6 +574,8 @@ export default {
           .catch(action => { this.$message({ type: 'success', message: '已取消' }) })
       }
     },
+
+    //  导出
     exportExcel() {
       if (this.startId === '') {
         this.$message({ message: '提示,👈请选择目录', type: 'success', duration: 1000, offset: 150 })
@@ -557,7 +590,9 @@ export default {
         return wbout
       }
     },
-    importFile() { // 导入excel
+
+    // 导入excel
+    importFile() {
       var obj = this.imFile
       if (!obj.files) {
         return
@@ -579,10 +614,10 @@ export default {
         var code = res.data.data
         this.successNum = code.successNum
         this.failNum = code.failNum
-        if (res.status === 200) {
+        console.log(res)
+        if (res.data.code === 200) {
           if (this.failNum === 0) {
             this.updateCaseListData()
-            // this.$notify({ title: 'Success', message: '上传成功', type: 'success', duration: 15000 })
           } else {
             this.haha = '上传成功' + this.successNum + '上传失败' + this.failNum
             this.$notify({ title: 'error', message: this.haha, type: 'success', duration: 2000 })
@@ -594,28 +629,32 @@ export default {
         }
       })
     },
-    fixdata: function(data) { // 文件流转BinaryString
-      var o = ''
-      var l = 0
-      var w = 10240
-      for (; l < data.byteLength / w; ++l) {
-        o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)))
-      }
-      o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)))
-      return o
-    },
-    uploadFile() { // 按钮导入
+
+    // fixdata: function(data) { // 文件流转BinaryString
+    //   var o = ''
+    //   var l = 0
+    //   var w = 10240
+    //   for (; l < data.byteLength / w; ++l) {
+    //     o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)))
+    //   }
+    //   o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)))
+    //   return o
+    // },
+
+    // 按钮导入
+    uploadFile() {
       if (this.startId === '') {
         this.$message({ message: '提示,👈请选择目录', type: 'success', duration: 1000, offset: 150 })
       } else {
         this.$refs.imFile.click()
       }
     },
+
     updateCaseListData() {
       this.createParticipation.caseFolderId = this.startId
       queryCasesData(this.createParticipation).then(res => {
         this.gridData = res.data
-        this.$message({ type: 'success', message: res.msg, duration: 1000 })
+        this.$message({ type: res.msg, message: res.msg, duration: 1000 })
       })
     }
   }

+ 2 - 20
src/views/Platform/workbench.vue

@@ -150,7 +150,7 @@
 <script>
 
 import { personalworkstationQueryBackLog, personalworkstationQueryBackLogBugAndTask, personalworkstationQueryStatusAndPriority, personalworkstationQueryPeriodBugAndTask } from '@/api/workbench'
-import Utils from '../../util.js'
+
 export default {
   name: 'Workbench',
   data() {
@@ -230,30 +230,11 @@ export default {
     this.getTopShowData(localStorage.getItem('key'))
     this.Setstatus(1)
   },
-  mounted() {
-    var that = this
-    Utils.$on('demo', function(msg) {
-      that.getTopShowData(msg)
-    })
-  },
-  // watch:{
-  //   bizJson(old,new){
-
-  //   },
-  // },
   methods: {
     // 待处理  list
     getTopShowData(e) {
       this.userName = { bizId: e, ename: this.userInformation }
       personalworkstationQueryBackLog(this.userName).then(res => {
-        Object.assign(this.$data, this.$options.data())
-        // this.show1 = false
-        // this.show2 = false
-        // this.show3 = false
-        // this.bugOrTask1 = {}
-        // this.bugOrTask = {}
-        // this.tableType = []
-        // this.tableData = []
         if (res.code === 200) {
           this.getAllData = res.data.list
           if (res.data.list[0]) {
@@ -303,6 +284,7 @@ export default {
 
     // 待处理 查询
     clickQuery(e) {
+      console.log(this.bizJson)
       e.status === '' ? e.status = [] : ''
       if (e.isBugOrTask === 0 || e.isBugOrTask === 1) {
         this.isBugOrTask = e.isBugOrTask