Browse Source

0412 新看板

master
ruanqi 3 years ago
parent
commit
f437a2fc34
  1. 2
      src/api/ftp/oss.js
  2. 7
      src/assets/scss/rq.scss
  3. 39
      src/utils/httpRequest.js
  4. 25
      src/views/modules/board/sopBoard.vue
  5. 7
      src/views/modules/production/operator.vue
  6. 16
      src/views/modules/taskmanage/chat-history.vue
  7. 21
      src/views/modules/taskmanage/chatting.vue
  8. 4
      src/views/modules/taskmanage/mysendtasklist.vue
  9. 21
      src/views/modules/taskmanage/task-file-list.vue
  10. 19
      src/views/modules/taskmanage/task-file-upload-list.vue

2
src/api/ftp/oss.js

@ -2,3 +2,5 @@ import { createAPI } from "@/utils/httpRequest.js";
export const ossList = data => createAPI(`sys/oss/ossList`,'post',data)
export const downFtpFileNotFtp = data => createAPI(`ftp/file/downFtpFileNotFtp?id=`+data.id,'post','download')

7
src/assets/scss/rq.scss

@ -55,3 +55,10 @@
.pad .el-tabs--border-card>.el-tabs__content {
padding: 0px;
}
.red-label{
font-weight:bold;
color:#bd0b06
}
.redModel .el-form-item__label {
font-weight:bold;color:#bd0b06
}

39
src/utils/httpRequest.js

@ -37,6 +37,38 @@ http.interceptors.response.use(response => {
}, error => {
return Promise.reject(error)
})
// ============================= 下载功能的请求 =============================
const instance2 = axios.create({
baseURL: (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl),
timeout: 10000 * 30,
withCredentials: true,
responseType: 'blob',
headers: {
'Content-Type': 'application/json; charset=utf-8'
}
})
/**
* 请求拦截
*/
instance2.interceptors.request.use(config => {
config.headers['token'] = Vue.cookie.get('token') // 请求头带上token
return config
}, error => {
return Promise.reject(error)
})
/**
* 响应拦截
*/
instance2.interceptors.response.use(response => {
if (response.data && response.data.code === 401) { // 401, token失效
clearLoginInfo()
router.push({name: 'login'})
}
return response
}, error => {
return Promise.reject(error)
})
/**
* 请求地址处理
@ -121,6 +153,13 @@ export const createAPI = (url, method, data) => {
} else {
config.data = data
}
if (data === 'download'){ // 下载功能的请求
return instance2({
url,
method,
...config
})
}
return instance({
url,
method,

25
src/views/modules/board/sopBoard.vue

@ -1,7 +1,7 @@
<template>
<div class="mod-config container ">
<div class="pdfMenu" >
<h1 style="color: white">SOP指导书 当前派工单|{{seqNo}}</h1>
<h1 style="color: white">SOP指导书 派工单|{{seqNo}}</h1>
</div>
<div class="pdf-wrapper" ref="pdfWrapper">
<img style="max-width: 100%;max-height: 100%;vertical-align:middle;" :src="sopUrl">
@ -15,7 +15,7 @@
<!-- ></pdf>-->
</div>
<div class="pdfMenu" >
<h1 style="color: white">SIP指导书 当前操作员|{{operator}}</h1>
<h1 style="color: white">SIP指导书 操作员|{{operator}}</h1>
</div>
<div class="pdf-wrapper" ref="pdfWrapper">
<img style="max-width: 100%;max-height: 100%;vertical-align:middle;" :src="badUrl">
@ -76,7 +76,7 @@
//
setInterval(() => {
this.getPDF();
}, 60000)
}, 90000)
},
changePage() {
//
@ -105,7 +105,6 @@
}
getSopAddress(data).then(({data}) => {
if(data.code==0){
debugger
if(data.data.nowSeqNo==null||data.data.nowSeqNo==''){
this.sopUrl='';
this.badUrl='';
@ -120,8 +119,6 @@
this.seqNo = data.data.nowSeqNo;
this.sopList=data.sop;
this.badList=data.bad;
console.log("开始打印")
console.log(data.sop)
this.sopPage=1;
this.badPage=1;
this.sopMax=data.sop.length;
@ -132,12 +129,17 @@
if(this.badList.length>0){
this.badUrl=this.packageUrl+this.badList[0].attaFileNameDb;
}
}else if(this.seqNo==data.data.nowSeqNo) {
this.sopList=data.sop;
this.badList=data.bad;
this.sopMax=data.sop.length;
this.badMax=data.bad.length;
}
console.log("SOP:"+ this.sopUrl)
console.log("不良:"+ this.badUrl)
console.log(this.$store.state.user.tvSopUrl)
console.log(this.sopList)
console.log("SOP:"+ this.sopList[0].attaFileNameDb)
// console.log("SOP"+ this.sopUrl)
// console.log(""+ this.badUrl)
// console.log(this.$store.state.user.tvSopUrl)
// console.log(this.sopList)
// console.log("SOP"+ this.sopList[0].attaFileNameDb)
}else {
this.sopUrl='';
this.badUrl='';
@ -215,6 +217,7 @@
height: 100%;
}
.pdfMenu {
font-size: 11px;
width: 7%;
height: 100%;
float: left;

7
src/views/modules/production/operator.vue

@ -88,13 +88,6 @@
min-width="100"
label="部门">
</el-table-column>
<el-table-column
prop="tvId"
header-align="center"
align="left"
min-width="100"
label="工位电视机">
</el-table-column>
<el-table-column
prop="createdDate"
header-align="center"

16
src/views/modules/taskmanage/chat-history.vue

@ -11,14 +11,23 @@
<el-row>
<el-col :span="24">
<el-form-item label="主题" prop="taskHeader">
<el-input style="width: 750px" v-model="headerData.taskHeader"></el-input>
<el-input style="width: 750px" v-model="headerData.taskHeader" readonly></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="redModel">
<el-form-item label="要求完成时间" prop="taskHeader" label-class="red-label" style="font-weight:bold;color:#bd0b06">
<el-input style="width: 750px" v-model="headerData.requiredCompletionDate" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="任务描述">
<el-input type="textarea" style="width: 750px" v-model="headerData.taskDescription"></el-input>
<el-input type="textarea" style="width: 750px" v-model="headerData.taskDescription" readonly></el-input>
</el-form-item>
</el-col>
</el-row>
@ -87,7 +96,7 @@
columnList: [
{
columnProp: "createDate",
columnLabel: "时间",
columnLabel: "沟通时间",
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -155,6 +164,7 @@
this.dataForm.taskId = row.id || 0
this.headerData.taskHeader = row.taskHeader
this.headerData.taskDescription = row.taskDescription
this.headerData.requiredCompletionDate = row.requiredCompletionDate
this.visible = true
this.getDataList()
},

21
src/views/modules/taskmanage/chatting.vue

@ -79,6 +79,7 @@
<script>
import FtpUpload from '@/views/modules/common/ftp-upload.vue'
import {ossList,downFtpFileNotFtp} from '@/api/ftp/oss.js'
import {saveChatHistory} from '@/api/taskmanage/chatHistory.js'
import axios from "axios";
import Vue from "vue";
@ -155,17 +156,17 @@
},
//
downFtpFile(row){
//'/proxyApi/ftp/file/downFtpFile/'
// '/api/ftp/file/downFtpFile/'
axios.get( '/api/ftp/file/downFtpFile/' + row.id, {
responseType: 'blob',
headers: {
'Content-Type': 'application/json',
'token': Vue.cookie.get('token')
}
}).then(({data}) => {
// axios.get('/api/ftp/file/downFtpFile/' + row.id, {
// responseType: 'blob',
// headers: {
// 'Content-Type': 'application/json',
// 'token': Vue.cookie.get('token')
// }
// }).then(({data}) => {
downFtpFileNotFtp(row)
.then(({data}) => {
//
const blob = new Blob([data], {type: "application/octet-stream"})
const blob = new Blob([data], {type: "application/octet-stream;charset=utf-8"})
//
const fileName = row.fileName
// a

4
src/views/modules/taskmanage/mysendtasklist.vue

@ -519,10 +519,10 @@
})
},
//
chatHistoryDialog(id){
chatHistoryDialog(row){
this.chatHistoryVisible = true
this.$nextTick(() => {
this.$refs.chatHistory.init(id)
this.$refs.chatHistory.init(row)
})
},
//

21
src/views/modules/taskmanage/task-file-list.vue

@ -57,7 +57,7 @@
</template>
<script>
import {ossList} from '@/api/ftp/oss.js'
import {ossList,downFtpFileNotFtp} from '@/api/ftp/oss.js'
import axios from "axios";
import Vue from "vue";
export default {
@ -166,16 +166,17 @@
},
//
downFtpFile(row){
//'/proxyApi/ftp/file/downFtpFile/'
axios.get('/api/ftp/file/downFtpFile/' + row.id, {
responseType: 'blob',
headers: {
'Content-Type': 'application/json',
'token': Vue.cookie.get('token')
}
}).then(({data}) => {
// axios.get('/api/ftp/file/downFtpFile/' + row.id, {
// responseType: 'blob',
// headers: {
// 'Content-Type': 'application/json',
// 'token': Vue.cookie.get('token')
// }
// }).then(({data}) => {
downFtpFileNotFtp(row)
.then(({data}) => {
//
const blob = new Blob([data], {type: "application/octet-stream"})
const blob = new Blob([data], {type: "application/octet-stream;charset=utf-8"})
//
const fileName = row.fileName
// a

19
src/views/modules/taskmanage/task-file-upload-list.vue

@ -68,7 +68,7 @@
</template>
<script>
import {ossList} from '@/api/ftp/oss.js'
import {ossList,downFtpFileNotFtp} from '@/api/ftp/oss.js'
import Vue from "vue";
import FtpUpload from '@/views/modules/common/ftp-upload.vue'
import axios from "axios";
@ -213,14 +213,15 @@
},
//
downFtpFile(row) {
//'/proxyApi/ftp/file/downFtpFile/'
axios.get('/api/ftp/file/downFtpFile/' + row.id, {
responseType: 'blob',
headers: {
'Content-Type': 'application/json',
'token': Vue.cookie.get('token')
}
}).then(({data}) => {
// axios.get('/api/ftp/file/downFtpFile/' + row.id, {
// responseType: 'blob',
// headers: {
// 'Content-Type': 'application/json',
// 'token': Vue.cookie.get('token')
// }
// }).then(({data}) => {
downFtpFileNotFtp(row)
.then(({data}) => {
//
const blob = new Blob([data], {type: "application/octet-stream"})
//

Loading…
Cancel
Save