8 changed files with 1472 additions and 142 deletions
-
9src/api/taskmanage/tasklist.js
-
534src/views/modules/taskmanage/alltasklist.vue
-
560src/views/modules/taskmanage/mysendtasklist.vue
-
47src/views/modules/taskmanage/mytasklist.vue
-
235src/views/modules/taskmanage/task-file-upload-list.vue
-
148src/views/modules/taskmanage/tasklist-add-or-update.vue
-
79src/views/modules/taskmanage/tasklist.vue
-
2static/config/index-prod.js
@ -0,0 +1,534 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<el-button @click="getDataList()" type="primary">查询</el-button> |
||||
|
|
||||
|
<download-excel |
||||
|
:fields="fields()" |
||||
|
type="xls" |
||||
|
:name="exportName" |
||||
|
:fetch="createExportData" |
||||
|
worksheet="导出信息" |
||||
|
class="el-button el-button--primary el-button--medium"> |
||||
|
{{ '导出' }} |
||||
|
</download-excel> |
||||
|
|
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<el-form :inline="true" label-position="top" :model="dataForm" @keyup.enter.native="getDataList()"> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<el-form-item label="责任部门"> |
||||
|
<el-input style="width: 120px" v-model="dataForm.department" clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="责任人"> |
||||
|
<el-input style="width: 120px" v-model="dataForm.responsiblePerson" clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="发起日期"> |
||||
|
<el-date-picker style="width: 120px" v-model="dataForm.startDate" |
||||
|
value-format='yyyy-MM-dd 00:00:00' |
||||
|
format='yyyy-MM-dd' |
||||
|
></el-date-picker> |
||||
|
- |
||||
|
<el-date-picker style="width: 120px" v-model="dataForm.endDate" |
||||
|
value-format='yyyy-MM-dd 23:59:59' |
||||
|
format='yyyy-MM-dd' |
||||
|
></el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col style="margin-top: -5px" :span="24"> |
||||
|
<el-form-item label="客户"> |
||||
|
<el-input style="width: 120px" v-model="dataForm.customer" clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="状态"> |
||||
|
<el-select v-model="dataForm.status" style="width: 120px"> |
||||
|
<el-option label="全部" value=""></el-option> |
||||
|
<el-option label="未受理" value="未受理"></el-option> |
||||
|
<el-option label="已受理" value="已受理"></el-option> |
||||
|
<el-option label="已结束" value="已结束"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="要求完成日期"> |
||||
|
<el-date-picker style="width: 120px" v-model="dataForm.finishStartDate" |
||||
|
value-format='yyyy-MM-dd 00:00:00' |
||||
|
format='yyyy-MM-dd' |
||||
|
></el-date-picker> |
||||
|
- |
||||
|
<el-date-picker style="width: 120px" v-model="dataForm.finishEndDate" |
||||
|
value-format='yyyy-MM-dd 23:59:59' |
||||
|
format='yyyy-MM-dd' |
||||
|
></el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<el-table |
||||
|
:data="dataList" |
||||
|
border |
||||
|
:height="height" |
||||
|
v-loading="dataListLoading" |
||||
|
@selection-change="selectionChangeHandle" |
||||
|
highlight-current-row |
||||
|
style="width: 100%;"> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="'center'" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
fixed="right" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="160" |
||||
|
label="操作"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-link type="text" size="small" @click="annex(scope.row.id)">沟通附件 |</el-link> |
||||
|
<el-link type="text" size="small" @click="annex(scope.row.taskId)">任务附件 |</el-link> |
||||
|
<el-link v-if="isAuth('taskmanage:tasklist:delete')" type="text" size="small" |
||||
|
@click="deleteHandle(scope.row.id)">删除 |
||||
|
</el-link> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<!-- 沟通记录 --> |
||||
|
<chat-history v-if="chatHistoryVisible" ref="chatHistory" ></chat-history> |
||||
|
<task-file-list v-if="taskFileVisible" ref="taskFileList"></task-file-list> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import AddOrUpdate from './tasklist-add-or-update' |
||||
|
import ChatHistory from './chat-history.vue' |
||||
|
import {getTaskDetailList,removerDetail} from '@/api/taskmanage/tasklist.js' |
||||
|
import TaskFileList from './task-file-list.vue' |
||||
|
|
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
height: 200, |
||||
|
dataForm: { |
||||
|
site: this.$store.state.user.site, |
||||
|
customer: '', |
||||
|
taskHeader: '', |
||||
|
project: '', |
||||
|
taskDescription: '', |
||||
|
taskInitiator: '', |
||||
|
finalStatus: '', |
||||
|
department: '', |
||||
|
responsiblePerson: '', |
||||
|
startDate: '', |
||||
|
endDate: '', |
||||
|
finishStartDate: '', |
||||
|
finishEndDate: '', |
||||
|
status: '', |
||||
|
}, |
||||
|
// 展示列集 |
||||
|
columnList: [ |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "taskStartDate", |
||||
|
columnLabel: "发起日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "taskInitiator", |
||||
|
columnLabel: "任务发起人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "customer", |
||||
|
columnLabel: "客户", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "taskHeader", |
||||
|
columnLabel: "任务主题", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "project", |
||||
|
columnLabel: "项目", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "taskDescription", |
||||
|
columnLabel: "任务描述", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "department", |
||||
|
columnLabel: "责任部门", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "responsiblePerson", |
||||
|
columnLabel: "责任人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "requiredCompletionDate", |
||||
|
columnLabel: "要求完成日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "status", |
||||
|
columnLabel: "状态", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "finalStatus", |
||||
|
columnLabel: "最终状态", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "createdBy", |
||||
|
columnLabel: "创建人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "createdDate", |
||||
|
columnLabel: "创建时间", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: 140, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "updatedBy", |
||||
|
columnLabel: "修改人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "updatedDate", |
||||
|
columnLabel: "修改时间", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: 140, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
], |
||||
|
dataList: [], |
||||
|
selectRow: { |
||||
|
id: 0, |
||||
|
finalStatus: '', |
||||
|
}, |
||||
|
dataListLoading: false, |
||||
|
dataListSelections: [], |
||||
|
addOrUpdateVisible: false, |
||||
|
chatHistoryVisible: false, |
||||
|
statusVisible: false, |
||||
|
taskFileVisible: false, |
||||
|
exportName: this.$route.meta.title + this.dayjs().format('YYYYMMDDHHmmss') |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
AddOrUpdate, |
||||
|
ChatHistory, |
||||
|
TaskFileList |
||||
|
}, |
||||
|
activated() { |
||||
|
// this.getDataList() |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$nextTick(() => { |
||||
|
this.height = window.innerHeight - 250; |
||||
|
}) |
||||
|
}, |
||||
|
methods: { |
||||
|
// 获取数据列表 |
||||
|
getDataList() { |
||||
|
this.dataListLoading = true |
||||
|
getTaskDetailList(this.dataForm).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.dataList = data.data |
||||
|
} else { |
||||
|
this.dataList = [] |
||||
|
} |
||||
|
this.dataListLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 多选 |
||||
|
selectionChangeHandle(val) { |
||||
|
this.dataListSelections = val |
||||
|
}, |
||||
|
// 新增 / 修改 |
||||
|
addOrUpdateHandle(id) { |
||||
|
this.addOrUpdateVisible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.addOrUpdate.init(id) |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 沟通记录 |
||||
|
chatHistoryDialog(id){ |
||||
|
this.chatHistoryVisible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.chatHistory.init(id) |
||||
|
}) |
||||
|
}, |
||||
|
// 附件 |
||||
|
annex(id) { |
||||
|
this.taskFileVisible = true |
||||
|
let dto = { |
||||
|
fileTypeCode: 'TASK', |
||||
|
orderRef2:id |
||||
|
} |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.taskFileList.init(dto) |
||||
|
}) |
||||
|
}, |
||||
|
// 删除 |
||||
|
deleteHandle(id) { |
||||
|
var ids = id ? [id] : this.dataListSelections.map(item => { |
||||
|
return item.id |
||||
|
}) |
||||
|
this.$confirm(`确定进行[删除]操作?`, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
removerDetail(ids).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success('操作成功') |
||||
|
this.getDataList() |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
// 导出 |
||||
|
fields() { |
||||
|
let json = "{" |
||||
|
this.columnList.forEach((item, index) => { |
||||
|
if (index == this.columnList.length - 1) { |
||||
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" |
||||
|
} else { |
||||
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + "," |
||||
|
} |
||||
|
}) |
||||
|
json += "}" |
||||
|
let s = eval("(" + json + ")") |
||||
|
return s |
||||
|
}, |
||||
|
createExportData() { |
||||
|
// 点击导出按钮之后,开始导出数据之前的执行函数,返回值为需要下载的数据 |
||||
|
return this.dataList; |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,560 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<el-button @click="getDataList()" type="primary">查询</el-button> |
||||
|
<download-excel |
||||
|
:fields="fields()" |
||||
|
type="xls" |
||||
|
:name="exportName" |
||||
|
:fetch="createExportData" |
||||
|
worksheet="导出信息" |
||||
|
class="el-button el-button--primary el-button--medium"> |
||||
|
{{ '导出' }} |
||||
|
</download-excel> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<el-form :inline="true" label-position="top" :model="dataForm" @keyup.enter.native="getDataList()"> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<el-form-item label="责任部门"> |
||||
|
<el-input style="width: 120px" v-model="dataForm.department" clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="责任人"> |
||||
|
<el-input style="width: 120px" v-model="dataForm.responsiblePerson" clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="客户"> |
||||
|
<el-input style="width: 120px" v-model="dataForm.customer" clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="状态"> |
||||
|
<el-select v-model="dataForm.status" style="width: 120px"> |
||||
|
<el-option label="全部" value=""></el-option> |
||||
|
<el-option label="未受理" value="未受理"></el-option> |
||||
|
<el-option label="已受理" value="已受理"></el-option> |
||||
|
<el-option label="已结束" value="已结束"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="发起日期"> |
||||
|
<el-date-picker style="width: 120px" v-model="dataForm.startDate" |
||||
|
value-format='yyyy-MM-dd 00:00:00' |
||||
|
format='yyyy-MM-dd' |
||||
|
></el-date-picker> |
||||
|
- |
||||
|
<el-date-picker style="width: 120px" v-model="dataForm.endDate" |
||||
|
value-format='yyyy-MM-dd 23:59:59' |
||||
|
format='yyyy-MM-dd' |
||||
|
></el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="要求完成日期"> |
||||
|
<el-date-picker style="width: 120px" v-model="dataForm.finishStartDate" |
||||
|
value-format='yyyy-MM-dd 00:00:00' |
||||
|
format='yyyy-MM-dd' |
||||
|
></el-date-picker> |
||||
|
- |
||||
|
<el-date-picker style="width: 120px" v-model="dataForm.finishEndDate" |
||||
|
value-format='yyyy-MM-dd 23:59:59' |
||||
|
format='yyyy-MM-dd' |
||||
|
></el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<el-table |
||||
|
:data="dataList" |
||||
|
border |
||||
|
:height="height" |
||||
|
v-loading="dataListLoading" |
||||
|
@selection-change="selectionChangeHandle" |
||||
|
highlight-current-row |
||||
|
style="width: 100%;"> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="'center'" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
fixed="right" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="220" |
||||
|
label="操作"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-link type="text" size="small" @click="updateStatusDialog(scope.row)">更改状态 |</el-link> |
||||
|
<el-link type="text" size="small" @click="chatHistoryDialog(scope.row.id)">沟通 |</el-link> |
||||
|
<el-link type="text" size="small" @click="annex(scope.row.taskId)">任务附件 |</el-link> |
||||
|
<el-link type="text" size="small" @click="annex(scope.row.id)"> 沟通附件</el-link> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-dialog |
||||
|
v-drag |
||||
|
:title="'更改状态'" |
||||
|
:close-on-click-modal="false" |
||||
|
width="139px" |
||||
|
:visible.sync="statusVisible"> |
||||
|
<el-form :model="dataForm" :inline="true" label-position="top" |
||||
|
label-width="80px"> |
||||
|
<el-form-item label="状态"> |
||||
|
<el-select v-model="selectRow.status" style="width: 120px"> |
||||
|
<el-option label="未受理" value="未受理"></el-option> |
||||
|
<el-option label="已受理" value="已受理"></el-option> |
||||
|
<el-option label="已结束" value="已结束"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<span slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="updateStatus()">确定</el-button> |
||||
|
<el-button type="primary" @click="statusVisible = false">取消</el-button> |
||||
|
</span> |
||||
|
</el-dialog> |
||||
|
<!-- 沟通记录 --> |
||||
|
<chat-history v-if="chatHistoryVisible" ref="chatHistory" ></chat-history> |
||||
|
<task-file-list v-if="taskFileVisible" ref="taskFileList"></task-file-list> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
|
||||
|
import ChatHistory from './chat-history.vue' |
||||
|
import {getTaskDetailList,updateTask} from '@/api/taskmanage/tasklist.js' |
||||
|
import TaskFileList from './task-file-list.vue' |
||||
|
|
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
height: 200, |
||||
|
dataForm: { |
||||
|
site: this.$store.state.user.site, |
||||
|
customer: '', |
||||
|
taskHeader: '', |
||||
|
project: '', |
||||
|
taskDescription: '', |
||||
|
taskInitiator: this.$store.state.user.name, |
||||
|
finalStatus: '', |
||||
|
department: '', |
||||
|
responsiblePerson: '', |
||||
|
startDate: '', |
||||
|
endDate: '', |
||||
|
finishStartDate: '', |
||||
|
finishEndDate: '', |
||||
|
status: '', |
||||
|
}, |
||||
|
// 展示列集 |
||||
|
columnList: [ |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "taskStartDate", |
||||
|
columnLabel: "发起日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "taskInitiator", |
||||
|
columnLabel: "任务发起人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "customer", |
||||
|
columnLabel: "客户", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "taskHeader", |
||||
|
columnLabel: "任务主题", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "project", |
||||
|
columnLabel: "项目", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "taskDescription", |
||||
|
columnLabel: "任务描述", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "department", |
||||
|
columnLabel: "责任部门", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "responsiblePerson", |
||||
|
columnLabel: "责任人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "requiredCompletionDate", |
||||
|
columnLabel: "要求完成日期", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "status", |
||||
|
columnLabel: "状态", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "finalStatus", |
||||
|
columnLabel: "最终状态", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "createdBy", |
||||
|
columnLabel: "创建人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "createdDate", |
||||
|
columnLabel: "创建时间", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: 140, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "updatedBy", |
||||
|
columnLabel: "修改人", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
tableId: "ProjectInfo", |
||||
|
tableName: this.$route.meta.title, |
||||
|
columnProp: "updatedDate", |
||||
|
columnLabel: "修改时间", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: 140, |
||||
|
format: null, |
||||
|
functionId: this.$route.meta.menuId, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
], |
||||
|
dataList: [], |
||||
|
selectRow: { |
||||
|
id: 0, |
||||
|
status: '', |
||||
|
}, |
||||
|
dataListLoading: false, |
||||
|
dataListSelections: [], |
||||
|
chatHistoryVisible: false, |
||||
|
statusVisible: false, |
||||
|
taskFileVisible: false, |
||||
|
exportName: this.$route.meta.title + this.dayjs().format('YYYYMMDDHHmmss') |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
ChatHistory, |
||||
|
TaskFileList |
||||
|
}, |
||||
|
activated() { |
||||
|
// this.getDataList() |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$nextTick(() => { |
||||
|
this.height = window.innerHeight - 200; |
||||
|
}) |
||||
|
}, |
||||
|
methods: { |
||||
|
// 获取数据列表 |
||||
|
getDataList() { |
||||
|
this.dataListLoading = true |
||||
|
getTaskDetailList(this.dataForm).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.dataList = data.data |
||||
|
} else { |
||||
|
this.dataList = [] |
||||
|
} |
||||
|
this.dataListLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 多选 |
||||
|
selectionChangeHandle(val) { |
||||
|
this.dataListSelections = val |
||||
|
}, |
||||
|
// 更改状态模态框 |
||||
|
updateStatusDialog(row) { |
||||
|
this.selectRow.status = row.status |
||||
|
this.selectRow.id = row.id |
||||
|
this.statusVisible = true; |
||||
|
}, |
||||
|
// 更改状态提交 |
||||
|
updateStatus() { |
||||
|
updateTask(this.selectRow).then(({data}) =>{ |
||||
|
if (data && data.code == 0 ){ |
||||
|
this.statusVisible = false |
||||
|
this.$message.success(data.msg) |
||||
|
this.getDataList() |
||||
|
}else { |
||||
|
this.$message.warning(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 沟通记录 |
||||
|
chatHistoryDialog(id){ |
||||
|
this.chatHistoryVisible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.chatHistory.init(id) |
||||
|
}) |
||||
|
}, |
||||
|
// 附件 |
||||
|
annex(id) { |
||||
|
this.taskFileVisible = true |
||||
|
let dto = { |
||||
|
fileTypeCode: 'TASK', |
||||
|
orderRef2:id |
||||
|
} |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.taskFileList.init(dto) |
||||
|
}) |
||||
|
}, |
||||
|
// 删除 |
||||
|
deleteHandle(id) { |
||||
|
var ids = id ? [id] : this.dataListSelections.map(item => { |
||||
|
return item.id |
||||
|
}) |
||||
|
this.$confirm(`确定进行[${id ? '删除' : '批量删除'}]操作?`, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
this.$http({ |
||||
|
url: this.$http.adornUrl('/taskmanage/tasklist/delete'), |
||||
|
method: 'post', |
||||
|
data: this.$http.adornData(ids, false) |
||||
|
}).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success('操作成功') |
||||
|
this.getDataList() |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
// 导出 |
||||
|
fields() { |
||||
|
let json = "{" |
||||
|
this.columnList.forEach((item, index) => { |
||||
|
if (index == this.columnList.length - 1) { |
||||
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" |
||||
|
} else { |
||||
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + "," |
||||
|
} |
||||
|
}) |
||||
|
json += "}" |
||||
|
let s = eval("(" + json + ")") |
||||
|
return s |
||||
|
}, |
||||
|
createExportData() { |
||||
|
// 点击导出按钮之后,开始导出数据之前的执行函数,返回值为需要下载的数据 |
||||
|
return this.dataList; |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,235 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<el-dialog |
||||
|
:title="'附件列表'" |
||||
|
:close-on-click-modal="false" |
||||
|
width="666px" |
||||
|
:visible.sync="visible"> |
||||
|
<el-form :model="dataForm" :inline="true" label-position="top" ref="dataForm" |
||||
|
label-width="80px"> |
||||
|
<el-row style="margin-top: -5px"> |
||||
|
<el-col :span="24"> |
||||
|
<!-- <el-form-item label="附件">--> |
||||
|
<!-- <el-input style="width: 305px; color: red" readonly v-model="dataForm.fileName"></el-input>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<el-form-item style="margin-top: 10px"> |
||||
|
<ftp-upload @childByValue="childByValue"></ftp-upload> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<span style="font-size: 12px">附件清单</span> |
||||
|
<el-table |
||||
|
:data="fileList" |
||||
|
border |
||||
|
:height="height" |
||||
|
highlight-current-row |
||||
|
style="width: 100%;"> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList" :key="index" |
||||
|
:sortable="item.columnSortable" |
||||
|
:prop="item.columnProp" |
||||
|
:header-align="'center'" |
||||
|
:show-overflow-tooltip="item.showOverflowTooltip" |
||||
|
:align="item.align" |
||||
|
:fixed="item.fixed==''?false:item.fixed" |
||||
|
:width="item.columnWidth" |
||||
|
:label="item.columnLabel"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
||||
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
||||
|
style="width: 100px; height: 80px"/></span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
fixed="right" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="80" |
||||
|
label="操作"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-link type="text" size="small" @click="downFtpFile(scope.row)"> 下载</el-link> |
||||
|
<el-link type="text" size="small" @click="deleteHandle(scope.row.id)"> 删除</el-link> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<span slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="visible = false">关闭</el-button> |
||||
|
</span> |
||||
|
</el-dialog> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import {ossList} from '@/api/ftp/oss.js' |
||||
|
import Vue from "vue"; |
||||
|
import FtpUpload from '@/views/modules/common/ftp-upload.vue' |
||||
|
import axios from "axios"; |
||||
|
|
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
visible: false, |
||||
|
height: 200, |
||||
|
// 展示列集 |
||||
|
columnList: [ |
||||
|
{ |
||||
|
columnProp: "fileName", |
||||
|
columnLabel: "文件名", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
columnProp: "fileType", |
||||
|
columnLabel: "文件类型", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
}, |
||||
|
{ |
||||
|
columnProp: "createDate", |
||||
|
columnLabel: "上传时间", |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
columnWidth: null, |
||||
|
format: null, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
serialNumber: null, |
||||
|
columnType: null, |
||||
|
align: null |
||||
|
} |
||||
|
], |
||||
|
dataListSelections: [], |
||||
|
dataForm: {}, |
||||
|
fileList: [] |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
FtpUpload |
||||
|
}, |
||||
|
methods: { |
||||
|
init(val) { |
||||
|
this.dataForm = val |
||||
|
this.visible = true |
||||
|
this.getDataList() |
||||
|
}, |
||||
|
childByValue(childValue) { |
||||
|
// childValue就是子组件传过来的值 |
||||
|
this.dataForm.fileName = childValue.fileName |
||||
|
this.fileList.push(childValue) |
||||
|
// 回写关键字段 |
||||
|
let dto = { |
||||
|
id:childValue.id, |
||||
|
orderRef1:this.dataForm.orderRef2, |
||||
|
orderRef2:this.dataForm.orderRef2, |
||||
|
fileTypeCode:this.dataForm.fileTypeCode, |
||||
|
} |
||||
|
this.updateOrderRef(dto) |
||||
|
}, |
||||
|
// 附件列表 |
||||
|
getDataList() { |
||||
|
ossList(this.dataForm).then(({data}) => { |
||||
|
if (data && data.code == 0) { |
||||
|
this.fileList = data.data |
||||
|
} else { |
||||
|
this.fileList = [] |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 回写关键字段 |
||||
|
updateOrderRef(val){ |
||||
|
this.$http({ |
||||
|
url: this.$http.adornUrl('/sys/oss/uploadSysOss'), |
||||
|
method: 'post', |
||||
|
data: this.$http.adornData(val, false) |
||||
|
}).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success('操作成功') |
||||
|
this.getDataList() |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 下载附件 |
||||
|
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}) => { |
||||
|
// 不限制文件下载类型 |
||||
|
const blob = new Blob([data], {type: "application/octet-stream"}) |
||||
|
// 下载文件名称 |
||||
|
const fileName = row.fileName |
||||
|
// a标签下载 |
||||
|
const linkNode = document.createElement('a') |
||||
|
linkNode.download = fileName // a标签的download属性规定下载文件的名称 |
||||
|
linkNode.style.display = 'none' |
||||
|
linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL |
||||
|
document.body.appendChild(linkNode) |
||||
|
linkNode.click() // 模拟在按钮上的一次鼠标单击 |
||||
|
URL.revokeObjectURL(linkNode.href) // 释放URL 对象 |
||||
|
document.body.removeChild(linkNode) |
||||
|
// } |
||||
|
}) |
||||
|
}, |
||||
|
// 删除 |
||||
|
deleteHandle(id) { |
||||
|
let ids = [id] |
||||
|
this.$confirm(`确定进行[删除]操作?`, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
this.$http({ |
||||
|
url: this.$http.adornUrl('/sys/oss/delete'), |
||||
|
method: 'post', |
||||
|
data: this.$http.adornData(ids, false) |
||||
|
}).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success('操作成功') |
||||
|
this.getDataList() |
||||
|
} else { |
||||
|
this.$message.error(data.msg) |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue