入会下载样式,入库必填项

This commit is contained in:
shenyanpei
2022-01-10 11:47:14 +08:00
parent e55addd0fb
commit 112cd844ac
7 changed files with 53 additions and 17 deletions
@@ -142,7 +142,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="身份:"> <el-form-item class="add-form-item" label="职务/名称:">
<el-input <el-input
style="width: 100%" style="width: 100%"
placeholder="请填写身份" placeholder="请填写身份"
@@ -181,6 +181,8 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="资料:"> <el-form-item class="add-form-item" label="资料:">
<el-upload <el-upload
@@ -81,7 +81,7 @@
</a> </a>
<el-button <el-button
size="mini" size="mini"
@click="previews(item.id)" @click="previews(item.id, 'down')"
icon="el-icon-download" icon="el-icon-download"
style="height: 25px; margin-left: 5px;" style="height: 25px; margin-left: 5px;"
></el-button> ></el-button>
@@ -120,14 +120,20 @@
<el-table-column prop="fillPeople" align="center" label="参与人"/> <el-table-column prop="fillPeople" align="center" label="参与人"/>
<el-table-column prop="fillUnit" align="center" label="单位"/> <el-table-column prop="fillUnit" align="center" label="单位"/>
<el-table-column prop="fillDept" align="center" label="部门"/> <el-table-column prop="fillDept" align="center" label="部门"/>
<el-table-column prop="fillPost" align="center" label="身份"/> <el-table-column prop="fillPost" align="center" label="职务/名称"/>
<el-table-column prop="fillTel" align="center" label="电话"/> <el-table-column prop="fillTel" align="center" label="电话"/>
<el-table-column prop="fillMail" align="center" label="邮箱"/> <el-table-column prop="fillMail" align="center" label="邮箱"/>
<el-table-column prop="fillFile" align="center" label="资料"> <el-table-column prop="fillFile" align="center" label="资料">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.fillFile.length === 0">{{ '-' }}</span> <span v-if="scope.row.fillFile.length === 0">{{ '-' }}</span>
<span v-for="item in scope.row.fillFile" :key="item.id" style="color: #409EFF;" @click="previews(item.id)"> <span v-for="item in scope.row.fillFile" :key="item.id" style="color: #409EFF;" @click="previews(item.id, 'onLine')">
{{ item.name }} {{ ';' }} {{ item.name }} {{ ';' }}
<el-button
size="mini"
@click="previews(item.id, 'down')"
icon="el-icon-download"
style="height: 25px; margin-left: 5px;"
></el-button>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@@ -417,10 +423,14 @@ export default {
this.$preview(attId) this.$preview(attId)
}, },
/** 点击对应附件进行下载*/ /** 点击对应附件进行下载*/
previews(val) { previews(val,type) {
let attId = val let attId = val
if (attId != null && attId !== "") { if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId; if (type === 'down') {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
} else {
this.$preview(attId)
}
} }
}, },
} }
@@ -176,7 +176,7 @@
{{ scope.row.fillDept || '' }} {{ scope.row.fillDept || '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="fillPost" align="center" label="身份"> <el-table-column prop="fillPost" align="center" label="职务/名称">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.fillPost || '' }} {{ scope.row.fillPost || '' }}
</template> </template>
@@ -368,6 +368,7 @@
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF" accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF"
:http-request="httpRequest" :http-request="httpRequest"
:before-upload="handleBeforeUpload" :before-upload="handleBeforeUpload"
:on-preview="handlePreview"
:before-remove="handleBeforeRemove" :before-remove="handleBeforeRemove"
:on-success="handleOnsuccess" :on-success="handleOnsuccess"
> >
@@ -625,6 +626,13 @@ export default {
this.fileListData.fillFile = this.reData this.fileListData.fillFile = this.reData
}, },
handlePreview(file) {
let attId = file.id
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
},
handleClose() { handleClose() {
this.upDialog = false this.upDialog = false
}, },
@@ -114,7 +114,7 @@
<el-table-column prop="fillPeople" align="center" label="参与人"/> <el-table-column prop="fillPeople" align="center" label="参与人"/>
<el-table-column prop="fillUnit" align="center" label="单位"/> <el-table-column prop="fillUnit" align="center" label="单位"/>
<el-table-column prop="fillDept" align="center" label="部门"/> <el-table-column prop="fillDept" align="center" label="部门"/>
<el-table-column prop="fillPost" align="center" label="身份"/> <el-table-column prop="fillPost" align="center" label="职务/名称"/>
<el-table-column prop="fillTel" align="center" label="电话"/> <el-table-column prop="fillTel" align="center" label="电话"/>
<el-table-column prop="fillMail" align="center" label="邮箱"/> <el-table-column prop="fillMail" align="center" label="邮箱"/>
<el-table-column prop="fillFile" align="center" label="资料"> <el-table-column prop="fillFile" align="center" label="资料">
@@ -125,7 +125,7 @@
<el-table-column prop="fillPeople" align="center" label="参与人"/> <el-table-column prop="fillPeople" align="center" label="参与人"/>
<el-table-column prop="fillUnit" align="center" label="单位"/> <el-table-column prop="fillUnit" align="center" label="单位"/>
<el-table-column prop="fillDept" align="center" label="部门"/> <el-table-column prop="fillDept" align="center" label="部门"/>
<el-table-column prop="fillPost" align="center" label="身份"/> <el-table-column prop="fillPost" align="center" label="职务/名称"/>
<el-table-column prop="fillTel" align="center" label="电话"/> <el-table-column prop="fillTel" align="center" label="电话"/>
<el-table-column prop="fillMail" align="center" label="邮箱"/> <el-table-column prop="fillMail" align="center" label="邮箱"/>
<el-table-column prop="fillFile" align="center" label="资料"> <el-table-column prop="fillFile" align="center" label="资料">
@@ -1695,6 +1695,17 @@ export default {
filterText(val) { filterText(val) {
this.$refs.tree.filter(val); this.$refs.tree.filter(val);
}, },
'form.standInData' : {
handler: function () {
if(this.form.standInData === '1') {
this.rules.standYear[0].required = false;
this.rules.standName[0].required = false
} else {
this.rules.standYear[0].required = true;
this.rules.standName[0].required = true
}
}
},
/*'form.standInData': { /*'form.standInData': {
handler: function (val) { handler: function (val) {
this.verifySarStandard = false this.verifySarStandard = false
@@ -1840,14 +1851,10 @@ export default {
this.rules.standName[0].required = false this.rules.standName[0].required = false
this.rules.standEnName[0].required = true; this.rules.standEnName[0].required = true;
this.rules.standNature[0].required = false this.rules.standNature[0].required = false
this.rules.standYear[0].required = false;
this.rules.standName[0].required = false
} else { } else {
this.rules.standName[0].required = true this.rules.standName[0].required = true
this.rules.standNature[0].required = true this.rules.standNature[0].required = true
this.rules.standEnName[0].required = false; this.rules.standEnName[0].required = false;
this.rules.standYear[0].required = true;
this.rules.standName[0].required = true
} }
this.standardSearchForm.standType = val === '0' ? 'INLAND' : 'FOREIGN' this.standardSearchForm.standType = val === '0' ? 'INLAND' : 'FOREIGN'
//切换清空表单 //切换清空表单
@@ -3054,6 +3061,8 @@ export default {
this.isSubmit = false this.isSubmit = false
} }
}) })
} else {
this.isSubmit = false
} }
}) })
} else { } else {
@@ -1688,14 +1688,10 @@ export default {
this.rules.standName[0].required = false this.rules.standName[0].required = false
this.rules.standEnName[0].required = true; this.rules.standEnName[0].required = true;
this.rules.standNature[0].required = false this.rules.standNature[0].required = false
this.rules.standYear[0].required = false;
this.rules.standName[0].required = false
} else { } else {
this.rules.standName[0].required = true this.rules.standName[0].required = true
this.rules.standNature[0].required = true this.rules.standNature[0].required = true
this.rules.standEnName[0].required = false; this.rules.standEnName[0].required = false;
this.rules.standYear[0].required = true;
this.rules.standName[0].required = true
} }
this.standardSearchForm.standType = val === '0' ? 'INLAND' : 'FOREIGN' this.standardSearchForm.standType = val === '0' ? 'INLAND' : 'FOREIGN'
}, },
@@ -2662,6 +2658,17 @@ export default {
} }
} }
}, },
'form.standInData' : {
handler: function () {
if(this.form.standInData === '1') {
this.rules.standYear[0].required = false;
this.rules.standName[0].required = false
} else {
this.rules.standYear[0].required = true;
this.rules.standName[0].required = true
}
}
},
form(val){ form(val){
if(this.form){ if(this.form){