增加非现场执法管理

This commit is contained in:
huxin02 2025-02-21 11:29:47 +08:00
parent 90133da606
commit 3c10d50f5c
7 changed files with 4729 additions and 0 deletions

View File

@ -0,0 +1,436 @@
<template>
<browser :component-loading="componentLoading"
class="enterpriseInfo"
ref="broTable"
:api-config="apiConfig"
:table-config="tableConfig"
:permissions="permissions"
:dialog-config="dialogConfig"
:actions="actions"
:customQuery="true"
@custom-query="handleQuery"
@update:actions="actions = $event"
@update:selection="selection = $event"
@update:query-params="queryParams = $event"
@update:dialog-config="dialogConfig = $event">
<template #queryPanel="{ queryParams: queryParams }">
<el-form ref="queryForm" :model="queryParams" label-width="80px">
<el-row class="query-condition">
<el-col :span="6">
<el-form-item label="属地" prop="agency">
<AgencySelector :filterable="true" v-model="queryParams.agency" :lazy-load="true" :multiple="false"
placeholder="请选择"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="行业类型" prop="industryType">
<el-select v-model="queryParams.industryType" placeholder="请选择" clearable>
<el-option v-for="item in DICTITEMS.HYLB_OPTIONS" :key="item.value" :label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="巡查类型" prop="xclx">
<el-select v-model="queryParams.xclx" placeholder="请选择" clearable>
<el-option v-for="item in DICTITEMS.XCLX_OPTIONS" :key="item.value" :label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<template #extraButton>
<el-button class="ins-button" type="warning" @click="handleSelectData">定制巡查</el-button>
<div class="extra-button" v-for="(item, index) in shopCarts" :key="index" @click="handleShopCart(item)">
<span class="qys">{{ item.enterprise.length }}</span>
<img src="../../assets/bigscreen/01.svg" style="width: 100%;height: 100%">
<!-- <font-awesome-icon icon="fa-shopping-cart" style="color: #2063fc; width: 100%;height: 100%"/>-->
</div>
</template>
<el-table-column prop="agency.agencyName" label="属地" min-width="250"/>
<el-table-column prop="unitName" label="企业" min-width="350"/>
<el-table-column prop="industryType" label="行业类型" min-width="200">
<template #default="{row}">
<el-span>{{ DICTDISPLAYS.HYLB_MAP[row.industryType] || row.industryType }}</el-span>
</template>
</el-table-column>
<el-table-column prop="videoAccessMsg" label="视频" min-width="100"/>
<el-table-column prop="perceptionAccessMsg" label="感知" min-width="100"/>
<el-table-column prop="infoAccessMsg" label="资料" min-width="100"/>
<el-table-column prop="permitAccessMsg" label="许可" min-width="100"/>
<template #dialog>
<el-dialog class="business-dialog" v-model="dialogConfig.show" :show-close="false" :append-to-body="true"
fullscreen>
<template #header>
<div class="cvi-dialog-header">
<div class="cvi-dialog-header-title">
<div class="dialog-line"></div>
{{ dialogConfig.title }}
</div>
<i class="iconfont icon-zyyy_tcgb" @click="dialogConfig.actions.handleClose"></i>
</div>
</template>
<el-form :label-width="dialogConfig.formLabelWidth" :model="dialogConfig.data" :rules="dialogConfig.rules">
<enterpriseInfo :dc="dialogConfig"/>
</el-form>
</el-dialog>
<el-dialog class="business-dialog" v-model="dialogConfig1.show" :show-close="false" :append-to-body="true"
:top="'100px'">
<template #header>
<div class="cvi-dialog-header">
<div class="cvi-dialog-header-title">
<div class="dialog-line"></div>
{{ dialogConfig1.title }}
</div>
<i class="iconfont icon-zyyy_tcgb" @click="dialogConfig1.actions.handleClose"></i>
</div>
</template>
<el-form label-width="100px" :model="dialogConfig1.data" :rules="dialogConfig1.rules" ref="formRef">
<el-row>
<el-col :span="24" class="padding-bottom-10">
<el-table :data="dialogConfig1.data.enterprise" height="300" border>
<el-table-column header-align="center" align="center" label="属地" prop="agency.agencyName"
min-width="250"/>
<el-table-column header-align="center" align="center" label="企业名称" prop="unitName" min-width="250"/>
</el-table>
</el-col>
<el-col :span="24">
<el-form-item label="录入人" prop="createUserName">
<el-input v-model="dialogConfig1.data.createUserName" readonly/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="录入时间" prop="createTime">
<el-input v-model="dialogConfig1.data.createTime" readonly/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="有效期" prop="validTime">
<el-date-picker v-model="dialogConfig1.data.validTime"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
:default-time="[new Date(2000, 2, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59)]"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div class="cvi-dialog-footer">
<el-button @click="dialogConfig1.actions.handleClose">取消</el-button>
<el-button type="primary" @click="dialogConfig1.actions.handleDialogOk">确定</el-button>
</div>
</template>
</el-dialog>
</template>
</browser>
</template>
<script setup>
import {reactive, toRefs, computed, ref, nextTick, watch} from 'vue'
import {useUserStore} from '@/stores/modules/user'
import enterprises from '@/api/lawenforcement/Enterprise.js'
import {DEFAULT_ENTERPRISE_DETAIL, DICTDISPLAYS, DICTITEMS} from '@/utils/Constants.js'
import {ElMessage} from 'element-plus'
import moment from 'moment'
import { v4 as uuid } from 'uuid'
import {AREA_DICT} from '@/utils/bigdict.js'
import Browser from '@/components/Browser.vue'
import enterpriseInfo from '@pages/dtsjygl/enterpriseInfo.vue'
import AgencySelector from '@/components/AgencySelector.vue'
let userInfo
useUserStore().getUserInfo().then(data => userInfo = data)
const state = reactive({
queryParams: {},
componentLoading: false,
permissions: {
query: true,
add: false,
modify: false,
detail: true,
delete: false,
importFile: false,
exportFile: false,
exportSelectFile: false,
downloadTemp: false,
},
tableConfig: {
controlWidth: '80',
hasControlColumn: true,
multipleSelect: true,
defaultSort: {
prop: 'dynamicRiskLevel',
order: 'descending'
},
},
apiConfig: {
api: enterprises,
modelId: 'enterpriseId'
},
dialogConfig: {
title: '企业详情',
show: false,
mode: 'detail',
loading: false,
formLabelWidth: '90px',
rules: {
industryType: [{required: true, message: '监管行业不能为空', trigger: 'blur'}],
unitName: [{required: true, message: '生产经营单位名称不能为空', trigger: 'blur'}],
shortName: [{required: true, message: '单位简称不能为空', trigger: 'blur'}],
unifiedSocialCode: [{required: true, message: '社会统一信用代码不能为空', trigger: 'blur'}],
businessStatus: [{required: true, message: '营业状态不能为空', trigger: 'blur'}],
orgCode: [{required: false, message: '所属机构不能为空', trigger: 'blur'}],
legalRepresentative: [{required: true, message: '法定代表人(经营者)姓名不能为空', trigger: 'blur'}],
contactPhone: [{required: true, message: '联系电话不能为空', trigger: 'blur'}],
agency: [{required: true, message: '属地不能为空', trigger: 'blur'}],
legalPhone: [{required: true, message: '联系电话不能为空', trigger: 'blur'}],
legalDuty: [{required: true, message: '法定代表人(经营者)职位不能为空', trigger: 'blur'}],
regulatedIndustry: [{required: true, message: '国民经济行业分类不能为空', trigger: 'blur'}],
affiliation: [{required: true, message: '行政隶属关系不能为空', trigger: 'blur'}],
oilExtract: [{required: true, message: '是否石油开采不能为空', trigger: 'blur'}],
safetyFocus: [{required: true, message: '列入安全生产监管重点企业不能为空', trigger: 'blur'}],
largeScale: [{required: true, message: '规模以上生产经营单位不能为空', trigger: 'blur'}],
safetyLic: [{required: true, message: '企业是否有安全生产许可证不能为空', trigger: 'blur'}],
opScope: [{required: true, message: '主营业务不能为空', trigger: 'blur'}],
areaComb: [{required: true, message: '注册地址不能为空', trigger: 'blur'}],
detailedAddress: [{required: true, message: '注册详细地址不能为空', trigger: 'blur'}],
opLocAreaComb: [{required: true, message: '经营地址不能为空', trigger: 'blur'}],
opLocAddress: [{required: true, message: '经营详细地址不能为空', trigger: 'blur'}],
dynamicRiskLevel: [{required: true, message: '动态风险等级不能为空', trigger: 'blur'}],
isScaleEnterprise: [{required: true, message: '规模以上生产经营单位不能为空', trigger: 'blur'}]
},
data: {},
actions: {
handleClose: handleClose,
}
},
dialogConfig1: {
show: false,
mode: 'detail',
title: '待巡查企业',
loading: false,
data: {},
actions: {
handleClose: handleClose1,
handleDialogOk: handleDialogOk
},
rules: {
validTime: [{required: true, message: '有效期不能为空', trigger: 'change'}],
},
},
actions: {
detail: handleDetail
},
selection: [],
})
const {
queryParams,
componentLoading,
permissions,
tableConfig,
apiConfig,
dialogConfig,
dialogConfig1,
actions,
selection,
} = toRefs(state)
//
function handleQuery(queryParam) {
tableConfig.value.tableLoading = true
apiConfig.value.api.queryIns(queryParam).then(res => {
tableConfig.value.tableLoading = false
if (res.success) {
tableConfig.value.tableData = res
} else {
ElMessage.error('执法信息查询失败')
}
})
}
//
const defaultValues = reactive(DEFAULT_ENTERPRISE_DETAIL)
async function handleDetail(row) {
dialogConfig.value.show = true
dialogConfig.value.mode = 'detail'
dialogConfig.value.title = '详情企业信息'
findOne(row)
}
function findOne(row) {
dialogConfig.value.loading = true
let defaultVals = {
//
productionManageInfoExp: {productionManageSystems: [{systemName: '', systemCompileDate: ''}], productionManagePlans: [{planName: '', planCompileDate: '', planType: ''}]},
//
productionEquipmentExp: {productionFacilities: [{equipName: '', equipType: '', commissioningDate: ''}], auxiliaryBuildings: [{auxiliaryName: '', floorArea: '', commissioningDate: ''}]},
//
coalIndustryExpansion: {},
//
nocoalIndustryExpansion: {},
//
dangerFeatureInfo: {majorDangerInfos: {}, majorDangerCraftInfos: {}, dangerInfos: {}},
//
fireworksAddInfo: {},
//
industryExpandInfos: {}
}
dialogConfig.value.data = Object.assign({}, defaultVals)
apiConfig.value.api.findOne(row[apiConfig.value.modelId]).then(res => {
if (res.success) {
const data = res.data || {}
//
const fieldsToDeserialize = Object.keys(defaultVals)
deserializeFields(data, fieldsToDeserialize)
//
Object.keys(defaultVals).forEach(key => {
if (!data[key]) {
data[key] = defaultVals[key]
}
})
data.regulatedIndustry = data.regulatedIndustry ? data.regulatedIndustry.split("/") : []
data.areaComb = data.areaComb ? data.areaComb.split("/") : []
data.opLocAreaComb = data.opLocAreaComb ? data.opLocAreaComb.split("/") : []
dialogConfig.value.data = Object.assign({}, data)
}
dialogConfig.value.loading = false
})
}
function deserializeFields(data, fields) {
fields.forEach(field => {
if (data[field]) {
try {
data[field] = JSON.parse(data[field])
} catch (e) {
console.error(`Failed to parse ${field}:`, e)
}
}
})
}
function handleClose() {
dialogConfig.value.show = false
}
//
let shopCarts = ref([])
function handleSelectData() {
let arr = selection.value
let data = Array.from(new Map(arr.map(item => [item.enterpriseId, item])).values())
if (data.length < 1) {
ElMessage.error('请选择待巡查企业')
return
}
shopCarts.value.push({
'id': uuid(),
'enterprise': data,
'createUserId': userInfo.yhwybs,
'createUserName': userInfo.xm,
'createTime': moment().format('YYYY-MM-DD HH:mm:ss')
})
}
function handleShopCart(data) {
dialogConfig1.value.data = Object.assign({}, data)
dialogConfig1.value.show = true
}
function handleClose1() {
dialogConfig1.value.show = false
}
const formRef = ref()
function handleDialogOk() {
let _event = actions.value
formRef.value.validate(valid => {
if (valid) {
dialogConfig1.value.data.validStartTime = dialogConfig1.value.data.validTime[0]
dialogConfig1.value.data.validEndTime = dialogConfig1.value.data.validTime[1]
dialogConfig1.value.data.enterpriseIds = dialogConfig1.value.data.enterprise.map(item => item.enterpriseId)
dialogConfig.value.loading = true
apiConfig.value.api.addIns(dialogConfig1.value.data).then(res => {
dialogConfig.value.loading = false
if (res.success) {
//
shopCarts.value = shopCarts.value.filter(item => item.id !== dialogConfig1.value.data.id)
dialogConfig1.value.show = false
ElMessage.success('操作成功')
_event.query()
} else {
ElMessage.error('操作失败')
}
})
}
})
}
</script>
<style lang="scss" scoped>
:deep(.el-col-21) {
display: flex;
flex-direction: row-reverse;
align-items: center;
}
.ins-button {
margin-left: unset !important;
margin-right: 12px;
}
.extra-button {
width: 24px !important;
height: 24px !important;
margin: 0px 12px 0px 0px !important;
cursor: pointer;
position: relative;
.qys {
width: 16px;
height: 16px;
background: red;
border-radius: 50%;
position: absolute;
top: -6px;
right: -6px;
font-size: 12px;
text-align: center;
vertical-align: center;
}
}
.el-dialog {
margin-bottom: 0;
border: 0.0625rem solid rgba(255, 255, 255, 1);
border-radius: 1rem !important;
}
.el-dialog__body {
height: unset !important;
}
.padding-bottom-10 {
padding-bottom: 10px;
}
</style>

View File

@ -0,0 +1,216 @@
<template>
<browser class="browser-businesss-table"
ref="broTable"
:component-loading="componentLoading"
:api-config="apiConfig"
:table-config="tableConfig"
:permissions="permissions"
:actions="actions"
:custom-reset="true"
@custom-reset="reset"
:customQuery="true"
@custom-query="handleQuery"
@update:actions="actions = $event">
<template #queryPanel>
<el-form ref="queryForm" :model="queryParams" label-width="100px">
<el-row class="query-condition">
<el-col :span="12">
<el-form-item label="统计时间" prop="statisticsTime">
<el-date-picker v-model="queryParams.statisticsTime"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
format="YYYY-MM-DD HH:mm:ss"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<el-table-column header-align="center" align="center" prop="agency_name" label="属地" min-width="150"/>
<el-table-column header-align="center" align="center" prop="xccs" label="巡查次数" min-width="150"
class-name="can-click"/>
<el-table-column header-align="center" align="center" prop="fxwts" label="发现问题" min-width="150"
class-name="can-click"/>
<el-table-column header-align="center" align="center" prop="jjwts" label="解决问题" min-width="150"
class-name="can-click"/>
<el-table-column header-align="center" align="center" prop="las" label="立案数" min-width="150"
class-name="can-click"/>
<el-table-column header-align="center" align="center" prop="cfs" label="处罚数" min-width="150"
class-name="can-click"/>
<template>
<el-dialog :open="dialogConfig.show" :title="dialogConfig.title" v-if="dialogConfig.show" :show-footer="false"
@update:open="dialogConfig.show = false">
<fxczftjxcdetail :dialog-data="dialogConfig.data" :tag="tag"/>
</el-dialog>
</template>
<template>
<el-dialog :open="dialogConfig2.show" :title="dialogConfig2.title" v-if="dialogConfig2.show" :show-footer="false"
@update:open="dialogConfig2.show = false">
<fxczftjlacftail :dialog-data="dialogConfig2.data" :tag="tag"/>
</el-dialog>
</template>
</browser>
</template>
<script setup>
import {reactive, ref, toRefs} from 'vue'
import browser from '@/components/Browser.vue'
import lawEnfPenaltyStat from '@/api/lawenforcement/LawEnfPenaltyStat'
import Browser from "@/components/Browser.vue";
import ElDialog from "@/components/ElDialog/index.vue";
import fxczftjxcdetail from "@pages/dtsjygl/fxczftjxcdetail.vue";
import fxczftjlacftail from "@pages/dtsjygl/fxczftjlacftail.vue";
import moment from "moment/moment.js";
import {ElMessage, ElMessageBox} from "element-plus";
const state = reactive({
componentLoading: false,
queryParams: {
statisticsTime: [moment().subtract(1, 'months').format('YYYY-MM-DD') + ' 00:00:00', moment().format('YYYY-MM-DD') + ' 23:59:59']
},
permissions: {
query: true,
add: false,
modify: false,
detail: false,
delete: false,
importFile: false,
exportFile: true,
exportSelectFile: false,
downloadTemp: false,
},
tableConfig: {
tableId: 'fxczftjTableId',
hasControlColumn: false,
tableData: [],
tableLoading: false,
usePage: false,
multipleSelect: false,
cellClick: caseEventClick,
// lazy: true,
// rowKey: 'agencyCode',
// treeProps: { children: 'children', hasChildren: 'hasChildren' },
// load: loadTree
},
dialogConfig: {
show: false,
mode: 'detail',
loading: false,
data: {},
actions: {},
},
dialogConfig2: {
show: false,
mode: 'detail',
loading: false,
data: {},
actions: {},
},
apiConfig: {
api: lawEnfPenaltyStat,
modelId: 'enforcementId',
},
actions: {
exportData: handleExport
},
tag: ''
})
const {
componentLoading,
queryParams,
permissions,
tableConfig,
apiConfig,
actions,
dialogConfig,
dialogConfig2,
tag
} = toRefs(state)
function handleQuery() {
if (queryParams.value.statisticsTime === null) {
ElMessage.error('请选择统计时间')
return
}
tableConfig.value.tableLoading = true
apiConfig.value.api.statistics(queryParams.value).then(res => {
tableConfig.value.tableLoading = false
if (res.success) {
tableConfig.value.tableData = res
}
}).finally(() => {
tableConfig.value.tableLoading = false
})
}
function reset(query) {
queryParams.value.statisticsTime = [moment().subtract(1, 'months').format('YYYY-MM-DD') + ' 00:00:00', moment().format('YYYY-MM-DD') + ' 23:59:59']
handleQuery()
}
function caseEventClick(row, column, cell, event) {
const colProp = column.property
if (colProp === "xccs" && row[colProp] > 0) {
tag.value = 'xccs'
let query = Object.assign(queryParams.value, {agencyCode: row.agency_code})
dialogConfig.value.data = query
dialogConfig.value.show = true
dialogConfig.value.mode = 'detail'
dialogConfig.value.title = '巡查次数详情'
}
if (colProp === "fxwts" && row[colProp] > 0) {
tag.value = 'fxwts'
let query = Object.assign(queryParams.value, {agencyCode: row.agency_code})
dialogConfig.value.data = query
dialogConfig.value.show = true
dialogConfig.value.mode = 'detail'
dialogConfig.value.title = '发现问题数详情'
}
if (colProp === "jjwts" && row[colProp] > 0) {
tag.value = 'jjwts'
let query = Object.assign(queryParams.value, {agencyCode: row.agency_code})
dialogConfig.value.data = query
dialogConfig.value.show = true
dialogConfig.value.mode = 'detail'
dialogConfig.value.title = '解决问题数详情'
}
if (colProp === "las" && row[colProp] > 0) {
tag.value = 'las'
let query = Object.assign(queryParams.value, {agencyCode: row.agency_code})
dialogConfig2.value.data = query
dialogConfig2.value.show = true
dialogConfig2.value.mode = 'detail'
dialogConfig2.value.title = '立案数详情'
}
if (colProp === "cfs" && row[colProp] > 0) {
tag.value = 'cfs'
let query = Object.assign(queryParams.value, {agencyCode: row.agency_code})
dialogConfig2.value.data = query
dialogConfig2.value.show = true
dialogConfig2.value.mode = 'detail'
dialogConfig2.value.title = '处罚数详情'
}
}
const broTable = ref(null)
function handleExport() {
broTable.value.busiTable.exportExcelFileForCurrentPage(tableConfig.value.tableId, '非现场执法统计')
}
</script>
<style lang="scss" scoped>
.browser-businesss-table {
.browser-businesss-table-dialog-form {
padding: 10px 20px 10px 20px;
}
}
:deep(.el-table) {
.can-click {
cursor: pointer;
color: #126eee;
}
}
</style>

View File

@ -0,0 +1,204 @@
<template>
<div v-loading="exporting" id="ajysspb" ref="pdfTemplate" class="ws-container">
<div class="ws-title"><span class="ws-title-text">安全生产行政执法文书</span></div>
<div class="ws-document-name"><span class="ws-document-name-text">{{documentName}}</span></div>
<div class="ws-document-code"><span class="ws-document-code-text">{{documentCode}}</span></div>
<p class="MsoNormal" style="margin-top: 15px"><span class="MsoNormal-span">案件名称<span class="font-underline">&nbsp;{{documenContent.ajmc}}&nbsp;</span></span></p>
<table class="case-table">
<tbody>
<tr>
<td rowspan="5" class="title-cell">当事人基本情况</td>
<td class="title-cell">被处罚单位</td>
<td colspan="2" class="content-cell">{{documenContent.qymc}}</td>
<td colspan="2" class="title-cell">地址</td>
<td colspan="3" class="content-cell">{{documenContent.dz}}</td>
</tr>
<tr>
<td class="title-cell">法定代表人/负责人</td>
<td colspan="2" class="content-cell">{{documenContent.fddbr}}</td>
<td colspan="2" class="title-cell">职务</td>
<td class="content-cell">{{documenContent.zw}}</td>
<td class="title-cell">邮编 </td>
<td class="content-cell">{{documenContent.yzbm}}</td>
</tr>
<tr>
<td class="title-cell">被处罚人</td>
<td colspan="2" class="content-cell">{{documenContent.xm}}</td>
<td colspan="2" class="title-cell">年龄</td>
<td class="content-cell">{{documenContent.nl}}</td>
<td class="title-cell">性别</td>
<td class="content-cell">{{documenContent.xb}}</td>
</tr>
<tr>
<td class="title-cell">所在单位</td>
<td colspan="2" class="content-cell">{{documenContent.szdw}}</td>
<td colspan="2" class="title-cell">单位地址</td>
<td colspan="3" class="content-cell">{{documenContent.dwdz}}</td>
</tr>
<tr>
<td class="title-cell">家庭住址</td>
<td colspan="2" class="content-cell">{{documenContent.jtzz}}</td>
<td colspan="2" class="title-cell">联系电话</td>
<td class="content-cell">{{documenContent.phone}}</td>
<td class="title-cell">邮编</td>
<td class="content-cell">{{documenContent.yb}}</td>
</tr>
<tr>
<td class="title-cell">违法事实及处罚依据</td>
<td colspan="8" class="content-cell">{{documenContent.wfsscfyj}}</td>
</tr>
<tr>
<td class="title-cell">当事人申辩意见</td>
<td colspan="8" class="content-cell">{{documenContent.dsrsbyj}}</td>
</tr>
<tr>
<td class="title-cell">承办人意见</td>
<td colspan="8" class="content-cell">{{documenContent.cbryj}}<br>
<div style="float: right">承办人签名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;{{formattedDate}}</div></td>
</tr>
<tr>
<td class="title-cell">审核意见</td>
<td colspan="2" class="content-cell">{{documenContent.shyj}}<br>
<div style="float: right">审核人签名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;{{formattedDate}}</div></td>
<td colspan="2" class="title-cell">审批意见</td>
<td colspan="4" class="content-cell">{{documenContent.spyj}}<br>
<div style="float: right">审批人签名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;{{formattedDate}}</div></td>
</tr>
</tbody>
</table>
</div>
<div style="margin-bottom: 10px;text-align: center">
<el-button :disabled="exporting" type="primary" @click="printInfo">打印</el-button>
<el-button :disabled="exporting" type="danger" @click="generatePDF">导出pdf</el-button>
</div>
</template>
<script setup>
import {defineProps, ref,} from 'vue'
import {ElButton, ElMessage} from "element-plus";
import Print from 'print-js'
import { exportPDF } from "@/utils/ExportPdf.js";
import moment from 'moment/moment.js';
defineProps({
documentCode: String,
documentNo: Number,
documentName: String,
caseInfo: {
type: Object,
default: () => ({}),
},
documenContent: {
type: Object,
default: () => ({}),
},
})
const printInfo = (e) =>{
Print({
printable: document.getElementById('ajysspb'),
type: 'html',
honorMarginPadding: false,
targetStyles: ['*']
})
}
const formattedDate = moment().format('YYYY年MM月DD日');
const pdfTemplate = ref(null)
const exporting = ref(false)
const generatePDF = async () => {
exporting.value = true
try {
const result = await exportPDF(pdfTemplate,"案件处理呈批表.pdf");
if(result.success)
exporting.value = false
} catch (error) {
exporting.value = false
ElMessage.error(error.message)
}
}
</script>
<style lang="scss" scoped>
.ws-container {
width: 21cm; /* A4纸宽度 */
min-height: 29.7cm; /* A4纸高度 */
padding: 2cm;
font-family: "仿宋", SimSun;
line-height: 1.5;
}
.ws-title {
text-align: center;
border-bottom-style: double;
border-bottom-color: #111111;
border-bottom-width: 2px;
color: #111111;
.ws-title-text {
font-size: 40px;
font-family: 华文中宋;
font-weight: bold
}
}
.ws-document-name {
text-align: center;
border-top-style: double;
border-top-color: #111111;
border-top-width: 2px;
margin-top: 2px;
color: #111111;
.ws-document-name-text {
font-size: 40px;
font-family: 华文中宋;
font-weight: bold
}
}
.ws-document-code {
text-align: center;
margin-top: 10px;
.ws-document-code-text {
font-size: 18px;
font-family: 仿宋
}
}
.case-table {
margin-top: 10px;
width: 100%;
border-collapse: collapse;
border: 1px solid black;
}
.title-cell {
width: 110px;
font-size: 18px;
font-family: 仿宋;
border: 1px solid black;
vertical-align: center;
text-align: center;
line-height: 2;
}
.content-cell {
font-size: 18px;
font-family: 仿宋;
padding-top: 5px;
padding-left: 5px;
border: 1px solid black;
text-align: left;
line-height: 2;
}
.MsoNormal {
margin-bottom:10px;
mso-para-margin-bottom:2.0gd;
text-align:left;
text-indent:24.0pt;
line-height:22.0pt;
mso-line-height-rule:exactly;
text-autospace:ideograph-numeric;
.MsoNormal-span {
font-size: 18px;
font-family:仿宋;
}
.font-underline {
text-decoration:underline;text-underline-position: under;text-underline-offset: 1px;
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,447 @@
<template>
<browser :component-loading="componentLoading"
class="enterpriseInfo"
ref="broTable"
:api-config="apiConfig"
:table-config="tableConfig"
:permissions="permissions"
:dialog-config="dialogConfig"
:default-query-params="queryParams"
:actions="actions"
:customQuery="true"
@custom-query="handleQuery"
@update:actions="actions = $event"
@update:selection="selection = $event"
@update:query-params="queryParams = $event"
@update:dialog-config="dialogConfig = $event">
<template #queryPanel="{ queryParams: queryParams }">
<el-form ref="queryForm" :model="queryParams" label-width="80px">
<el-row class="query-condition">
<el-col :span="6">
<el-form-item label="属地" prop="agency">
<AgencySelector :filterable="true" v-model="queryParams.agency" :lazy-load="true" :multiple="false"
placeholder="请选择"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="行业类型" prop="industryType">
<el-select v-model="queryParams.industryType" placeholder="请选择" clearable>
<el-option v-for="item in DICTITEMS.HYLB_OPTIONS" :key="item.value" :label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="巡查类型" prop="xclx">
<el-select v-model="queryParams.xclx" placeholder="请选择" clearable>
<el-option v-for="item in DICTITEMS.XCLX_OPTIONS" :key="item.value" :label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="巡查数量" prop="insNum">
<el-input v-model="queryParams.insNum" clearable/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<template #extraButton>
<el-button class="extra-button" type="warning" @click="handleSelectData">随机巡查</el-button>
</template>
<el-table-column prop="agency.agencyName" label="属地" min-width="250"/>
<el-table-column prop="unitName" label="企业" min-width="350"/>
<el-table-column prop="industryType" label="行业类型" min-width="200">
<template #default="{row}">
<el-span>{{ DICTDISPLAYS.HYLB_MAP[row.industryType] || row.industryType }}</el-span>
</template>
</el-table-column>
<el-table-column prop="videoAccessMsg" label="视频" min-width="100"/>
<el-table-column prop="perceptionAccessMsg" label="感知" min-width="100"/>
<el-table-column prop="infoAccessMsg" label="资料" min-width="100"/>
<el-table-column prop="permitAccessMsg" label="许可" min-width="100"/>
<template #dialog>
<el-dialog class="business-dialog" v-model="dialogConfig.show" :show-close="false" :append-to-body="true"
fullscreen>
<template #header>
<div class="cvi-dialog-header">
<div class="cvi-dialog-header-title">
<div class="dialog-line"></div>
{{ dialogConfig.title }}
</div>
<i class="iconfont icon-zyyy_tcgb" @click="dialogConfig.actions.handleClose"></i>
</div>
</template>
<el-form :label-width="dialogConfig.formLabelWidth" :model="dialogConfig.data" :rules="dialogConfig.rules">
<enterpriseInfo :dc="dialogConfig"/>
</el-form>
</el-dialog>
<el-dialog class="business-dialog" v-model="dialogConfig1.show" :show-close="false" :append-to-body="true"
:top="'100px'">
<template #header>
<div class="cvi-dialog-header">
<div class="cvi-dialog-header-title">
<div class="dialog-line"></div>
{{ dialogConfig1.title }}
</div>
<i class="iconfont icon-zyyy_tcgb" @click="dialogConfig1.actions.handleClose"></i>
</div>
</template>
<el-form label-width="100px" :model="dialogConfig1.data" :rules="dialogConfig1.rules" ref="formRef">
<el-row>
<el-col :span="24" class="padding-bottom-10">
<el-table :data="dialogConfig1.data.enterprise" height="300" border>
<el-table-column header-align="center" align="center" label="属地" prop="agency.agencyName"
min-width="250"/>
<el-table-column header-align="center" align="center" label="企业名称" prop="unitName" min-width="250"/>
</el-table>
</el-col>
<el-col :span="24">
<el-form-item label="录入人" prop="createUserName">
<el-input v-model="dialogConfig1.data.createUserName" readonly/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="录入时间" prop="createTime">
<el-input v-model="dialogConfig1.data.createTime" readonly/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="有效期" prop="validTime">
<el-date-picker v-model="dialogConfig1.data.validTime"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
:default-time="[new Date(2000, 2, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59)]"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div class="cvi-dialog-footer">
<el-button @click="dialogConfig1.actions.handleClose">取消</el-button>
<el-button type="primary" @click="dialogConfig1.actions.handleDialogOk">确定</el-button>
</div>
</template>
</el-dialog>
</template>
</browser>
</template>
<script setup>
import {reactive, toRefs, computed, ref, nextTick, watch} from 'vue'
import {useUserStore} from '@/stores/modules/user'
import enterprises from '@/api/lawenforcement/Enterprise.js'
import {DEFAULT_ENTERPRISE_DETAIL, DICTDISPLAYS, DICTITEMS} from '@/utils/Constants.js'
import {ElMessage} from 'element-plus'
import moment from 'moment'
import {AREA_DICT} from '@/utils/bigdict.js'
import Browser from '@/components/Browser.vue'
import enterpriseInfo from '@pages/dtsjygl/enterpriseInfo.vue'
import AgencySelector from '@/components/AgencySelector.vue'
let userInfo
useUserStore().getUserInfo().then(data => userInfo = data)
const state = reactive({
queryParams: {
insNum: 20
},
componentLoading: false,
permissions: {
query: true,
add: false,
modify: false,
detail: true,
delete: false,
importFile: false,
exportFile: false,
exportSelectFile: false,
downloadTemp: false,
},
tableConfig: {
controlWidth: '80',
hasControlColumn: true,
multipleSelect: true,
defaultSort: {
prop: 'dynamicRiskLevel',
order: 'descending'
},
usePage: false,
},
apiConfig: {
api: enterprises,
modelId: 'enterpriseId'
},
dialogConfig: {
title: '企业详情',
show: false,
mode: 'detail',
loading: false,
formLabelWidth: '90px',
rules: {
industryType: [{required: true, message: '监管行业不能为空', trigger: 'blur'}],
unitName: [{required: true, message: '生产经营单位名称不能为空', trigger: 'blur'}],
shortName: [{required: true, message: '单位简称不能为空', trigger: 'blur'}],
unifiedSocialCode: [{required: true, message: '社会统一信用代码不能为空', trigger: 'blur'}],
businessStatus: [{required: true, message: '营业状态不能为空', trigger: 'blur'}],
orgCode: [{required: false, message: '所属机构不能为空', trigger: 'blur'}],
legalRepresentative: [{required: true, message: '法定代表人(经营者)姓名不能为空', trigger: 'blur'}],
contactPhone: [{required: true, message: '联系电话不能为空', trigger: 'blur'}],
agency: [{required: true, message: '属地不能为空', trigger: 'blur'}],
legalPhone: [{required: true, message: '联系电话不能为空', trigger: 'blur'}],
legalDuty: [{required: true, message: '法定代表人(经营者)职位不能为空', trigger: 'blur'}],
regulatedIndustry: [{required: true, message: '国民经济行业分类不能为空', trigger: 'blur'}],
affiliation: [{required: true, message: '行政隶属关系不能为空', trigger: 'blur'}],
oilExtract: [{required: true, message: '是否石油开采不能为空', trigger: 'blur'}],
safetyFocus: [{required: true, message: '列入安全生产监管重点企业不能为空', trigger: 'blur'}],
largeScale: [{required: true, message: '规模以上生产经营单位不能为空', trigger: 'blur'}],
safetyLic: [{required: true, message: '企业是否有安全生产许可证不能为空', trigger: 'blur'}],
opScope: [{required: true, message: '主营业务不能为空', trigger: 'blur'}],
areaComb: [{required: true, message: '注册地址不能为空', trigger: 'blur'}],
detailedAddress: [{required: true, message: '注册详细地址不能为空', trigger: 'blur'}],
opLocAreaComb: [{required: true, message: '经营地址不能为空', trigger: 'blur'}],
opLocAddress: [{required: true, message: '经营详细地址不能为空', trigger: 'blur'}],
dynamicRiskLevel: [{required: true, message: '动态风险等级不能为空', trigger: 'blur'}],
isScaleEnterprise: [{required: true, message: '规模以上生产经营单位不能为空', trigger: 'blur'}]
},
data: {},
actions: {
handleClose: handleClose,
}
},
dialogConfig1: {
show: false,
mode: 'detail',
title: '待巡查企业',
loading: false,
data: {},
actions: {
handleClose: handleClose1,
handleDialogOk: handleDialogOk
},
rules: {
validTime: [{required: true, message: '有效期不能为空', trigger: 'change'}],
},
},
actions: {
detail: handleDetail
},
selection: [],
})
const {
queryParams,
componentLoading,
permissions,
tableConfig,
apiConfig,
dialogConfig,
dialogConfig1,
actions,
selection,
} = toRefs(state)
let page = 0
let totalPages = 0
//
function handleQuery(queryParams) {
page += 1
if (totalPages != 0 && page > totalPages) {
page = 1
}
queryParams.page = page
queryParams.pageSize = queryParams.insNum
queryParams.pagesize = queryParams.insNum
tableConfig.value.tableLoading = true
apiConfig.value.api.queryIns(queryParams).then(res => {
tableConfig.value.tableLoading = false
if (res.success) {
totalPages = res.totalPages
tableConfig.value.tableData = res
} else {
ElMessage.error('执法信息查询失败')
}
})
}
//
watch(
() => queryParams.value.agency,
() => {
page = 0
totalPages = 0
}
)
watch(
() => queryParams.value.industryType,
() => {
page = 0
totalPages = 0
}
)
watch(
() => queryParams.value.dynamicRiskLevel,
() => {
page = 0
totalPages = 0
}
)
watch(
() => queryParams.value.insNum,
() => {
page = 0
totalPages = 0
}
)
//
const defaultValues = reactive(DEFAULT_ENTERPRISE_DETAIL)
async function handleDetail(row) {
dialogConfig.value.show = true
dialogConfig.value.mode = 'detail'
dialogConfig.value.title = '详情企业信息'
findOne(row)
}
function findOne(row) {
dialogConfig.value.loading = true
let defaultVals = {
//
productionManageInfoExp: {productionManageSystems: [{systemName: '', systemCompileDate: ''}], productionManagePlans: [{planName: '', planCompileDate: '', planType: ''}]},
//
productionEquipmentExp: {productionFacilities: [{equipName: '', equipType: '', commissioningDate: ''}], auxiliaryBuildings: [{auxiliaryName: '', floorArea: '', commissioningDate: ''}]},
//
coalIndustryExpansion: {},
//
nocoalIndustryExpansion: {},
//
dangerFeatureInfo: {majorDangerInfos: {}, majorDangerCraftInfos: {}, dangerInfos: {}},
//
fireworksAddInfo: {},
//
industryExpandInfos: {}
}
dialogConfig.value.data = Object.assign({}, defaultVals)
apiConfig.value.api.findOne(row[apiConfig.value.modelId]).then(res => {
if (res.success) {
const data = res.data || {}
//
const fieldsToDeserialize = Object.keys(defaultVals)
deserializeFields(data, fieldsToDeserialize)
//
Object.keys(defaultVals).forEach(key => {
if (!data[key]) {
data[key] = defaultVals[key]
}
})
data.regulatedIndustry = data.regulatedIndustry ? data.regulatedIndustry.split("/") : []
data.areaComb = data.areaComb ? data.areaComb.split("/") : []
data.opLocAreaComb = data.opLocAreaComb ? data.opLocAreaComb.split("/") : []
dialogConfig.value.data = Object.assign({}, data)
}
dialogConfig.value.loading = false
})
}
function deserializeFields(data, fields) {
fields.forEach(field => {
if (data[field]) {
try {
data[field] = JSON.parse(data[field])
} catch (e) {
console.error(`Failed to parse ${field}:`, e)
}
}
})
}
function handleClose() {
dialogConfig.value.show = false
}
//
function handleSelectData() {
let arr = selection.value
let data = Array.from(new Map(arr.map(item => [item.enterpriseId, item])).values())
if (data.length < 1) {
ElMessage.error('请选择待巡查企业')
return
}
dialogConfig1.value.data = Object.assign({}, {
'enterprise': data,
'createUserId': userInfo.yhwybs,
'createUserName': userInfo.xm,
'createTime': moment().format('YYYY-MM-DD HH:mm:ss'),
})
dialogConfig1.value.show = true
}
function handleClose1() {
dialogConfig1.value.show = false
}
const formRef = ref()
function handleDialogOk() {
let _event = actions.value
formRef.value.validate(valid => {
if (valid) {
dialogConfig1.value.data.validStartTime = dialogConfig1.value.data.validTime[0]
dialogConfig1.value.data.validEndTime = dialogConfig1.value.data.validTime[1]
dialogConfig1.value.data.enterpriseIds = dialogConfig1.value.data.enterprise.map(item => item.enterpriseId)
dialogConfig.value.loading = true
apiConfig.value.api.addIns(dialogConfig1.value.data).then(res => {
dialogConfig.value.loading = false
if (res.success) {
dialogConfig1.value.show = false
ElMessage.success('操作成功')
_event.query()
} else {
ElMessage.error('操作失败')
}
})
}
})
}
</script>
<style lang="scss" scoped>
:deep(.el-col-21) {
display: flex;
flex-direction: row-reverse;
}
.extra-button {
margin-left: unset !important;
margin-right: 12px;
}
.el-dialog {
margin-bottom: 0;
border: 0.0625rem solid rgba(255, 255, 255, 1);
border-radius: 1rem !important;
}
.el-dialog__body {
height: unset !important;
}
.padding-bottom-10 {
padding-bottom: 10px;
}
</style>

View File

@ -0,0 +1,337 @@
<template>
<browser class="browser-businesss-table"
:component-loading="componentLoading"
:api-config="apiConfig"
:table-config="tableConfig"
:permissions="permissions"
:dialog-config="dialogConfig"
:actions="actions"
@update:query-params="queryParams = $event"
@update:dialog-config="dialogConfig = $event"
@update:actions="actions = $event">
<template #queryPanel="{ queryParams: queryParams }">
<el-form ref="queryForm" :model="queryParams" label-width="100px">
<el-row class="query-condition">
<el-col :span="6">
<el-form-item label="行业类型" prop="industryType">
<el-select v-model="queryParams.industryType" placeholder="请选择" clearable>
<el-option v-for="item in DICTITEMS.HYLB_OPTIONS" :key="item.value" :label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单位名称" prop="unitName">
<el-input v-model="queryParams.unitName" clearable/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="统一信用代码" prop="unifiedSocialCode">
<el-input v-model="queryParams.unifiedSocialCode" clearable/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<el-table-column prop="enterprise.unitName" label="企业" min-width="250"/>
<el-table-column prop="enterprise.industryType" label="行业类型" min-width="200">
<template #default="{row}">
<el-span>{{ DICTDISPLAYS.HYLB_MAP[row.enterprise.industryType] }}</el-span>
</template>
</el-table-column>
<el-table-column prop="enterprise.unifiedSocialCode" label="统一信用代码" min-width="200"/>
<el-table-column prop="createUserName" label="巡查人" min-width="200"/>
<el-table-column prop="createTime" label="巡查时间" min-width="200"/>
<template #tableControlColumn="{ data: r }">
<el-link
v-if="r.data.row.isNormal === '1' && ( r.data.row.approvalStatus === '0' || r.data.row.approvalStatus === '2')"
type="primary" @click="handOnlinePatrol(r.data.row)" title="在线审批">在线审批
</el-link>
</template>
<template #dialog>
<el-dialog class="business-dialog" width="1200px" v-model="dialogConfig.show" :show-close="false"
:append-to-body="true" :top="'0px'">
<template #header>
<div class="cvi-dialog-header">
<div class="cvi-dialog-header-title">
<div class="dialog-line"></div>
{{ dialogConfig.title }}
</div>
<i class="iconfont icon-zyyy_tcgb" @click="dialogConfig.actions.handleClose"></i>
</div>
</template>
<el-form label-width="150px" class="browser-businesss-table-dialog-form" :model="dialogConfig.data"
:rules="dialogConfig.rules" ref="formRef">
<el-divider content-position="left">基本信息</el-divider>
<el-row>
<el-col :span="24">
<el-form-item label="企业名称" prop="unitName">
<el-input v-model="dialogConfig.data.enterprise.unitName" readonly/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="统一信用代码" prop="unifiedSocialCode">
<el-input v-model="dialogConfig.data.enterprise.unifiedSocialCode" readonly/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="行业类型" prop="industryTypeMsg">
<el-input v-model="dialogConfig.data.enterprise.industryTypeMsg" readonly/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="巡查人" prop="createUserName">
<el-input v-model="dialogConfig.data.createUserName" readonly/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="巡查时间" prop="createTime">
<el-input v-model="dialogConfig.data.createTime" readonly/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="label" prop="description">
<el-input type="textarea" v-model="dialogConfig.data.description" readonly/>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="dialogConfig.mode !== 'detail'">
<el-col :span="24">
<el-form-item label="附件" prop="annex">
<MultipleFile :parameters="fileParameters"
:files-data="dialogConfig.data.annexs"/>
</el-form-item>
</el-col>
<el-divider content-position="left">审批信息</el-divider>
<el-col :span="24">
<el-form-item label="审批人" prop="approvalUserName">
<el-input v-model="dialogConfig.data.approvalUserName"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="是否审批通过" prop="approvalStatus">
<el-select v-model="dialogConfig.data.approvalStatus" placeholder="请选择是否审批通过">
<el-option v-for="item in DICTITEMS.SPZT_OPTIONS" :key="item.value" :label="item.label" :value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审批回执" prop="approvalReceipt">
<el-input type="textarea" v-model="dialogConfig.data.approvalReceipt"/>
</el-form-item>
</el-col>
<el-col :span="24" v-if="dialogConfig.data.approvalStatus === '1'">
<el-form-item label="检查类型" prop="checkType">
<el-select v-model="dialogConfig.data.checkType" placeholder="请选择检查类型" clearable>
<el-option v-for="item in DICTITEMS.JCLX_OPTIONS" :key="item.value" :label="item.label" :value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" v-if="dialogConfig.data.approvalStatus === '1'">
<el-form-item label="检查事项" prop="checkItemIds">
<simple-check-item-selector v-model="dialogConfig.data.checkItemIds"
:lazyLoad="true"
multiple/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div class="cvi-dialog-footer">
<el-button @click="dialogConfig.actions.handleClose">取消</el-button>
<el-button type="primary" @click="dialogConfig.actions.handleDialogOk">确定</el-button>
<!-- <el-button type="success" @click="dialogConfig.actions.handleDocument">在线巡查文书</el-button>-->
</div>
</template>
</el-dialog>
<el-dialog class="business-dialog" width="984px" v-model="dialogConfig1.show" :show-close="false"
:append-to-body="true" :top="'0px'">
<template #header>
<div class="cvi-dialog-header">
<div class="cvi-dialog-header-title">
<div class="dialog-line"></div>
{{ dialogConfig1.title }}
</div>
<i class="iconfont icon-zyyy_tcgb" @click="dialogConfig1.actions.handleClose"></i>
</div>
</template>
<fxczfws></fxczfws>
</el-dialog>
</template>
</browser>
</template>
<script setup>
import {reactive, toRefs, computed, ref} from 'vue'
import {useUserStore} from '@/stores/modules/user'
import onlinePatrol from '@/api/lawenforcement/OnlinePatrol'
import {ElMessage} from 'element-plus'
import {DICTDISPLAYS, DICTITEMS} from '@/utils/Constants.js'
import SimpleCheckItemSelector from '@/components/SimpleCheckItemSelector.vue'
import fxczfws from '@pages/fxczfgl/fxczfws.vue'
import browser from '@/components/Browser.vue'
import DictSelector from '@/components/DictSelector.vue'
import MultipleFile from '@pages/common/MultipleFile.vue'
import moment from 'moment'
let userInfo
useUserStore().getUserInfo().then(data => userInfo = data)
const state = reactive({
componentLoading: false,
queryParams: {},
permissions: {
query: true,
add: false,
modify: false,
detail: true,
delete: false,
deleteAll: false,
importFile: false,
exportFile: false,
exportSelectFile: false,
downloadTemp: false,
canDetailCustom: (row) => row.isNormal === '0' || (row.isNormal === '1' && row.approvalStatus === '1'),
},
tableConfig: {
controlWidth: '150',
hasControlColumn: true,
multipleSelect: false
},
apiConfig: {
api: onlinePatrol,
modelId: 'onlinePatrolId',
},
dialogConfig: {
show: false,
mode: 'detail',
title: '在线审批',
loading: false,
data: {
enterprise: {}
},
actions: {
handleClose: handleClose,
handleDialogOk: handOnlinePatrolApproval,
handleDocument: handleDocument,
},
rules: {
approvalUserName: [{required: true, message: '审批人不能为空', trigger: 'blur'}],
approvalStatus: [{required: true, message: '审批状态不能为空', trigger: 'blur'}],
approvalReceipt: [{required: true, message: '审批回执不能为空', trigger: 'blur'}],
checkType: [{required: true, message: '审批回执不能为空', trigger: 'blur'}],
checkItemIds: [{required: true, message: '审批回执不能为空', trigger: 'blur'}],
},
},
dialogConfig1: {
show: false,
mode: 'detail',
title: '文书信息',
loading: false,
data: {},
actions: {
handleClose: handleClose1,
},
},
actions: {
detail: handleDetail
},
fileParameters: {
title: '相关材料',
mode: 'detail',
required: false,
tableTitle: '证据材料'
},
})
const {
componentLoading,
queryParams,
permissions,
tableConfig,
apiConfig,
dialogConfig,
dialogConfig1,
actions,
fileParameters
} = toRefs(state)
let label = ref('简述')
function handleDetail(row) {
label.value = '巡查结果'
dialogConfig.value.show = true
dialogConfig.value.mode = 'detail'
dialogConfig.value.title = '在线审批详情'
row.annexs.forEach(item => item.url = item.downloadUrl)
//
row.approvalUserId = userInfo.yhwybs
row.approvalUserName = userInfo.xm
//
row.enterprise.industryTypeMsg = DICTDISPLAYS.HYLB_MAP[row.enterprise.industryType]
dialogConfig.value.data = row
}
function handOnlinePatrol(row) {
label.value = '简述'
dialogConfig.value.show = true
dialogConfig.value.mode = 'approve'
dialogConfig.value.title = '在线审批'
row.annexs.forEach(item => item.url = item.downloadUrl)
//
row.approvalUserId = userInfo.yhwybs
row.approvalUserName = userInfo.xm
//
row.enterprise.industryTypeMsg = DICTDISPLAYS.HYLB_MAP[row.enterprise.industryType]
dialogConfig.value.data = row
}
const formRef = ref()
function handOnlinePatrolApproval() {
let _event = actions.value
formRef.value.validate(valid => {
if (valid) {
dialogConfig.value.loading = true
apiConfig.value.api.addOnlinePatrolApproval(dialogConfig.value.data).then(res => {
if (res.success) {
dialogConfig.value.loading = false
dialogConfig.value.show = false
ElMessage.success('操作成功')
_event.query()
} else {
dialogConfig.value.loading = false
throw new Error('操作失败')
}
})
}
})
}
function handleClose() {
dialogConfig.value.show = false
}
//
function handleDocument() {
dialogConfig1.value.show = true
}
function handleClose1() {
dialogConfig1.value.show = false
}
</script>
<style lang="scss" scoped>
.browser-businesss-table {
.browser-businesss-table-dialog-form {
padding: 10px 20px 10px 20px;
}
}
</style>

File diff suppressed because it is too large Load Diff