Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop

This commit is contained in:
caoqianming 2022-04-22 08:38:34 +08:00
commit 309b9f3b20
6 changed files with 117 additions and 105 deletions

View File

@ -3,6 +3,6 @@ ENV = 'production'
# base api # base api
#VUE_APP_BASE_API = 'http://192.168.1.250/api' #VUE_APP_BASE_API = 'http://192.168.1.250/api'
VUE_APP_BASE_API = 'http://127.0.0.1:3333/api' VUE_APP_BASE_API = 'http://49.232.14.174:2222/api'
#VUE_APP_BASE_API = 'http://127.0.0.1:8000/api' #VUE_APP_BASE_API = 'http://127.0.0.1:8000/api'

View File

@ -65,6 +65,13 @@ export function getTestRecord(query) {
params: query params: query
}) })
} }
//检测记录模板
export function getTestRecordExport(id) {
return request({
url: `/qm/testrecord/${id}/export/`,
method: 'get'
})
}
//检测记录 //检测记录
export function getTestRecordItem(id) { export function getTestRecordItem(id) {
return request({ return request({

View File

@ -113,7 +113,7 @@ export const asyncRoutes = [
path: 'material/:id', path: 'material/:id',
name: 'MaterialDO', name: 'MaterialDO',
component: () => import('@/views/mtm/materialdo.vue'), component: () => import('@/views/mtm/materialdo.vue'),
meta: { title: '绑定检查表', perms: ['vendor_manage'] }, meta: { title: '绑定检查表' },
hidden: true hidden: true
} }
, ,
@ -121,7 +121,7 @@ export const asyncRoutes = [
path: 'materialDetail/:id', path: 'materialDetail/:id',
name: 'MaterialDetail', name: 'MaterialDetail',
component: () => import('@/views/mtm/materialDetail.vue'), component: () => import('@/views/mtm/materialDetail.vue'),
meta: { title: '物料详情', perms: ['vendor_manage'] }, meta: { title: '物料详情' },
hidden: true hidden: true
}, },
{ {
@ -134,7 +134,7 @@ export const asyncRoutes = [
path: 'step/:id', path: 'step/:id',
name: 'Step', name: 'Step',
component: () => import('@/views/mtm/step.vue'), component: () => import('@/views/mtm/step.vue'),
meta: { title: '子工序', perms: ['vendor_manage'] }, meta: { title: '子工序'},
hidden: true hidden: true
} }
, ,
@ -142,7 +142,7 @@ export const asyncRoutes = [
path: 'stepdo/:id', path: 'stepdo/:id',
name: 'StepDo', name: 'StepDo',
component: () => import('@/views/mtm/stepdo.vue'), component: () => import('@/views/mtm/stepdo.vue'),
meta: { title: '子工序查看', perms: ['vendor_manage'] }, meta: { title: '子工序查看'},
hidden: true hidden: true
}, },
{ {
@ -155,13 +155,13 @@ export const asyncRoutes = [
path: 'productList', path: 'productList',
name: 'productList', name: 'productList',
component: () => import('@/views/mtm/productList'), component: () => import('@/views/mtm/productList'),
meta: { title: '成品列表', icon: 'material', perms: ['mtm_material'] } meta: { title: '成品列表', icon: 'material', perms: ['mtm_product'] }
} }
,{ ,{
path: 'wproductList', path: 'wproductList',
name: 'wproductList', name: 'wproductList',
component: () => import('@/views/mtm/wproductList'), component: () => import('@/views/mtm/wproductList'),
meta: { title: '半成品列表', icon: 'material', perms: ['mtm_material'] } meta: { title: '半成品列表', icon: 'material', perms: ['mtm_wproduct'] }
} }
] ]
}, },
@ -183,7 +183,7 @@ export const asyncRoutes = [
path: 'work/:id', path: 'work/:id',
name: 'work', name: 'work',
component: () => import('@/views/pm/work'), component: () => import('@/views/pm/work'),
meta: { title: '生产子计划', perms: ['pm_plan'] }, meta: { title: '生产子计划'},
hidden: true hidden: true
}, },
{ {
@ -199,24 +199,24 @@ export const asyncRoutes = [
component: () => import('@/views/pm/management'), component: () => import('@/views/pm/management'),
meta: { title: '生产任务管理', icon: 'productionTask', perms: ['pm_testitem'] } meta: { title: '生产任务管理', icon: 'productionTask', perms: ['pm_testitem'] }
}, },
{ {
path: 'plandetails/:id', path: 'plandetails/:id',
name: 'plandetails', name: 'plandetails',
component: () => import('@/views/pm/plandetails'), component: () => import('@/views/pm/plandetails'),
meta: { title: '生产任务详情', perms: ['pm_testitem'] }, meta: { title: '生产任务详情'},
hidden: true hidden: true
} }
, ,
{ {
path: 'processcard/:id', path: 'processcard/:id',
name: 'processcard', name: 'processcard',
component: () => import('@/views/pm/processcard'), component: () => import('@/views/pm/processcard'),
meta: { title: '流程卡', perms: ['vendor_manage'] }, meta: { title: '流程卡' },
hidden: true hidden: true
} }
] ]
}, },
{ {
@ -226,7 +226,7 @@ export const asyncRoutes = [
name: 'wpm', name: 'wpm',
meta: { title: '生产执行', icon: 'execute', perms: ['wpm_manage'] }, meta: { title: '生产执行', icon: 'execute', perms: ['wpm_manage'] },
children: [ children: [
{ {
path: 'worktask', path: 'worktask',
name: 'worktask', name: 'worktask',
component: () => import('@/views/wpm/worktask'), component: () => import('@/views/wpm/worktask'),
@ -316,10 +316,10 @@ export const asyncRoutes = [
path: 'contractdetail/:id', path: 'contractdetail/:id',
name: 'contractdetail', name: 'contractdetail',
component: () => import('@/views/sam/contractdetail'), component: () => import('@/views/sam/contractdetail'),
meta: { title: '合同详情', perms: ['sam_contract'] }, meta: { title: '合同详情'},
hidden: true hidden: true
} }
, ,
{ {
path: 'order', path: 'order',
@ -327,13 +327,13 @@ export const asyncRoutes = [
component: () => import('@/views/sam/order'), component: () => import('@/views/sam/order'),
meta: { title: '订单管理', icon: 'order', perms: ['sam_order'] } meta: { title: '订单管理', icon: 'order', perms: ['sam_order'] }
} }
, ,
{ {
path: 'orderdetail/:id', path: 'orderdetail/:id',
name: 'orderdetail', name: 'orderdetail',
component: () => import('@/views/sam/orderdetail'), component: () => import('@/views/sam/orderdetail'),
meta: { title: '订单详情', perms: ['sam_order'] }, meta: { title: '订单详情'},
hidden: true hidden: true
}, },
{ {
@ -347,7 +347,7 @@ export const asyncRoutes = [
path: 'salesdetail/:id', path: 'salesdetail/:id',
name: 'salesdetail', name: 'salesdetail',
component: () => import('@/views/sam/salesdetail'), component: () => import('@/views/sam/salesdetail'),
meta: { title: '销售详情', perms: ['sam_sales'] }, meta: { title: '销售详情'},
hidden: true hidden: true
} }
] ]
@ -383,7 +383,7 @@ export const asyncRoutes = [
path: 'taskdetails/:id', path: 'taskdetails/:id',
name: 'taskdetails', name: 'taskdetails',
component: () => import('@/views/qm/taskdetails'), component: () => import('@/views/qm/taskdetails'),
meta: { title: '过程检验详情', perms: ['qm_processtest'] }, meta: { title: '过程检验详情'},
hidden: true hidden: true
} }
, ,
@ -391,7 +391,7 @@ export const asyncRoutes = [
path: 'wproduct/:id', path: 'wproduct/:id',
name: 'wproduct', name: 'wproduct',
component: () => import('@/views/qm/wproduct'), component: () => import('@/views/qm/wproduct'),
meta: { title: '工序玻璃', perms: ['vendor_manage'] }, meta: { title: '工序玻璃' },
hidden: true hidden: true
} }
, ,
@ -399,7 +399,7 @@ export const asyncRoutes = [
path: 'taskrecordfrom/:id', path: 'taskrecordfrom/:id',
name: 'taskrecordfrom', name: 'taskrecordfrom',
component: () => import('@/views/qm/taskrecordfrom'), component: () => import('@/views/qm/taskrecordfrom'),
meta: { title: '检验记录', perms: ['vendor_manage'] }, meta: { title: '检验记录'},
hidden: true hidden: true
} }
, ,
@ -415,7 +415,7 @@ export const asyncRoutes = [
component: () => import('@/views/qm/unproduct'), component: () => import('@/views/qm/unproduct'),
meta: { title: '不合格品', icon: 'unqualified', perms: ['qm_unproduct'] } meta: { title: '不合格品', icon: 'unqualified', perms: ['qm_unproduct'] }
} }
] ]
}, },
{ {
@ -423,19 +423,19 @@ export const asyncRoutes = [
component: Layout, component: Layout,
redirect: '/personnel/user', redirect: '/personnel/user',
name: 'personnel', name: 'personnel',
meta: { title: '人员管理', icon: 'user', perms: ['personnel_set'] }, meta: { title: '人员管理', icon: 'user', perms: ['employee_manage'] },
children: [ children: [
{ {
path: 'user', path: 'user',
name: 'user', name: 'user',
component: () => import('@/views/personnel/user'), component: () => import('@/views/personnel/user'),
meta: { title: '人员列表', icon: 'userList', perms: ['personnel_user'] } meta: { title: '人员列表', icon: 'userList', perms: ['employee_userList'] }
}, },
{ {
path: 'attendance', path: 'attendance',
name: 'attendance', name: 'attendance',
component: () => import('@/views/personnel/attendance'), component: () => import('@/views/personnel/attendance'),
meta: { title: '考勤列表', icon: 'attendance', perms: ['personnel_attendance'] } meta: { title: '考勤列表', icon: 'attendance', perms: ['employee_attendance'] }
} ,{ } ,{
path: 'userupdate/:id', path: 'userupdate/:id',
name: 'userupdate', name: 'userupdate',
@ -443,7 +443,7 @@ export const asyncRoutes = [
meta: { title: '人员信息详情', icon: 'home' }, meta: { title: '人员信息详情', icon: 'home' },
hidden: true hidden: true
}, },
] ]
}, },
{ {
@ -463,7 +463,7 @@ export const asyncRoutes = [
path: 'inventory/:id', path: 'inventory/:id',
name: 'inventory', name: 'inventory',
component: () => import('@/views/inm/inventory'), component: () => import('@/views/inm/inventory'),
meta: { title: '仓库物料', perms: ['vendor_manage'] }, meta: { title: '仓库物料' },
hidden: true hidden: true
} }
, ,
@ -483,7 +483,7 @@ export const asyncRoutes = [
path: 'fifodetail/:id', path: 'fifodetail/:id',
name: 'fifodetail', name: 'fifodetail',
component: () => import('@/views/inm/fifodetail'), component: () => import('@/views/inm/fifodetail'),
meta: { title: '仓库物料', perms: ['vendor_manage'] }, meta: { title: '仓库物料'},
hidden: true hidden: true
}, },
{ {
@ -498,7 +498,7 @@ export const asyncRoutes = [
component: () => import('@/views/inm/product'), component: () => import('@/views/inm/product'),
meta: { title: '成品库', icon: 'finishedProduct', perms: ['inm_product'] } meta: { title: '成品库', icon: 'finishedProduct', perms: ['inm_product'] }
}, },
] ]
}, },
{ {
@ -506,25 +506,25 @@ export const asyncRoutes = [
component: Layout, component: Layout,
redirect: '/procurement/vendor', redirect: '/procurement/vendor',
name: 'procurement', name: 'procurement',
meta: { title: '采购管理', icon: 'purchase', perms: ['procurement_manage'] }, meta: { title: '采购管理', icon: 'purchase', perms: ['pum_manage'] },
children: [ children: [
{ {
path: 'vendor', path: 'vendor',
name: 'vendor', name: 'vendor',
component: () => import('@/views/procurement/vendor'), component: () => import('@/views/procurement/vendor'),
meta: { title: '供应商', icon: 'supplier', perms: ['procurement_vendor'] } meta: { title: '供应商', icon: 'supplier', perms: ['pum_vendor'] }
}, },
{ {
path: 'puorder', path: 'puorder',
name: 'puorder', name: 'puorder',
component: () => import('@/views/procurement/puorder'), component: () => import('@/views/procurement/puorder'),
meta: { title: '采购订单', icon: 'purchaseOrder', perms: ['procurement_puorder'] } meta: { title: '采购订单', icon: 'purchaseOrder', perms: ['pum_puorder'] }
}, },
{ {
path: 'puorderitem/:id', path: 'puorderitem/:id',
name: 'puorderitem', name: 'puorderitem',
component: () => import('@/views/procurement/puorderitem'), component: () => import('@/views/procurement/puorderitem'),
meta: { title: '采购订单项', perms: ['procurement_puorder'] }, meta: { title: '采购订单项'},
hidden: true hidden: true
} }
] ]
@ -554,18 +554,18 @@ export const asyncRoutes = [
component: () => import('@/views/statistics/personStatistics'), component: () => import('@/views/statistics/personStatistics'),
meta: { title: '人员统计', icon: 'personStatistics', perms: ['statistics_personStatistics'] } meta: { title: '人员统计', icon: 'personStatistics', perms: ['statistics_personStatistics'] }
}, },
{ /* {
path: 'costStatistics', path: 'costStatistics',
name: 'costStatistics', name: 'costStatistics',
component: () => import('@/views/statistics/costStatistics'), component: () => import('@/views/statistics/costStatistics'),
meta: { title: '成本统计', icon: 'costStatistics', perms: ['workflow_index'] } meta: { title: '成本统计', icon: 'costStatistics', perms: ['workflow_index'] }
}, },
{ {
path: 'testStatistics', path: 'testStatistics',
name: 'testStatistics', name: 'testStatistics',
component: () => import('@/views/statistics/testStatistics'), component: () => import('@/views/statistics/testStatistics'),
meta: { title: '检验统计', icon: 'testStatistics', perms: ['workflow_index'] } meta: { title: '检验统计', icon: 'testStatistics', perms: ['workflow_index'] }
}, },*/
] ]
}, },
@ -647,7 +647,7 @@ export const asyncRoutes = [
meta: { title: '用户管理', icon: 'home', perms: ['user_manage'] } meta: { title: '用户管理', icon: 'home', perms: ['user_manage'] }
} }
, ,
{ {
path: 'organization', path: 'organization',
name: 'Organization', name: 'Organization',
@ -676,7 +676,7 @@ export const asyncRoutes = [
path: 'file', path: 'file',
name: 'File', name: 'File',
component: () => import('@/views/system/file'), component: () => import('@/views/system/file'),
meta: { title: '文件库', icon: 'home', perms: ['file_room'] } meta: { title: '文件库', icon: 'home', perms: ['system_file'] }
}, },
{ {
path: 'task', path: 'task',

View File

@ -113,6 +113,20 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="表单模板" prop="template">
<el-upload
ref="upload"
:action="upUrl"
:on-success="handleUpSuccess"
:on-remove="handleRemove"
:headers="upHeaders"
:file-list="fileList"
:limit="1"
accept=".docx"
>
<el-button size="small" type="primary">上传模板</el-button>
</el-upload>
</el-form-item>
<el-form-item label="是否启用" prop="name"> <el-form-item label="是否启用" prop="name">
<el-switch v-model="recordform.enabled"></el-switch> <el-switch v-model="recordform.enabled"></el-switch>
</el-form-item> </el-form-item>
@ -519,9 +533,8 @@
import {upFile} from "@/api/file"; import {upFile} from "@/api/file";
import {genTree} from "@/utils"; import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect';
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css';
const defaultstep = { const defaultstep = {
name: "", name: "",
number: "", number: "",
@ -709,6 +722,19 @@
}); });
}, },
methods: { methods: {
/* handlePreview(file) {
if ("url" in file) {
window.open(file.url);
} else {
window.open(file.response.data.path);
}
},*/
handleUpSuccess(res) {
this.recordform.export_template = res.data.path;
},
handleRemove() {
this.recordform.export_template = '';
},
formFunc(value) { formFunc(value) {
this.dialogVisibleForm = value; this.dialogVisibleForm = value;
}, },
@ -927,6 +953,14 @@
this.recordform = Object.assign({}, scope.row); // copy obj this.recordform = Object.assign({}, scope.row); // copy obj
this.dialogType = "edit"; this.dialogType = "edit";
this.dialogVisible = true; this.dialogVisible = true;
if (this.recordform.export_template) {
this.fileList = [
{
name: this.recordform.export_template,
url: this.recordform.export_template,
},
];
}
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["Forms"].clearValidate(); this.$refs["Forms"].clearValidate();
}); });
@ -979,6 +1013,7 @@
obj.name=this.recordform.name; obj.name=this.recordform.name;
obj.type=this.recordform.type; obj.type=this.recordform.type;
obj.enabled=this.recordform.enabled; obj.enabled=this.recordform.enabled;
obj.export_template=this.recordform.export_template?this.recordform.export_template:'';
if (isEdit) { if (isEdit) {
obj.form=this.recordform.form?this.recordform.form:null; obj.form=this.recordform.form?this.recordform.form:null;
updaterecordform(this.recordform.id, obj).then( updaterecordform(this.recordform.id, obj).then(

View File

@ -333,9 +333,9 @@ export default {
this.user.avatar = res.data.path; this.user.avatar = res.data.path;
}, },
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
const isLt2M = file.size / 1024 / 1024 < 2; const isLt2M = file.size / 1024 / 1024 < 5;
if (!isLt2M) { if (!isLt2M) {
this.$message.error("上传头像图片大小不能超过 2MB!"); this.$message.error("上传头像图片大小不能超过 5MB!");
} }
return isLt2M; return isLt2M;
}, },
@ -344,9 +344,9 @@ export default {
return data.label.indexOf(value) !== -1; return data.label.indexOf(value) !== -1;
}, },
beforeUpload(file) { beforeUpload(file) {
const isLt1M = file.size / 1024 / 1024 < 1; const isLt1M = file.size / 1024 / 1024 < 5;
if (!isLt1M) { if (!isLt1M) {
this.$message.error("上传头像图片大小不能超过 1MB!"); this.$message.error("上传头像图片大小不能超过 5MB!");
} }
return isLt1M; return isLt1M;
}, },
@ -402,4 +402,4 @@ export default {
}, },
}, },
}; };
</script> </script>

View File

@ -713,47 +713,11 @@
</el-dialog> </el-dialog>
<!--已完成检查表查看--> <!--已完成检查表查看-->
<el-dialog <el-dialog
:title="formName"
:visible.sync="recordFinishedVisible" :visible.sync="recordFinishedVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
id="showForm"
> >
<div id="pdfDom" class="report" ref="report" style="padding: 30px;"> <el-row>
<div style="height: 40px;line-height:40px;text-align: center;font-size: 20px;font-weight: bold">{{formName}}
</div>
<div style="overflow: hidden;border-top: 1px solid #000000;border-left: 1px solid #000000;
border-right: 1px solid #000000;box-sizing: border-box">
<div
style="height: 40px;line-height: 40px;padding-left: 20px;width: 50%;float: left;border-right: 1px solid #000000;border-bottom: 1px solid #000000;">
<span
style="width: 150px;display: inline-block;font-size: 14px;color: #606266;font-weight: 600;border-right: 1px solid #000000;">操作人</span>
<span>{{create_by_}}</span>
</div>
<div
style="height: 40px;line-height: 40px;padding-left: 20px;width: 50%;float: left;border-right: 1px solid #000000;border-bottom: 1px solid #000000;">
<span
style="width: 150px;display: inline-block;font-size: 14px;color: #606266;font-weight: 600;border-right: 1px solid #000000;">操作时间</span>
<span>{{update_time}}</span>
</div>
<div v-for="item in fieldList" :key="item.id" style="width: 50%;display: inline-block;float: left;">
<div
v-if="item.field_type!=='draw'&&item.field_value!==null&&item.field_value!==''"
style="height: 40px;line-height: 40px;padding-left: 20px;border-right: 1px solid #000000;border-bottom: 1px solid #000000;"
>
<span
style="width: 150px;display: inline-block;font-size: 14px;color: #606266;font-weight: 600;border-right: 1px solid #000000;">{{item.field_name}}</span>
<span>{{item.field_value}}</span>
</div>
</div>
<div v-for="item in fieldList" :key="item.id" style="width: 100%;display: inline-block;float: left;">
<div v-if="item.field_type==='draw'"
style="height: 400px;border-bottom: 1px solid #000000;border-right: 1px solid #000000;">
<span style="font-size: 14px;color: #606266;font-weight: 600;">{{item.field_name}}</span>
<img style="width: 45%;vertical-align: text-top;" :src="'http://49.232.14.174:2222'+item.field_value"/>
</div>
</div>
</div>
</div>
<!--<el-row id="pdfDom">
<el-col :span="12"> <el-col :span="12">
<div class="items"> <div class="items">
<span class="itemLabel">操作人</span> <span class="itemLabel">操作人</span>
@ -773,13 +737,13 @@
</div> </div>
</el-col> </el-col>
<el-col v-for="item in fieldList" :key="item.id" :span="24"> <el-col v-for="item in fieldList" :key="item.id" :span="24">
<div class="items" v-if="item.field_type==='draw'" style="height: 400px"> <div class="items" v-if="item.field_type==='draw'" style="height: fit-content">
<span class="itemLabel">{{item.field_name}}</span> <span class="itemLabel">{{item.field_name}}</span>
<img style="width: 45%;vertical-align: text-top;" :src="'http://49.232.14.174:2222'+item.field_value"/> <img style="width: 45%;vertical-align: text-top;" :src="'http://49.232.14.174:2222'+item.field_value"/>
</div> </div>
</el-col> </el-col>
</el-row>--> <el-button @click="exportDom">导出</el-button>
<el-button @click="exportDom">导出</el-button> </el-row>
</el-dialog> </el-dialog>
<!--刷脸验证--> <!--刷脸验证-->
<el-dialog :visible.sync="limitedPhoto" @close="closeCamera" id="loginFaceWrap"> <el-dialog :visible.sync="limitedPhoto" @close="closeCamera" id="loginFaceWrap">
@ -801,7 +765,7 @@
import {createTicket, getWorkflowInit} from "@/api/workflow"; import {createTicket, getWorkflowInit} from "@/api/workflow";
import {getrecordformList, getrffieldList} from "@/api/mtm"; import {getrecordformList, getrffieldList} from "@/api/mtm";
import {getwproductList, wproductPutin, createputins, testInit, scrap, getRetrial} from "@/api/wpm"; import {getwproductList, wproductPutin, createputins, testInit, scrap, getRetrial} from "@/api/wpm";
import {getTestRecord, getTestRecordItem, putTestRecordItem, delTestRecordItem, subTestRecordItem} from "@/api/qm"; import {getTestRecord, getTestRecordItem, putTestRecordItem, delTestRecordItem, subTestRecordItem,getTestRecordExport} from "@/api/qm";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
// import {saveAs} from "file-saver"; // import {saveAs} from "file-saver";
// import htmlDocx from "html-docx-js/dist/html-docx"; // import htmlDocx from "html-docx-js/dist/html-docx";
@ -813,6 +777,7 @@
components: {Pagination, customForm, reviewForm, faceLogin}, components: {Pagination, customForm, reviewForm, faceLogin},
data() { data() {
return { return {
exportFormId:null,
testitem: defaultetestitem, testitem: defaultetestitem,
formbcp: {}, formbcp: {},
form: {remark: "", warehouse: ""}, form: {remark: "", warehouse: ""},
@ -975,13 +940,17 @@
}, },
methods: { methods: {
exportDom() { exportDom() {
htmlToPdf.downloadPDF(document.getElementById('pdfDom'), this.formName); // htmlToPdf.downloadPDF(document.getElementById('pdfDom'), this.formName);
/* let dom = document.querySelector("#showForm .el-dialog"); getTestRecordExport(this.exportFormId).then(res=>{
let str = dom.innerHTML; if(res.code===200){
debugger; debugger;
console.log(str); console.log(res.data.path)
let htmlStr = `<!DOCTYPE html><html lang="en"><body> ${str}</body></html>`; let link = document.createElement('a');
saveAs(htmlDocx.asBlob(htmlStr, {orientation: "landscape"}), "报告.doc");*/ link.href = 'http://49.232.14.174:2222'+res.data.path;
document.body.appendChild(link);
link.click();
}
})
}, },
checkPermission, checkPermission,
@ -1379,6 +1348,7 @@
that.fieldList = []; that.fieldList = [];
that.create_by_ = scope.row.create_by_.name; that.create_by_ = scope.row.create_by_.name;
that.update_time = scope.row.update_time; that.update_time = scope.row.update_time;
that.exportFormId = scope.row.id;
getTestRecordItem(scope.row.id).then((res) => { getTestRecordItem(scope.row.id).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
that.recordFinishedVisible = true; that.recordFinishedVisible = true;