parent
348bfceefa
commit
c67f6773b9
|
@ -0,0 +1,141 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
v-if="visible"
|
||||
:visible.sync="visible"
|
||||
:before-close="handleClose"
|
||||
:append-to-body="appendToBody"
|
||||
:title="title"
|
||||
width="60%">
|
||||
<el-input v-model="filterText" placeholder="输入关键字进行过滤"/>
|
||||
<el-scrollbar class="information" style="height: 500px; margin-top: 10px">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
:data="tree"
|
||||
:props="defaultProp"
|
||||
:filter-node-method="filterNode"
|
||||
check-strictly
|
||||
default-expand-all
|
||||
expand-on-click-node
|
||||
check-on-click-node
|
||||
show-checkbox
|
||||
@node-click="handleNodeClick"/>
|
||||
</el-scrollbar>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="closeWindow">取 消</el-button>
|
||||
<el-button type="primary" @click="save">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
export default {
|
||||
components: { Pagination },
|
||||
directives: { waves },
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
appendToBody: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
defaultProp: {
|
||||
value: 'id',
|
||||
children: 'nodes',
|
||||
label: 'name'
|
||||
},
|
||||
tree: [],
|
||||
filterText: '',
|
||||
treeClickCount: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(e) {
|
||||
this.visible = true
|
||||
this.getTree()
|
||||
},
|
||||
handleClose() {
|
||||
this.visible = false
|
||||
},
|
||||
getTree() {
|
||||
requestFN(
|
||||
'/department/listTree'
|
||||
).then((data) => {
|
||||
this.tree = JSON.parse(data.zTreeNodes)
|
||||
if (this.tree[0]) {
|
||||
this.tree[0].disabled = false
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
filterNode(value, data) {
|
||||
if (!value) return true
|
||||
return data.name.indexOf(value) !== -1
|
||||
},
|
||||
closeWindow() {
|
||||
this.visible = false
|
||||
},
|
||||
clear() {
|
||||
this.tree = []
|
||||
},
|
||||
save() {
|
||||
const list = this.$refs.tree.getCheckedNodes()
|
||||
if (list.length > this.limit) {
|
||||
this.$message.error('应该选择' + this.limit + '个,但是现在选择了' + list.length + '个')
|
||||
return
|
||||
}
|
||||
this.$emit('getResult', { info: this.$refs.tree.getCheckedNodes() })
|
||||
this.visible = false
|
||||
},
|
||||
// 节点点击事件
|
||||
handleNodeClick(data, node) {
|
||||
// 记录点击次数
|
||||
this.treeClickCount++
|
||||
// 单次点击次数超过2次不作处理,直接返回,也可以拓展成多击事件
|
||||
if (this.treeClickCount >= 2) {
|
||||
return
|
||||
}
|
||||
// 计时器,计算300毫秒为单位,可自行修改
|
||||
this.timer = window.setTimeout(() => {
|
||||
if (this.treeClickCount === 1) {
|
||||
// 把次数归零
|
||||
this.treeClickCount = 0
|
||||
// 单击事件处理
|
||||
this.console('单击事件,可在此处理对应逻辑')
|
||||
} else if (this.treeClickCount > 1) {
|
||||
// 把次数归零
|
||||
this.treeClickCount = 0
|
||||
// 双击事件
|
||||
this.$emit('getResult', { info: [data] })
|
||||
this.visible = false
|
||||
}
|
||||
}, 300)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.information >>> .el-scrollbar__wrap {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,75 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
v-if="visible"
|
||||
:visible.sync="visible"
|
||||
:before-close="handleClose"
|
||||
:title="title"
|
||||
:append-to-body="appendToBody"
|
||||
width="60%">
|
||||
<UploadFile :file-list.sync = "files"/>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="closeWindow">取 消</el-button>
|
||||
<el-button type="primary" @click="confirm">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
import UploadFile from '../uploadFile'
|
||||
|
||||
export default {
|
||||
components: { Pagination, UploadFile },
|
||||
directives: { waves },
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
appendToBody: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
files: [],
|
||||
heirloom: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(e) {
|
||||
this.visible = true
|
||||
this.heirloom = e
|
||||
},
|
||||
handleClose() {
|
||||
this.visible = false
|
||||
this.files = []
|
||||
},
|
||||
closeWindow() {
|
||||
this.handleClose()
|
||||
},
|
||||
confirm() {
|
||||
if (this.files.length <= 0) {
|
||||
this.$message.error('未选择文件')
|
||||
return
|
||||
}
|
||||
this.$emit('getChoose', { heirloom: this.heirloom, info: this.files, name: 'uploadExcel' })
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.information >>> .el-scrollbar__wrap {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,81 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-upload
|
||||
ref="uploadFile"
|
||||
:auto-upload="false"
|
||||
:file-list="fileList"
|
||||
:on-change="onChange"
|
||||
:on-remove="onRemove"
|
||||
:limit="limit"
|
||||
:on-exceed="handleExceed"
|
||||
:accept="accept"
|
||||
action="#">
|
||||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
||||
<div slot="tip" class="el-upload__tip">{{ info }}</div>
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'UploadImg',
|
||||
props: {
|
||||
fileList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
fileSize: {
|
||||
type: Number,
|
||||
default: 500
|
||||
},
|
||||
accept: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
info: {
|
||||
type: String,
|
||||
default: '文件大小不超过500MB'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleRemove(file) {
|
||||
this.fileList.splice(this.fileList.findIndex(item => item.uid === file.uid), 1)
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogImageUrl = file.url
|
||||
this.dialogVisible = true
|
||||
},
|
||||
onChange(file, fileList) {
|
||||
this.file = file
|
||||
this.file_name = file.name
|
||||
const isLt2M = file.size / 1024 / 1024 < this.fileSize
|
||||
if (!isLt2M) {
|
||||
this.$message.error('上传视频大小不能超过 ' + this.fileSize + 'MB!')
|
||||
this.$refs.uploadFile.clearFiles()
|
||||
return false
|
||||
}
|
||||
this.$emit('update:fileList', fileList)
|
||||
},
|
||||
onRemove(file, fileList) {
|
||||
this.$emit('update:fileList', fileList)
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
this.$message.warning(`当前限制选择 ${this.limit} 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
|
@ -0,0 +1,93 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-upload
|
||||
ref="uploadImg"
|
||||
:auto-upload="false"
|
||||
:file-list="fileList"
|
||||
:on-change="onChange"
|
||||
:limit="limit"
|
||||
:on-exceed="handleExceed"
|
||||
:accept="accept"
|
||||
:class="{hide:hideFlag}"
|
||||
action="#"
|
||||
list-type="picture-card">
|
||||
<i slot="default" class="el-icon-plus"/>
|
||||
<div slot="file" slot-scope="{file}">
|
||||
<el-image :src="file.url" alt=""/>
|
||||
<span class="el-upload-list__item-actions">
|
||||
<span @click="handlePictureCardPreview(file)">
|
||||
<i class="el-icon-zoom-in"/>
|
||||
</span>
|
||||
<span class="el-upload-list__item-delete" @click="handleRemove(file)">
|
||||
<i class="el-icon-delete"/>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible" :append-to-body="appendToBody">
|
||||
<img :src="dialogImageUrl" width="100%" alt="">
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// 在使用时要加上.sync
|
||||
// 注意limit的值
|
||||
export default {
|
||||
name: 'UploadImg',
|
||||
props: {
|
||||
fileList: {
|
||||
type: Array, default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
limit: { type: Number, default: 1 },
|
||||
appendToBody: { type: Boolean, default: false },
|
||||
accept: {
|
||||
type: String, default() {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
hideUpload: { type: Boolean, default: false }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
disabled: false,
|
||||
hideFlag: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.fileList.length >= this.limit && this.hideUpload) {
|
||||
this.hideFlag = true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleRemove(file) {
|
||||
this.fileList.splice(this.fileList.findIndex(item => item.uid === file.uid), 1)
|
||||
if (this.hideUpload) {
|
||||
if (this.fileList.length < this.limit) {
|
||||
this.hideFlag = false
|
||||
}
|
||||
}
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogImageUrl = file.url
|
||||
this.dialogVisible = true
|
||||
},
|
||||
onChange(file, fileList) {
|
||||
this.$emit('update:fileList', fileList)
|
||||
if (this.hideUpload) {
|
||||
if (fileList.length === this.limit) {
|
||||
this.hideFlag = true
|
||||
}
|
||||
}
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
this.$message.warning(`当前限制选择 ${this.limit} 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
|
@ -42,8 +42,8 @@
|
|||
<el-table-column label="操作" align="center" width="450">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleShow(row)">详情</el-button>
|
||||
<el-button v-if="false" type="primary" icon="el-icon-edit" size="mini" @click="handleFlowShow(row)">流程详情</el-button>
|
||||
<el-button v-if="false" type="primary" icon="el-icon-edit" size="mini" @click="handleFlowStepShow(row)">审批流程</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleFlowShow(row)">流程详情</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleFlowStepShow(row)">审批流程</el-button>
|
||||
<el-button v-if="row.power_flag === '1'" type="primary" icon="el-icon-s-claim" size="mini" @click="approve([row])">审批</el-button>
|
||||
<el-button v-if="false" type="success" icon="el-icon-edit" size="mini" @click="getUserInfo(row)">电子合格证</el-button>
|
||||
</template>
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-dialog v-loading = "loading" :visible.sync="visible" :append-to-body="appendToBody" :before-close="beforeClose" title="审批" width="1200px" destroy-on-close>
|
||||
<el-dialog
|
||||
v-loading="loading"
|
||||
:visible.sync="visible"
|
||||
:append-to-body="appendToBody"
|
||||
:before-close="beforeClose"
|
||||
title="审批"
|
||||
width="1200px"
|
||||
destroy-on-close>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="200px" label-position="right" type="flex">
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="12">
|
||||
|
@ -12,7 +19,10 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="form.STATUS === '1' && isShow" prop="APPOINT_DEPARTMENT_ID" label="指定监管部门:">
|
||||
<el-form-item
|
||||
v-if="form.STATUS === '1' && isShow"
|
||||
:label="menu.department + ':'"
|
||||
prop="APPOINT_DEPARTMENT_ID">
|
||||
<Treeselect
|
||||
:options="departmentTree"
|
||||
:normalizer="normalizer"
|
||||
|
@ -33,12 +43,27 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-if="form.STATUS === '1' && isShow" :span="12">
|
||||
<el-form-item v-if="form.STATUS === '1'" prop="APPOINT_USER_ID" label="指定监管部门审批人:">
|
||||
<el-form-item v-if="form.STATUS === '1'" :label="menu.user +':'" prop="APPOINT_USER_ID">
|
||||
<el-select v-model="form.user" style="width: 300px" placeholder="请选择" @change="chooseUser">
|
||||
<el-option v-for="item in peopleList" :key="item.USER_ID" :value="JSON.stringify(item)" :label="item.NAME"/>
|
||||
<el-option
|
||||
v-for="item in peopleList"
|
||||
:key="item.USER_ID"
|
||||
:value="JSON.stringify(item)"
|
||||
:label="item.NAME"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-if="form.STATUS === '1' && menu.uploadFile" :span="12">
|
||||
<el-form-item :label="menu.uploadFile + ':'" prop="APPOINT_ANNEX">
|
||||
<upload-file
|
||||
:file-list.sync="form.APPOINT_ANNEX"
|
||||
:multiple="false"
|
||||
:accept="'.pdf,.jpg,.png,doc,docx'"
|
||||
:limit="20"
|
||||
:size="1024"
|
||||
:upload-type="1"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
|
@ -54,9 +79,11 @@
|
|||
import vueQr from 'vue-qr'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import { requestFN } from '@/utils/request'
|
||||
import uploadFile from '../../../util/uploadFile/index.vue'
|
||||
import { upload } from '@/utils/upload'
|
||||
|
||||
export default {
|
||||
components: { Treeselect, vueQr },
|
||||
components: { uploadFile, Treeselect, vueQr },
|
||||
props: {
|
||||
appendToBody: {
|
||||
type: Boolean,
|
||||
|
@ -76,6 +103,7 @@ export default {
|
|||
APPOINT_USER_ID: null,
|
||||
APPOINT_USER_NAME: '',
|
||||
OPINION: '',
|
||||
APPOINT_ANNEX: [],
|
||||
user: '',
|
||||
tm: new Date().getTime(),
|
||||
list: [],
|
||||
|
@ -94,6 +122,9 @@ export default {
|
|||
],
|
||||
OPINION: [
|
||||
{ required: true, message: '请填写打回原因', trigger: 'change' }
|
||||
],
|
||||
APPOINT_ANNEX: [
|
||||
{ required: true, message: '请上传文件', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
heirloom: {},
|
||||
|
@ -108,17 +139,23 @@ export default {
|
|||
|
||||
departmentTree: [],
|
||||
peopleList: [],
|
||||
corpFlag: false
|
||||
corpFlag: false,
|
||||
menu: {
|
||||
department: '',
|
||||
user: '',
|
||||
uploadFile: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async init(e) {
|
||||
console.log(e)
|
||||
this.loading = true
|
||||
this.visible = true
|
||||
this.heirloom = JSON.stringify(e)
|
||||
this.form.list = JSON.stringify(e)
|
||||
this.info = e[0]
|
||||
await this.getMenu()
|
||||
|
||||
if (this.info.FLOWS_TYPE === '0') {
|
||||
if (this.info.FLOWS_STEP === 0) {
|
||||
this.isShow = true
|
||||
|
@ -142,12 +179,34 @@ export default {
|
|||
}
|
||||
this.loading = false
|
||||
},
|
||||
getMenu() {
|
||||
return new Promise(resolve => {
|
||||
requestFN(
|
||||
'/flowTrain/getPintName', { FLOWS_TYPE: this.info.FLOWS_TYPE, FLOWS_STEP: this.info.FLOWS_STEP }
|
||||
).then((data) => {
|
||||
this.menu.department = data.Department
|
||||
this.menu.user = data.User
|
||||
this.menu.uploadFile = data.UploadFile
|
||||
resolve(true)
|
||||
}).catch((e) => {
|
||||
})
|
||||
})
|
||||
},
|
||||
sendMessage(e) {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (!valid) {
|
||||
this.$message.error('请填写完整信息')
|
||||
} else {
|
||||
requestFN('/xgf/user/approve', this.form)
|
||||
const formData = new FormData()
|
||||
Object.keys(this.form).map(key => {
|
||||
formData.append(key, this.form[key])
|
||||
})
|
||||
if (this.form.APPOINT_ANNEX) {
|
||||
for (let i = 0; i < this.form.APPOINT_ANNEX.length; i++) {
|
||||
formData.append('chengNuoShu', this.form.APPOINT_ANNEX[i].raw)
|
||||
}
|
||||
}
|
||||
upload('/xgf/user/approvePlus', formData)
|
||||
.then((data) => {
|
||||
this.$message.success('推送成功')
|
||||
this.visible = false
|
||||
|
|
|
@ -139,12 +139,20 @@
|
|||
</table>
|
||||
<div v-if="userDetailForm.ANNEX" style="padding-bottom: 10px">
|
||||
<div class="level-title">
|
||||
<h1>承诺书</h1>
|
||||
<h1>相关方承诺书</h1>
|
||||
</div>
|
||||
<div>
|
||||
<el-button icon="el-icon-download" type="primary" @click = "download(userDetailForm.ANNEX)">下载附件</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="userDetailForm.COMMITMENT_LETTER" style="padding-bottom: 10px">
|
||||
<div class="level-title">
|
||||
<h1>集团单位承诺书</h1>
|
||||
</div>
|
||||
<div>
|
||||
<el-button icon="el-icon-download" type="primary" @click = "download(userDetailForm.COMMITMENT_LETTER)">下载附件</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="userDetailForm.ATTORNEY" style="padding-bottom: 10px">
|
||||
<div class="level-title">
|
||||
<h1>委托书</h1>
|
||||
|
|
Loading…
Reference in New Issue