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

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -22,9 +22,9 @@
:options="treeData" :options="treeData"
:props="defaultProps" :props="defaultProps"
v-model="form.INSPECTED_DEPARTMENT_ID" v-model="form.INSPECTED_DEPARTMENT_ID"
@change="changeCurrentDeptId(form.INSPECTED_DEPARTMENT_ID)"
placeholder="请选择被检查单位" placeholder="请选择被检查单位"
style="width: 300px" /> style="width: 300px"
@change="changeCurrentDeptId(form.INSPECTED_DEPARTMENT_ID)" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -60,7 +60,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="检查开始时间" prop="INSPECTION_TIME_START"> <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-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -70,7 +70,7 @@
</el-col> </el-col>
</el-row> </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-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"> <div class="uo-flex">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
@ -350,7 +350,7 @@ export default {
}, },
pd: [], pd: [],
switchInspectionType: 'select', switchInspectionType: 'select',
CURRENT_INSPECTED_DEPARTMENT_ID: '', // CURRENT_INSPECTED_DEPARTMENT_ID: '', //
form: { form: {
INSPECTION_SUBJECT: '', // INSPECTION_SUBJECT: '', //
INSPECTION_SOURCE: '4', // 4- 5- INSPECTION_SOURCE: '4', // 4- 5-
@ -473,9 +473,9 @@ export default {
}) })
}, },
methods: { methods: {
checkTime(data){ checkTime(data) {
if (Date.parse(data)>new Date().getTime()){ if (Date.parse(data) > new Date().getTime()) {
this.$message.error("检查开始时间需小于当前时间") this.$message.error('检查开始时间需小于当前时间')
this.$refs['form'].resetFields() 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.form.inspectorList.push({ INSPECTION_INSPECTOR_ID: '', INSPECTION_DEPARTMENT_ID: '', INSPECTION_USER_ID: '', USER_SIDE: '' })
this.INSPECTOR_List.push([]) this.INSPECTOR_List.push([])
}, },
updateInspecteDept(id,i,item) { updateInspecteDept(id, i, item) {
// //
if (id) { if (id) {
requestFN( requestFN(
@ -517,12 +517,12 @@ export default {
id: id id: id
} }
).then((data) => { ).then((data) => {
if (data.message!=null) { if (data.message != null) {
this.INSPECTION_DEPARTMENT_ID = '' this.INSPECTION_DEPARTMENT_ID = ''
this.INSPECTOR_List = [] this.INSPECTOR_List = []
this.INSPECTION_USER_ID = '' this.INSPECTION_USER_ID = ''
this.$message.error(data.message) this.$message.error(data.message)
}else { } else {
// //
if (id) { if (id) {
requestFN( requestFN(

View File

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

View File

@ -603,7 +603,7 @@ export default {
if (this.pd.VILLAGE) { if (this.pd.VILLAGE) {
areaRefID.push(this.pd.VILLAGE) areaRefID.push(this.pd.VILLAGE)
} }
this.$set(this.pd,'shudi',areaRefID) this.$set(this.pd, 'shudi', areaRefID)
const refDeptLevelVal = {} const refDeptLevelVal = {}
refDeptLevelVal.id = this.pd.deptLevenlID refDeptLevelVal.id = this.pd.deptLevenlID
@ -625,7 +625,6 @@ export default {
this.pd.ROLE_ID = arrString this.pd.ROLE_ID = arrString
this.dialogFormEdit = true this.dialogFormEdit = true
await this.$nextTick() await this.$nextTick()
}, },
handleEditStatus(row, type) { handleEditStatus(row, type) {
const typeName = type == '1' ? '禁用' : '启用' 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-form-item>
</el-col> </el-col>
</el-row> </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> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -39,9 +52,11 @@
import vueQr from 'vue-qr' import vueQr from 'vue-qr'
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
import { requestFN } from '@/utils/request' import { requestFN } from '@/utils/request'
import uploadFile from '../../../util/uploadFile/index.vue'
import { upload } from '@/utils/upload'
export default { export default {
components: { Treeselect, vueQr }, components: { uploadFile, Treeselect, vueQr },
props: { props: {
appendToBody: { appendToBody: {
type: Boolean, type: Boolean,
@ -80,6 +95,9 @@ export default {
], ],
OPINION: [ OPINION: [
{ required: true, message: '请填写打回原因', trigger: 'change' } { required: true, message: '请填写打回原因', trigger: 'change' }
],
APPOINT_ANNEX: [
{ required: true, message: '请上传文件', trigger: 'change' }
] ]
}, },
heirloom: {}, heirloom: {},
@ -111,7 +129,12 @@ export default {
if (!valid) { if (!valid) {
this.$message.error('请填写完整信息') this.$message.error('请填写完整信息')
} else { } 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) => { .then((data) => {
this.$message.success('推送成功') this.$message.success('推送成功')
this.visible = false this.visible = false

View File

@ -7,7 +7,7 @@
title="审批流程" title="审批流程"
width="60%"> width="60%">
<el-steps :space="200" :active="list.length" direction="vertical" finish-status="success"> <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"> <template slot="description">
<el-card class="box-card a" style="width: 900px;"> <el-card class="box-card a" style="width: 900px;">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
@ -15,23 +15,30 @@
</div> </div>
<div> <div>
<el-row> <el-row>
<el-col v-if="item.APPROVER_NAME"> <el-col :span="12">
审批人{{ item.APPROVER_NAME }} <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>
<el-col> <el-col v-if="item.APPOINT_ANNEX" :span="12">
审批状态{{ item.PASS_FLAG === '1' ? '同意' : '不同意' }} <el-button icon="el-icon-download" type="primary" @click = "download(item)">下载附件</el-button>
</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-col>
</el-row> </el-row>
</div> </div>
@ -47,6 +54,7 @@
<script> <script>
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import useDownloadFile from '../../../../utils/useDownloadFile'
export default { export default {
props: { props: {
@ -77,6 +85,9 @@ export default {
}, },
closeWindow() { closeWindow() {
this.handleClose() this.handleClose()
},
download(item) {
useDownloadFile(item.APPOINT_ANNEX)
} }
} }
} }

View File

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

View File

@ -62,7 +62,7 @@
<tr> <tr>
<th>民族</th> <th>民族</th>
<td>{{ userDetailForm.minzuName ? userDetailForm.minzuName : '暂无信息' }}</td> <td>{{ userDetailForm.NATIONALITY_NAME ? userDetailForm.NATIONALITY_NAME : '暂无信息' }}</td>
<th>婚姻状况</th> <th>婚姻状况</th>
<td>{{ userDetailForm.MARITALSTATUS === '0' ? '未婚' : '已婚' }}</td> <td>{{ userDetailForm.MARITALSTATUS === '0' ? '未婚' : '已婚' }}</td>
<th>政治面貌</th> <th>政治面貌</th>
@ -137,6 +137,22 @@
<td>{{ formatLabel(userDetailForm.ISFLOW) }}</td> <td>{{ formatLabel(userDetailForm.ISFLOW) }}</td>
</tr> </tr>
</table> </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>
<div class="level-title"> <div class="level-title">
<h1>培训记录</h1> <h1>培训记录</h1>
@ -317,6 +333,7 @@
import vueQr from 'vue-qr' import vueQr from 'vue-qr'
import dateformat from '@/utils/dateformat' import dateformat from '@/utils/dateformat'
import { requestFN } from '@/utils/request' import { requestFN } from '@/utils/request'
import useDownloadFile from '@/utils/useDownloadFile'
export default { export default {
components: { vueQr }, components: { vueQr },
@ -347,7 +364,6 @@ export default {
}, },
methods: { methods: {
init(e) { init(e) {
console.log(e)
this.visible = true this.visible = true
this.heirloom = JSON.parse(JSON.stringify(e)) this.heirloom = JSON.parse(JSON.stringify(e))
this.getUserInfoById(this.heirloom) this.getUserInfoById(this.heirloom)
@ -402,6 +418,9 @@ export default {
} else { } else {
return '' return ''
} }
},
download(item) {
useDownloadFile(item)
} }
} }
} }

View File

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