0421
This commit is contained in:
parent
48d7ebb85c
commit
0a6a9ed729
|
@ -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(
|
||||||
|
|
|
@ -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">
|
||||||
|
|
Loading…
Reference in New Issue