Merge remote-tracking branch 'origin/liujun-2024-02-04-相关方新流程上线后新提需求' into 2024年2月22日v1.0.55

2024年2月22日v1.0.55
zhaoyu 2024-02-22 17:56:08 +08:00
commit adafcfd115
16 changed files with 2961 additions and 2536 deletions

View File

@ -0,0 +1,16 @@
export default async function useDownloadFile(url) {
if (!url) throw new Error('没有下载地址')
fetch(config.fileUrl + url)
.then((res) => res.blob())
.then((blob) => {
const a = document.createElement('a')
document.body.appendChild(a)
a.style.display = 'none'
const url = window.URL.createObjectURL(blob)
a.href = url
a.download = url.substring(url.lastIndexOf('/') + 1)
a.click()
document.body.removeChild(a)
window.URL.revokeObjectURL(url)
})
}

View File

@ -317,19 +317,21 @@ export default {
axios.get(config.httpurl + '/classMessage/excel?CLASS_MESSAGE_ID=' + id, {
responseType: 'blob'
}).then(res => {
const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)
downloadElement.style.display = 'none'
downloadElement.href = href
downloadElement.download = dayjs().format('YYYY-MM-DD HH:mm:ss')
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement)
window.URL.revokeObjectURL(href)
this.$emit('getResult', '')
loading.close()
this.close()
setTimeout(() => {
const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)
downloadElement.style.display = 'none'
downloadElement.href = href
downloadElement.download = dayjs().format('YYYY-MM-DD HH:mm:ss')
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement)
window.URL.revokeObjectURL(href)
this.$emit('getResult', '')
loading.close()
this.close()
}, 2000)
}).catch((e) => {
console.log(e)
loading.close()
@ -362,6 +364,7 @@ export default {
})
this.visible = false
this.loading = false
this.close()
this.$emit('getResult', '')
}).catch((e) => {
this.loading = false

View File

@ -224,7 +224,7 @@ export default {
varList: [],
treeData: [],
hiddenPartList: [],
hiddenTypeList: [],//
hiddenTypeList: [], //
hiddenlevelList: [
{
value: 'hiddenLevel1004',

File diff suppressed because it is too large Load Diff

View File

@ -22,9 +22,9 @@
:options="treeData"
:props="defaultProps"
v-model="form.INSPECTED_DEPARTMENT_ID"
@change="changeCurrentDeptId(form.INSPECTED_DEPARTMENT_ID)"
placeholder="请选择被检查单位"
style="width: 300px" />
style="width: 300px"
@change="changeCurrentDeptId(form.INSPECTED_DEPARTMENT_ID)" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -60,7 +60,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="检查开始时间" prop="INSPECTION_TIME_START">
<el-date-picker v-model="form.INSPECTION_TIME_START" format="yyyy-MM-dd HH:mm" v-on:blur="checkTime(form.INSPECTION_TIME_START)" value-format="yyyy-MM-dd HH:mm" type="datetime" placeholder="选择检查开始时间"/>
<el-date-picker v-model="form.INSPECTION_TIME_START" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" type="datetime" placeholder="选择检查开始时间" @blur="checkTime(form.INSPECTION_TIME_START)"/>
</el-form-item>
</el-col>
<el-col :span="8">
@ -70,7 +70,7 @@
</el-col>
</el-row>
<el-divider v-if="CURRENT_INSPECTED_DEPARTMENT_ID !== null && CURRENT_INSPECTED_DEPARTMENT_ID !== '' " content-position="left">检查人员 <el-button type="primary" size="mini" @click="addInspector"></el-button></el-divider>
<el-form-item v-if="CURRENT_INSPECTED_DEPARTMENT_ID !== null && CURRENT_INSPECTED_DEPARTMENT_ID !== '' " v-for="(item,index) in form.inspectorList" :key="index + (Math.random() + '').replace('.', '')" :label="(index+1)+'.'">
<el-form-item v-for="(item,index) in form.inspectorList" v-if="CURRENT_INSPECTED_DEPARTMENT_ID !== null && CURRENT_INSPECTED_DEPARTMENT_ID !== '' " :key="index + (Math.random() + '').replace('.', '')" :label="(index+1)+'.'">
<div class="uo-flex">
<el-row :gutter="20">
<el-col :span="12">
@ -350,7 +350,7 @@ export default {
},
pd: [],
switchInspectionType: 'select',
CURRENT_INSPECTED_DEPARTMENT_ID: '', //
CURRENT_INSPECTED_DEPARTMENT_ID: '', //
form: {
INSPECTION_SUBJECT: '', //
INSPECTION_SOURCE: '4', // 4- 5-
@ -473,9 +473,9 @@ export default {
})
},
methods: {
checkTime(data){
if (Date.parse(data)>new Date().getTime()){
this.$message.error("检查开始时间需小于当前时间")
checkTime(data) {
if (Date.parse(data) > new Date().getTime()) {
this.$message.error('检查开始时间需小于当前时间')
this.$refs['form'].resetFields()
}
},
@ -507,7 +507,7 @@ export default {
this.form.inspectorList.push({ INSPECTION_INSPECTOR_ID: '', INSPECTION_DEPARTMENT_ID: '', INSPECTION_USER_ID: '', USER_SIDE: '' })
this.INSPECTOR_List.push([])
},
updateInspecteDept(id,i,item) {
updateInspecteDept(id, i, item) {
//
if (id) {
requestFN(
@ -517,12 +517,12 @@ export default {
id: id
}
).then((data) => {
if (data.message!=null) {
if (data.message != null) {
this.INSPECTION_DEPARTMENT_ID = ''
this.INSPECTOR_List = []
this.INSPECTION_USER_ID = ''
this.$message.error(data.message)
}else {
} else {
//
if (id) {
requestFN(

View File

@ -1,301 +1,301 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-input v-model="KEYWORDS" placeholder="搜索" class="filter-item" style="width: 200px;"/>
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
</div>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="varList"
:row-key="getRowKey"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column
:reserve-selection="true"
type="selection"
width="55"
align="center"/>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="MENU_NAME" label="菜单名称" />
<el-table-column prop="MENU_URL" label="菜单地址" />
<el-table-column prop="PARENT_ID" label="父节点id" />
<el-table-column prop="MENU_ORDER" label="排序" />
<el-table-column prop="CORPINFO_ID" label="企业id" />
<el-table-column prop="IS_DELETE" label="删除状态" />
<el-table-column label="操作" align="center" width="200">
<template slot-scope="{row}">
<el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.APPMENUS_ID)"></el-button>
<el-button v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.APPMENUS_ID)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button v-show="add" type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
<el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="batchDel"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
<div class="app-container">
<div class="filter-container">
<el-input v-model="KEYWORDS" placeholder="搜索" class="filter-item" style="width: 200px;"/>
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
</div>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="varList"
:row-key="getRowKey"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column
:reserve-selection="true"
type="selection"
width="55"
align="center"/>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="MENU_NAME" label="菜单名称" />
<el-table-column prop="MENU_URL" label="菜单地址" />
<el-table-column prop="PARENT_ID" label="父节点id" />
<el-table-column prop="MENU_ORDER" label="排序" />
<el-table-column prop="CORPINFO_ID" label="企业id" />
<el-table-column prop="IS_DELETE" label="删除状态" />
<el-table-column label="操作" align="center" width="200">
<template slot-scope="{row}">
<el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.APPMENUS_ID)"></el-button>
<el-button v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.APPMENUS_ID)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button v-show="add" type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
<el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="batchDel"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
<el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='edit'?'修改':'新增'" width="600px">
<el-form ref="form" :rules="rules" :model="form" label-width="110px" style="width: 500px;">
<el-form-item label="菜单名称" prop="MENU_NAME">
<el-input ref="MENU_NAME" id="MENU_NAME" v-model="form.MENU_NAME" maxlength="255" placeholder="这里输入菜单名称..." title="菜单名称"/>
</el-form-item>
<el-form-item label="菜单地址" prop="MENU_URL">
<el-input ref="MENU_URL" id="MENU_URL" v-model="form.MENU_URL" maxlength="255" placeholder="这里输入菜单地址..." title="菜单地址"/>
</el-form-item>
<el-form-item label="父节点id" prop="PARENT_ID">
<el-input ref="PARENT_ID" id="PARENT_ID" v-model="form.PARENT_ID" maxlength="255" placeholder="这里输入父节点id..." title="父节点id"/>
</el-form-item>
<el-form-item label="排序" prop="MENU_ORDER">
<el-input ref="MENU_ORDER" id="MENU_ORDER" v-model.number="form.MENU_ORDER" maxlength="11" placeholder="这里输入排序..." title="排序"/>
</el-form-item>
<el-form-item label="企业id" prop="CORPINFO_ID">
<el-input ref="CORPINFO_ID" id="CORPINFO_ID" v-model="form.CORPINFO_ID" maxlength="255" placeholder="这里输入企业id..." title="企业id"/>
</el-form-item>
<el-form-item label="删除状态" prop="IS_DELETE">
<el-input ref="IS_DELETE" id="IS_DELETE" v-model.number="form.IS_DELETE" maxlength="2" placeholder="这里输入删除状态..." title="删除状态"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormEdit = false"> </el-button>
<el-button type="primary" @click="confirm"> </el-button>
</div>
</el-dialog>
</div>
<el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='edit'?'修改':'新增'" width="600px">
<el-form ref="form" :rules="rules" :model="form" label-width="110px" style="width: 500px;">
<el-form-item label="菜单名称" prop="MENU_NAME">
<el-input id="MENU_NAME" ref="MENU_NAME" v-model="form.MENU_NAME" maxlength="255" placeholder="这里输入菜单名称..." title="菜单名称"/>
</el-form-item>
<el-form-item label="菜单地址" prop="MENU_URL">
<el-input id="MENU_URL" ref="MENU_URL" v-model="form.MENU_URL" maxlength="255" placeholder="这里输入菜单地址..." title="菜单地址"/>
</el-form-item>
<el-form-item label="父节点id" prop="PARENT_ID">
<el-input id="PARENT_ID" ref="PARENT_ID" v-model="form.PARENT_ID" maxlength="255" placeholder="这里输入父节点id..." title="父节点id"/>
</el-form-item>
<el-form-item label="排序" prop="MENU_ORDER">
<el-input id="MENU_ORDER" ref="MENU_ORDER" v-model.number="form.MENU_ORDER" maxlength="11" placeholder="这里输入排序..." title="排序"/>
</el-form-item>
<el-form-item label="企业id" prop="CORPINFO_ID">
<el-input id="CORPINFO_ID" ref="CORPINFO_ID" v-model="form.CORPINFO_ID" maxlength="255" placeholder="这里输入企业id..." title="企业id"/>
</el-form-item>
<el-form-item label="删除状态" prop="IS_DELETE">
<el-input id="IS_DELETE" ref="IS_DELETE" v-model.number="form.IS_DELETE" maxlength="2" placeholder="这里输入删除状态..." title="删除状态"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormEdit = false"> </el-button>
<el-button type="primary" @click="confirm"> </el-button>
</div>
</el-dialog>
</div>
</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 },
data() {
return {
listLoading: true,
add: false,
del: false,
edit: false,
listQuery: {
page: 1,
limit: 10
},
total: 0,
KEYWORDS: '',
varList: [],
pd: [],
form: {
MENU_NAME: '',//
MENU_URL: '',//
PARENT_ID: '',//id
MENU_ORDER: '',//
CORPINFO_ID: '',//id
IS_DELETE: '',//
},
multipleSelectionAll: [], //
multipleSelection: [], //
dialogFormEdit: false,
dialogType: 'add',
rules: {
MENU_NAME: [{ required: true, message: '菜单名称不能为空', trigger: 'blur' }],
MENU_URL: [{ required: true, message: '菜单地址不能为空', trigger: 'blur' }],
PARENT_ID: [{ required: true, message: '父节点id不能为空', trigger: 'blur' }],
MENU_ORDER: [
{ required: true, message: '排序不能为空', trigger: 'change' },
{ type: 'number', message: '排序必须为数字' }
],
CORPINFO_ID: [{ required: true, message: '企业id不能为空', trigger: 'blur' }],
IS_DELETE: [
{ required: true, message: '删除状态不能为空', trigger: 'change' },
{ type: 'number', message: '删除状态必须为数字' }
],
}
}
},
created() {
this.getList(this.ROLE_ID)
},
methods: {
getRowKey(row) {
return row.APPMENUS_ID
},
//
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
//
getList() {
this.listLoading = true
requestFN(
'/appmenus/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
KEYWORDS: this.KEYWORDS
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
this.hasButton()
this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
},
//
handleAdd() {
this.dialogType = 'add'
this.resetForm()
this.getDict()
this.dialogFormEdit = true
},
//
handleEdit(ID) {
this.getDict()
this.dialogType = 'edit'
requestFN(
'/appmenus/goEdit',
{
APPMENUS_ID:ID
}
).then((data) => {
this.form = Object.assign({}, data.pd) // copy obj
}).catch((e) => {
this.listLoading = false
})
this.dialogFormEdit = true
},
//
confirm() {
this.$refs.form.validate(valid => {
if (valid) {
this.listLoading = true
requestFN(
'/appmenus/' + this.dialogType,
this.form
).then((data) => {
this.listLoading = false
this.dialogFormEdit = false
this.getList()
}).catch((e) => {
this.listLoading = false
})
} else {
return false
}
})
},
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 },
data() {
return {
listLoading: true,
add: false,
del: false,
edit: false,
listQuery: {
page: 1,
limit: 10
},
total: 0,
KEYWORDS: '',
varList: [],
pd: [],
form: {
MENU_NAME: '', //
MENU_URL: '', //
PARENT_ID: '', // id
MENU_ORDER: '', //
CORPINFO_ID: '', // id
IS_DELETE: ''//
},
multipleSelectionAll: [], //
multipleSelection: [], //
dialogFormEdit: false,
dialogType: 'add',
rules: {
MENU_NAME: [{ required: true, message: '菜单名称不能为空', trigger: 'blur' }],
MENU_URL: [{ required: true, message: '菜单地址不能为空', trigger: 'blur' }],
PARENT_ID: [{ required: true, message: '父节点id不能为空', trigger: 'blur' }],
MENU_ORDER: [
{ required: true, message: '排序不能为空', trigger: 'change' },
{ type: 'number', message: '排序必须为数字' }
],
CORPINFO_ID: [{ required: true, message: '企业id不能为空', trigger: 'blur' }],
IS_DELETE: [
{ required: true, message: '删除状态不能为空', trigger: 'change' },
{ type: 'number', message: '删除状态必须为数字' }
]
}
}
},
created() {
this.getList(this.ROLE_ID)
},
methods: {
getRowKey(row) {
return row.APPMENUS_ID
},
//
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
//
getList() {
this.listLoading = true
requestFN(
'/appmenus/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
KEYWORDS: this.KEYWORDS
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
this.hasButton()
this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
},
//
handleAdd() {
this.dialogType = 'add'
this.resetForm()
this.getDict()
this.dialogFormEdit = true
},
//
handleEdit(ID) {
this.getDict()
this.dialogType = 'edit'
requestFN(
'/appmenus/goEdit',
{
APPMENUS_ID: ID
}
).then((data) => {
this.form = Object.assign({}, data.pd) // copy obj
}).catch((e) => {
this.listLoading = false
})
this.dialogFormEdit = true
},
//
confirm() {
this.$refs.form.validate(valid => {
if (valid) {
this.listLoading = true
requestFN(
'/appmenus/' + this.dialogType,
this.form
).then((data) => {
this.listLoading = false
this.dialogFormEdit = false
this.getList()
}).catch((e) => {
this.listLoading = false
})
} else {
return false
}
})
},
handleDelete(id) {
this.$confirm('确定要删除吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/appmenus/delete',
{
APPMENUS_ID: id
}
).then(() => {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
handleDelete(id) {
this.$confirm('确定要删除吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/appmenus/delete',
{
APPMENUS_ID: id
}
).then(() => {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
batchDel() {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) {
this.$message({
message: '请选中要删除的项...',
type: 'error'
})
return false
}
const ids = _selectData.map((item, index) => {
return item.APPMENUS_ID
}).join(',')
batchDel() {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) {
this.$message({
message: '请选中要删除的项...',
type: 'error'
})
return false
}
const ids = _selectData.map((item, index) => {
return item.APPMENUS_ID
}).join(',')
this.$confirm('确定要删除选中的数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/appmenus/deleteAll',
{
DATA_IDS: ids
}
).then(() => {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
//
hasButton: function() {
var keys = 'appmenus:add,appmenus:del,appmenus:edit,toExcel';
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.appmenusfhadminadd; //
this.del = data.appmenusfhadmindel; //
this.edit = data.appmenusfhadminedit; //
}).catch((e) => {
this.listLoading = false
})
},
//
getDict: function (){
},
resetForm() {
this.form = {
MENU_NAME: '',//
MENU_URL: '',//
PARENT_ID: '',//id
MENU_ORDER: '',//
CORPINFO_ID: '',//id
IS_DELETE: '',//
}
}
}
}
this.$confirm('确定要删除选中的数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/appmenus/deleteAll',
{
DATA_IDS: ids
}
).then(() => {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
//
hasButton: function() {
var keys = 'appmenus:add,appmenus:del,appmenus:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.appmenusfhadminadd //
this.del = data.appmenusfhadmindel //
this.edit = data.appmenusfhadminedit //
}).catch((e) => {
this.listLoading = false
})
},
//
getDict: function() {
},
resetForm() {
this.form = {
MENU_NAME: '', //
MENU_URL: '', //
PARENT_ID: '', // id
MENU_ORDER: '', //
CORPINFO_ID: '', // id
IS_DELETE: ''//
}
}
}
}
</script>

View File

@ -603,7 +603,7 @@ export default {
if (this.pd.VILLAGE) {
areaRefID.push(this.pd.VILLAGE)
}
this.$set(this.pd,'shudi',areaRefID)
this.$set(this.pd, 'shudi', areaRefID)
const refDeptLevelVal = {}
refDeptLevelVal.id = this.pd.deptLevenlID
@ -625,7 +625,6 @@ export default {
this.pd.ROLE_ID = arrString
this.dialogFormEdit = true
await this.$nextTick()
},
handleEditStatus(row, type) {
const typeName = type == '1' ? '禁用' : '启用'

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -25,6 +25,19 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item prop="APPOINT_ANNEX" label="委托书:">
<upload-file
:file-list.sync="form.APPOINT_ANNEX"
:multiple="false"
:accept="'.pdf,.jpg,.png,doc,docx'"
:limit="1"
:size="1024"
:upload-type="1"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
@ -39,9 +52,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,
@ -80,6 +95,9 @@ export default {
],
OPINION: [
{ required: true, message: '请填写打回原因', trigger: 'change' }
],
APPOINT_ANNEX: [
{ required: true, message: '请上传文件', trigger: 'change' }
]
},
heirloom: {},
@ -111,7 +129,12 @@ export default {
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])
})
formData.append('weiTuoShu', this.form.APPOINT_ANNEX[0].raw)
upload('/xgf/user/attorney', formData)
.then((data) => {
this.$message.success('推送成功')
this.visible = false

View File

@ -7,7 +7,7 @@
title="审批流程"
width="60%">
<el-steps :space="200" :active="list.length" direction="vertical" finish-status="success">
<el-step v-for="item in list" :key="item.FLOW_DETAIL_ID" :value="item.FLOW_DETAIL_ID" :title="item.SORT">
<el-step v-for="item in list" :key="item.FLOW_DETAIL_ID" :value="item.FLOW_DETAIL_ID" :title="item.SORT+''">
<template slot="description">
<el-card class="box-card a" style="width: 900px;">
<div slot="header" class="clearfix">
@ -15,23 +15,30 @@
</div>
<div>
<el-row>
<el-col v-if="item.APPROVER_NAME">
审批人{{ item.APPROVER_NAME }}
<el-col :span="12">
<el-row>
<el-col v-if="item.APPROVER_NAME">
审批人{{ item.APPROVER_NAME }}
</el-col>
<el-col>
审批状态{{ item.PASS_FLAG === '1' ? '同意' : '不同意' }}
</el-col>
<el-col>
审批人归属公司{{ item.APPROVER_CORPINFO_NAME }}
</el-col>
<el-col>
审批时间{{ item.APPROVER_TIME }}
</el-col>
<el-col v-if="item.APPROVER_OPINION">
审批意见{{ item.APPROVER_OPINION }}
</el-col>
<el-col v-if="item.END_FLAG === '1'" style="color: red; font-weight: bold;font-size: large">
审批结束
</el-col>
</el-row>
</el-col>
<el-col>
审批状态{{ item.PASS_FLAG === '1' ? '同意' : '不同意' }}
</el-col>
<el-col>
审批人归属公司{{ item.APPROVER_CORPINFO_NAME }}
</el-col>
<el-col>
审批时间{{ item.APPROVER_TIME }}
</el-col>
<el-col v-if="item.APPROVER_OPINION">
审批意见{{ item.APPROVER_OPINION }}
</el-col>
<el-col v-if="item.END_FLAG === '1'" style="color: red; font-weight: bold;font-size: large">
审批结束
<el-col v-if="item.APPOINT_ANNEX" :span="12">
<el-button icon="el-icon-download" type="primary" @click = "download(item)">下载附件</el-button>
</el-col>
</el-row>
</div>
@ -47,6 +54,7 @@
<script>
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import useDownloadFile from '../../../../utils/useDownloadFile'
export default {
props: {
@ -77,6 +85,9 @@ export default {
},
closeWindow() {
this.handleClose()
},
download(item) {
useDownloadFile(item.APPOINT_ANNEX)
}
}
}

View File

@ -141,7 +141,7 @@
<tr>
<th>民族</th>
<td>{{ userDetailForm.minzuName ? userDetailForm.minzuName : '暂无信息' }}</td>
<td>{{ userDetailForm.NATIONALITY_NAME ? userDetailForm.NATIONALITY_NAME : '暂无信息' }}</td>
<th>婚姻状况</th>
<td>{{ userDetailForm.MARITALSTATUS === '0' ? '未婚' : '已婚' }}</td>
<th>政治面貌</th>

View File

@ -62,7 +62,7 @@
<tr>
<th>民族</th>
<td>{{ userDetailForm.minzuName ? userDetailForm.minzuName : '暂无信息' }}</td>
<td>{{ userDetailForm.NATIONALITY_NAME ? userDetailForm.NATIONALITY_NAME : '暂无信息' }}</td>
<th>婚姻状况</th>
<td>{{ userDetailForm.MARITALSTATUS === '0' ? '未婚' : '已婚' }}</td>
<th>政治面貌</th>
@ -137,6 +137,22 @@
<td>{{ formatLabel(userDetailForm.ISFLOW) }}</td>
</tr>
</table>
<div v-if="userDetailForm.ANNEX" style="padding-bottom: 10px">
<div class="level-title">
<h1>承诺书</h1>
</div>
<div>
<el-button icon="el-icon-download" type="primary" @click = "download(userDetailForm.ANNEX)">下载附件</el-button>
</div>
</div>
<div v-if="userDetailForm.ATTORNEY" style="padding-bottom: 10px">
<div class="level-title">
<h1>委托书</h1>
</div>
<div>
<el-button icon="el-icon-download" type="primary" @click = "download(userDetailForm.ATTORNEY)">下载附件</el-button>
</div>
</div>
<div>
<div class="level-title">
<h1>培训记录</h1>
@ -317,6 +333,7 @@
import vueQr from 'vue-qr'
import dateformat from '@/utils/dateformat'
import { requestFN } from '@/utils/request'
import useDownloadFile from '@/utils/useDownloadFile'
export default {
components: { vueQr },
@ -347,7 +364,6 @@ export default {
},
methods: {
init(e) {
console.log(e)
this.visible = true
this.heirloom = JSON.parse(JSON.stringify(e))
this.getUserInfoById(this.heirloom)
@ -402,6 +418,9 @@ export default {
} else {
return ''
}
},
download(item) {
useDownloadFile(item)
}
}
}

View File

@ -141,7 +141,7 @@
<tr>
<th>民族</th>
<td>{{ userDetailForm.minzuName ? userDetailForm.minzuName : '暂无信息' }}</td>
<td>{{ userDetailForm.NATIONALITY_NAME ? userDetailForm.NATIONALITY_NAME : '暂无信息' }}</td>
<th>婚姻状况</th>
<td>{{ userDetailForm.MARITALSTATUS === '0' ? '未婚' : '已婚' }}</td>
<th>政治面貌</th>