|
@@ -72,6 +72,7 @@ import { updateItemStatus } from "@/api/workManagement/mainProject";
|
|
|
import { getUserList } from "@/api/workManagement/mainProject";
|
|
|
import { saveMessage } from "@/api/logs";
|
|
|
import { getGoodsDescList } from "@/api/standAlone/saleLeads";
|
|
|
+import {getToken} from "@/util/auth";
|
|
|
export default {
|
|
|
name: "customerInformation",
|
|
|
data() {
|
|
@@ -248,21 +249,49 @@ export default {
|
|
|
this.exportLoading = true
|
|
|
let searchParams = Object.assign({}, this.search);
|
|
|
let param = this.paramsAdjustment(searchParams)
|
|
|
- getFlowList(1, 10000, param).then(res => {
|
|
|
- const fileData = this.deepClone(res.data.data.records)
|
|
|
- fileData.map(item => {
|
|
|
- item.cornId = item.cornName
|
|
|
+
|
|
|
+ let config = { params: { ...this.search } }
|
|
|
+ if (config.params) {
|
|
|
+ for (const propName of Object.keys(config.params)) {
|
|
|
+ const value = config.params[propName];
|
|
|
+ if (value !== null && typeof (value) !== "undefined") {
|
|
|
+ if (value instanceof Array) {
|
|
|
+ for (const key of Object.keys(value)) {
|
|
|
+ let params = propName + '[' + key + ']';
|
|
|
+ config.params[params] = value[key]
|
|
|
+ }
|
|
|
+ delete config.params[propName]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ config.params.status = '1,4,5'
|
|
|
+ config.params.deptid = ''
|
|
|
+ config.params.branch = 'Y'
|
|
|
+ console.log(config.params)
|
|
|
+ const routeData = this.$router.resolve({
|
|
|
+ path: '/api/trade-project/project/itemTask/export', //跳转目标下载地址
|
|
|
+ query: {
|
|
|
+ ...config.params //括号内是要传递给新窗口的参数
|
|
|
+ }
|
|
|
})
|
|
|
- const fileColumn = this.deepClone(option.column)
|
|
|
- fileColumn.shift();
|
|
|
- this.$Export.excel({
|
|
|
- title: "任务",
|
|
|
- columns: fileColumn,
|
|
|
- data: fileData,
|
|
|
- });
|
|
|
- }).finally(() => {
|
|
|
- this.exportLoading = false
|
|
|
- })
|
|
|
+ window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
|
|
|
+
|
|
|
+ // getFlowList(1, 10000, param).then(res => {
|
|
|
+ // const fileData = this.deepClone(res.data.data.records)
|
|
|
+ // fileData.map(item => {
|
|
|
+ // item.cornId = item.cornName
|
|
|
+ // })
|
|
|
+ // const fileColumn = this.deepClone(option.column)
|
|
|
+ // fileColumn.shift();
|
|
|
+ // this.$Export.excel({
|
|
|
+ // title: "任务",
|
|
|
+ // columns: fileColumn,
|
|
|
+ // data: fileData,
|
|
|
+ // });
|
|
|
+ // }).finally(() => {
|
|
|
+ // this.exportLoading = false
|
|
|
+ // })
|
|
|
},
|
|
|
//完工
|
|
|
completion(row) {
|