添加了安全教育 上传下载上传材料 骆乐

This commit is contained in:
骆乐 2022-06-24 14:58:54 +08:00
parent a01a3502b1
commit f92db374b1
5 changed files with 91 additions and 17 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -14,7 +14,7 @@
<el-avatar size="large" icon="el-icon-user-solid"></el-avatar>
<div style="margin-left:10px">
<p>{{ $store.state.userInfo.companyName }}</p>
<!-- 横琴不需要客服电话-->
<!-- 横琴和鹤洲不需要客服电话-->
<!-- <p>客服电话{{$store.state.userInfo.customerServicePhone}}</p> -->
</div>
</div>

View File

@ -48,7 +48,8 @@
<template slot-scope="scope">
<div class="tableBtns">
<div @click="downFn(scope.row)" class="operationText">
<el-link type="primary">{{$t('message.docManage.table.download')}}</el-link>
<!-- <el-link class="downfn" type="primary">{{$t('message.docManage.table.download')}}</el-link> -->
<a :href="downloadUrl" class="downfn">下载</a>
</div>
<div @click="editFn(scope.row)" class="operationText">
<img src="@/assets/images/icon-edit.png" width="15px" height="15px"/>
@ -147,6 +148,7 @@
name: "registerAudit",
data() {
return {
downloadUrl:'',
searchForm: {
fileName: "",
},
@ -271,10 +273,11 @@
downFn(item) {
updateFileDownloadNumApi({id: item.id}).then((res) => {
// window.open(this.$store.state.FILEURL+item.filePath)
var a = document.createElement("a");
a.href = this.$store.state.FILEURL + item.filePath
a.download = item.fileName;
a.click();
// var a = document.createElement("a");
// a.href = this.$store.state.FILEURL + item.filePath
// a.download = item.fileName;
// a.click();
this.downloadUrl = this.$store.state.FILEURL + item.filePath
});
},
//
@ -291,6 +294,9 @@
};
</script>
<style lang="less" scoped>
.downfn{
text-decoration: none;
}
.searchBox {
justify-content: space-between;
}

View File

@ -202,12 +202,6 @@ export default {
if(res.success){
this.$message.success(this.$t('message.companyDiagram.editSuccess'));//
this.getDetail()
this.form.headerConfiguration = "",//
this.form.enterpriseBackground='',//
this.form.enterpriseFront='',//
this.form.projectBackground='',//
this.form.equipmentChina='',//
this.form.dataCenter=""//
}
})
}else {

View File

@ -82,7 +82,7 @@
></el-table-column>
<el-table-column
prop="workernum"
:label='$t("message.laborMange.numberOfPeople")'
:label="$t('message.laborMange.numberOfPeople')"
align="center"
></el-table-column>
<!-- <el-table-column
@ -102,10 +102,18 @@
<el-table-column
:label="$t('message.personnelPosition.beaconManage.table.operation')"
align="center"
width="180"
width="300"
>
<template slot-scope="scope">
<div class="tableBtns">
<div @click="uploadPoint(scope.row)" class="operationText">
<img
src="@/assets/images/icon_upload.png"
width="15px"
height="15px"
/>
<span><a :href="uploadaurl" class="uploadpoint">下载</a></span>
</div>
<div @click="editPoint(scope.row)" class="operationText">
<img
src="@/assets/images/icon-edit.png"
@ -222,6 +230,19 @@
<el-button type="primary" @click="selectWorkerDialog = true">
{{ $t("message.laborDev.selectWorker") }}
</el-button>
<!-- 添加上传相关材料 -->
<el-upload
name="files"
class="upload-demo uploadBtn"
:action="$store.state.UPLOADURL"
multiple
:file-list="fileList"
:on-preview="handlePreview"
:on-success="handleSuccess"
:show-file-list="false"
>
<el-button type="primary">材料上传</el-button>
</el-upload>
</el-form-item>
<el-table
class="tables dialogTable"
@ -263,8 +284,16 @@
v-model="scope.row.isQualified"
:placeholder="$t('message.laborDev.allType')"
>
<el-option :label='$t("message.laborMange.qualified")' :value="1"> </el-option
><el-option :label='$t("message.laborMange.disqualification")' :value="2"> </el-option>
<el-option
:label="$t('message.laborMange.qualified')"
:value="1"
>
</el-option
><el-option
:label="$t('message.laborMange.disqualification')"
:value="2"
>
</el-option>
</el-select>
</template>
</el-table-column>
@ -357,6 +386,8 @@ export default {
components: { selectWorker },
data() {
return {
uploadaurl:'',
fileList:[],
searchForm: {
eduType: "",
eduCourseName: "",
@ -368,6 +399,7 @@ export default {
cardDialogTitle: "",
cardDialog: false,
cardForm: {
uploadAttachments:"",
eduAddr: "",
eduClasshour: 0,
eduContent: "",
@ -412,8 +444,29 @@ export default {
mounted() {
this.loadAllPerson();
this.loadCardData();
let xxx = this.$store.state.FILEURL
console.log('url',xxx)
},
methods: {
handlePreview(file,type){
// console.log('file',file)
// console.log('fileList',type)
},
handleSuccess(file,fileList){
console.log('成功的file',file)
this.cardForm.uploadAttachments = file.data[0].filename
if(file.status == "SUCCESS"){
this.$message({
message: '相关材料上传成功!',
type: 'success'
});
}else{
this.$message({
message: '上传失败,请重新上传!',
type: 'error'
});
}
},
changeScore(index, value) {
console.log("changeScore", value, index);
var json = this.cardForm.list[index];
@ -501,6 +554,19 @@ export default {
this.cardForm.list = res.result.list;
});
},
//
uploadPoint(item){
console.log('item',item)
if(item.uploadAttachments != null){
this.uploadaurl = this.$store.state.FILEURL + item.uploadAttachments
}else{
this.$message({
message: '当前没有相关材料!',
type: 'error'
});
this.uploadaurl = window.location
}
},
removePoint(item) {
this.$confirm(
this.$t("message.personnelPosition.beaconManage.table.confirmText") +
@ -551,7 +617,7 @@ export default {
var item = {
isQualified: element.isQualified,
score: element.score,
workerId: this.isAdd ? element.id:element.workerId,
workerId: this.isAdd ? element.id : element.workerId,
projectSn: this.$store.state.projectSn,
};
if (!this.isAdd) {
@ -605,6 +671,14 @@ export default {
};
</script>
<style lang="less" scoped>
.uploadpoint{
text-decoration: none;
color:black;
}
.uploadBtn{
display: inline-block;
margin-left: 10px;
}
.dialogFormBox2 {
width: 95% !important;
}