|
|
|
@ -103,7 +103,7 @@
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
type="text"
|
|
|
|
type="text"
|
|
|
|
icon="el-icon-view"
|
|
|
|
icon="el-icon-view"
|
|
|
|
v-hasPermi="['kaohe:employee:edit']"
|
|
|
|
v-hasPermi="['kaohe:employee:docs']"
|
|
|
|
@click="handleFuJian(scope.row)"
|
|
|
|
@click="handleFuJian(scope.row)"
|
|
|
|
>附件详情/编辑</el-button>
|
|
|
|
>附件详情/编辑</el-button>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
@ -278,6 +278,24 @@
|
|
|
|
<!-- 附件详情对话框 -->
|
|
|
|
<!-- 附件详情对话框 -->
|
|
|
|
<el-dialog title="附件详情/编辑" :visible.sync="uploadFJ.open" width="900px" append-to-body>
|
|
|
|
<el-dialog title="附件详情/编辑" :visible.sync="uploadFJ.open" width="900px" append-to-body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div v-for="item in uploadFJ.docDiscripList">
|
|
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
|
|
|
<el-col :span="3" style="text-align: right;">
|
|
|
|
|
|
|
|
<div class="my_required" style="margin-top: 10px;">附件主题</div>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="20">
|
|
|
|
|
|
|
|
<el-input v-model.trim="item.title" placeholder="请输入附件主题"/>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-row :gutter="20" style="margin-top: 10px;">
|
|
|
|
|
|
|
|
<el-col :span="3" style="text-align: right;">
|
|
|
|
|
|
|
|
<div class="my_required" style="margin-top: 10px;">附件简介</div>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="20">
|
|
|
|
|
|
|
|
<el-input type="textarea" v-model.trim="item.docDiscrip" placeholder="请输入附件简介"/>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="_con">
|
|
|
|
<div class="_con">
|
|
|
|
<div class="left">
|
|
|
|
<div class="left">
|
|
|
|
<el-card style="margin-bottom: 10px;">
|
|
|
|
<el-card style="margin-bottom: 10px;">
|
|
|
|
@ -299,7 +317,6 @@
|
|
|
|
</el-upload>
|
|
|
|
</el-upload>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<el-button type="primary" @click="updateFileFJ">确定</el-button>
|
|
|
|
<el-button type="primary" @click="updateFileFJ">确定</el-button>
|
|
|
|
<el-button @click="uploadFJ.open = false">取 消</el-button>
|
|
|
|
<el-button @click="uploadFJ.open = false">取 消</el-button>
|
|
|
|
@ -310,7 +327,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { listEmployee, getEmployee, delEmployee, addEmployee, updateEmployee } from "@/api/kaohe/employee";
|
|
|
|
import { listEmployee, getEmployee, delEmployee, addEmployee, updateEmployee, editEmployeeDocs } from "@/api/kaohe/employee";
|
|
|
|
import { getToken } from "@/utils/auth"
|
|
|
|
import { getToken } from "@/utils/auth"
|
|
|
|
import { deptTreeSelect } from "@/api/system/user";
|
|
|
|
import { deptTreeSelect } from "@/api/system/user";
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
@ -358,7 +375,10 @@ export default {
|
|
|
|
uploadFJ: {
|
|
|
|
uploadFJ: {
|
|
|
|
// 是否显示弹出层
|
|
|
|
// 是否显示弹出层
|
|
|
|
open: false,
|
|
|
|
open: false,
|
|
|
|
|
|
|
|
// 附件上传
|
|
|
|
fileList: [],
|
|
|
|
fileList: [],
|
|
|
|
|
|
|
|
// 附件上传
|
|
|
|
|
|
|
|
docDiscripList: [],
|
|
|
|
// 是否禁用上传
|
|
|
|
// 是否禁用上传
|
|
|
|
isUploading: false,
|
|
|
|
isUploading: false,
|
|
|
|
// 设置上传的请求头部
|
|
|
|
// 设置上传的请求头部
|
|
|
|
@ -399,7 +419,6 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
console.log(this.$store.state.user);
|
|
|
|
|
|
|
|
let userInfo = this.$store.state.user
|
|
|
|
let userInfo = this.$store.state.user
|
|
|
|
if(userInfo.roles.length===1 && userInfo.roles[0]==='employee'){
|
|
|
|
if(userInfo.roles.length===1 && userInfo.roles[0]==='employee'){
|
|
|
|
this.isEmployee = true;
|
|
|
|
this.isEmployee = true;
|
|
|
|
@ -563,6 +582,10 @@ export default {
|
|
|
|
handleFuJian(row){
|
|
|
|
handleFuJian(row){
|
|
|
|
this.updataRow = row;
|
|
|
|
this.updataRow = row;
|
|
|
|
this.uploadFJ.fileList = [];
|
|
|
|
this.uploadFJ.fileList = [];
|
|
|
|
|
|
|
|
this.uploadFJ.docDiscripList = [{
|
|
|
|
|
|
|
|
title:'',
|
|
|
|
|
|
|
|
docDiscrip:'',
|
|
|
|
|
|
|
|
}];
|
|
|
|
if(row.docs){
|
|
|
|
if(row.docs){
|
|
|
|
let arr = row.docs.split(';');
|
|
|
|
let arr = row.docs.split(';');
|
|
|
|
arr.forEach( item => {
|
|
|
|
arr.forEach( item => {
|
|
|
|
@ -570,10 +593,11 @@ export default {
|
|
|
|
this.uploadFJ.fileList.push({
|
|
|
|
this.uploadFJ.fileList.push({
|
|
|
|
name: arr1[0],
|
|
|
|
name: arr1[0],
|
|
|
|
url: arr1[1]
|
|
|
|
url: arr1[1]
|
|
|
|
})
|
|
|
|
});
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
this.uploadFJ.docDiscripList = JSON.parse(row.docDiscrip);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.uploadFJ.open = true
|
|
|
|
this.uploadFJ.open = true;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 已有附件
|
|
|
|
// 已有附件
|
|
|
|
uploadFJListRemove(index){
|
|
|
|
uploadFJListRemove(index){
|
|
|
|
@ -591,21 +615,37 @@ export default {
|
|
|
|
this.uploadFJ.isUploading = false
|
|
|
|
this.uploadFJ.isUploading = false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
updateFileFJ(){
|
|
|
|
updateFileFJ(){
|
|
|
|
let uploadFiles = this.$refs.uploadFJ.$data.uploadFiles;
|
|
|
|
let flag = true;
|
|
|
|
let arr = []
|
|
|
|
if(!this.uploadFJ.docDiscripList[0].title){
|
|
|
|
this.uploadFJ.fileList.forEach(item=>{
|
|
|
|
flag = false;
|
|
|
|
arr.push(item.name+','+item.url);
|
|
|
|
this.$alert(`附近主题不能为空`, `提示`, {
|
|
|
|
})
|
|
|
|
type: 'warning'
|
|
|
|
uploadFiles.forEach( item => {
|
|
|
|
})
|
|
|
|
arr.push(item.response.originalFilename+','+item.response.url);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
if(!this.uploadFJ.docDiscripList[0].docDiscrip){
|
|
|
|
this.updataRow.docs = arr.join(';');
|
|
|
|
flag = false;
|
|
|
|
updateEmployee(this.updataRow).then(response => {
|
|
|
|
this.$alert(`附近简介不能为空`, `提示`, {
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
type: 'warning'
|
|
|
|
this.uploadFJ.open = false;
|
|
|
|
})
|
|
|
|
this.$refs.uploadFJ.clearFiles();
|
|
|
|
}
|
|
|
|
this.getList();
|
|
|
|
if(flag){
|
|
|
|
})
|
|
|
|
let uploadFiles = this.$refs.uploadFJ.$data.uploadFiles;
|
|
|
|
|
|
|
|
let arr = []
|
|
|
|
|
|
|
|
this.uploadFJ.fileList.forEach(item=>{
|
|
|
|
|
|
|
|
arr.push(item.name+','+item.url);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
uploadFiles.forEach( item => {
|
|
|
|
|
|
|
|
arr.push(item.response.originalFilename+','+item.response.url);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.updataRow.docs = arr.join(';');
|
|
|
|
|
|
|
|
this.updataRow.docDiscrip =JSON.stringify(this.uploadFJ.docDiscripList);
|
|
|
|
|
|
|
|
editEmployeeDocs(this.updataRow).then(response => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
|
|
|
this.uploadFJ.open = false;
|
|
|
|
|
|
|
|
this.$refs.uploadFJ.clearFiles();
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -613,10 +653,18 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.el-dialog__body{
|
|
|
|
.el-dialog__body{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.my_required:before{
|
|
|
|
|
|
|
|
content: "*";
|
|
|
|
|
|
|
|
color: #f56c6c;
|
|
|
|
|
|
|
|
margin-right: 4px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
._con{
|
|
|
|
._con{
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
justify-content: space-between;
|
|
|
|
min-height: 400px;
|
|
|
|
min-height: 400px;
|
|
|
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
|
|
|
|
|
|
|
.left{
|
|
|
|
.left{
|
|
|
|
width: 480px;
|
|
|
|
width: 480px;
|
|
|
|
@ -639,5 +687,4 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|