123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382 |
- <template>
- <div :class="$style.wrapHeight">
- <div>
- <a-card :class="$style.conditions">
- <a-form-model
- ref="advancedSearchForm"
- class="ant-advanced-search-form"
- :model="form"
- v-bind="formItemLayout"
- >
- <a-row :gutter="24" :class="$style.antformitem">
- <a-col :span="8">
- <a-form-model-item :label="'业务编码'" prop="businessCode">
- <a-input v-model="form.businessCode" placeholder="请输入业务编码" allow-clear />
- </a-form-model-item>
- </a-col>
- <!-- <a-col :span="8">
- <a-form-model-item :label="'风险名称'" prop="risk">
- <a-input v-model="form.risk" placeholder="请输入风险名称" allow-clear />
- </a-form-model-item>
- </a-col> -->
- <a-col :span="8">
- <a-form-model-item :label="'事件标签分类'" prop="eventTagName">
- <a-input v-model="form.eventTagName" placeholder="事件标签分类" allow-clear />
- </a-form-model-item>
- </a-col>
- <a-col :span="8">
- <!-- <a-form-model-item :label="'管理归属二级单位'" prop="belongedSecondUnit">
- <a-input
- v-model="form.belongedSecondUnit"
- placeholder="请输入管理归属二级单位"
- allow-clear
- />
- </a-form-model-item> -->
- <!-- todo 二级单位简称 -->
- <a-form-model-item :label="'二级单位简称'" prop="secondUnit">
- <a-input v-model="form.secondUnit" placeholder="请输入二级单位简称" allow-clear />
- </a-form-model-item>
- </a-col>
- <!-- 开始时间 ,结束时间 -->
- <a-col :span="8">
- <a-form-model-item label="业务时间">
- <a-range-picker v-model="time1" :format="'YYYY-MM-DD'" @change="changeTimeRange" />
- </a-form-model-item>
- </a-col>
- <!-- 单位 unit -->
- <a-col :span="8">
- <a-form-model-item :label="'单位'" prop="unit">
- <a-input v-model="form.unit" placeholder="请输入单位" allow-clear />
- </a-form-model-item>
- </a-col>
- <a-col :span="8">
- <a-form-model-item :label="'模型类型'" prop="modelType">
- <a-select v-model="form.modelType" placeholder="请选择模型类型" allow-clear>
- <!-- <a-select-option value="0">分析型</a-select-option> -->
- <a-select-option value="1">定位型-整改类</a-select-option>
- <a-select-option value="2">定位型-关注类</a-select-option>
- </a-select>
- </a-form-model-item>
- </a-col>
- <a-col :span="8">
- <a-form-model-item label="问题推送时间" prop="timeRange">
- <!-- <AuditRangeDatePicker
- :time-placeholder="['开始时间', '结束时间']"
- :time-mode="['date', 'date']"
- :time-format="'YYYY-MM-DD'"
- :time-range.sync="form.timeRange"
- /> -->
- <a-range-picker
- v-model="time2"
- :format="'YYYY-MM-DD'"
- @change="changeStartTimeChange"
- />
- </a-form-model-item>
- </a-col>
- <a-col :span="8">
- <div :class="$style.buttonContent">
- <a-button type="primary" @click="handleAction('serach')">查询</a-button>
- <a-button @click="handleReset">重置</a-button>
- <a-button :loading="exportLoading" type="primary" @click="fnexport">导出</a-button>
- </div>
- </a-col>
- </a-row>
- </a-form-model>
- </a-card>
- <div>
- <a-card>
- <sd-data-table
- ref="SJMXDataTable"
- :key="dataKey"
- :row-key="(record, index) => index"
- :columns="columns"
- :process-req="processReq"
- form-id="iamModelMaintain"
- :scroll="{ x: 1300 }"
- data-url="api/xcoa-mobile/v1/iamquestionreform/iamQuestionReformSummaryQueryList"
- >
- <div slot="action" slot-scope="text, record">
- <a-button type="link" @click="detailClick(record)">明细</a-button>
- </div>
- </sd-data-table>
- </a-card>
- <audit-advanced-export
- ref="export"
- :v-if="false"
- :exclebxh="false"
- table-id="iamModelMaintain"
- :expressions="exportExpressions"
- :config-id="121"
- />
- </div>
- </div>
- </div>
- </template>
- <script>
- import components from './_import-components/audit-view-sum-import'
- import auditAdvancedExport from '../../components/audit-advanced-export.vue'
- import { getUserInfo } from '@/common/store-mixin'
- import AuditRiskbraryService from './riskLibrary'
- import moment from 'moment'
- export default {
- name: 'AuditViewSum',
- metaInfo: {
- title: '审计问题总汇',
- },
- components: {
- ...components,
- auditAdvancedExport,
- },
- data() {
- return {
- exportLoading: false,
- exportExpressions: [],
- form: {
- businessCode: null,
- eventTagName: null,
- secondUnit: null,
- risk: null,
- modelType: null,
- // timeRange: [],
- belongedSecondUnit: null,
- unit: null,
- // buss_time
- bussTime: null,
- abbreviation: null,
- // bussTimeSt bussTimeEd 业务时间
- bussTimeSt: null,
- bussTimeEd: null,
- pushDateSt: null,
- pushDateEd: null,
- },
- time1: [],
- time2: [],
- reqData: {
- pushDateSt: '',
- pushDateEd: '',
- },
- formItemLayout: {
- labelCol: { span: 10 },
- wrapperCol: { span: 14 },
- },
- dataKey: 0,
- columns: [
- {
- title: '序号',
- dataIndex: 'sortNumber',
- width: '70px',
- customRender: (text, record, index) => `${index + 1}`,
- },
- {
- title: '业务编码',
- dataIndex: 'businessCode',
- },
- // todo 事件标签
- {
- title: '事件标签',
- dataIndex: 'jmEventType',
- },
- {
- title: '事件标签分类',
- dataIndex: 'eventTagName',
- },
- {
- title: '模型类型',
- dataIndex: 'modelTypeName',
- },
- {
- dataIndex: 'modelType',
- sdHidden: true,
- },
- {
- title: '问题推送日期',
- dataIndex: 'pushDate',
- },
- {
- title: '二级单位简称',
- dataIndex: 'secondUnit',
- },
- {
- dataIndex: 'secondUnitCode',
- sdHidden: true,
- },
- {
- dataIndex: 'unitCode',
- sdHidden: true,
- },
- {
- title: '单位',
- dataIndex: 'unit',
- },
- {
- title: '问题数量',
- dataIndex: 'questionNum',
- },
- {
- title: '非问题数量',
- dataIndex: 'nonQuestionNum',
- },
- {
- title: '已整改数量',
- dataIndex: 'reformNum',
- },
- {
- title: '未整改数量',
- dataIndex: 'nonReformNum',
- },
- {
- title: '操作',
- dataIndex: 'sharedSetting',
- fixed: 'right',
- width: '100px',
- scopedSlots: { customRender: 'action' },
- },
- ],
- }
- },
- methods: {
- // 开始时间 结束时间
- changeTimeRange(val) {
- // 开始天的 00:00:00 结束天的 23:59:59 时间戳
- const timeList = val.map((item) => {
- // 转化成时间戳 并忽略时分秒
- return moment(item._d)
- .startOf('day')
- .valueOf()
- })
- // 结束时间加一天的时间戳
- this.form.bussTimeSt = timeList[0]
- this.form.bussTimeEd = timeList[1] + 60 * 60 * 24 * 1000
- },
- changeStartTimeChange(val) {
- // "stringValue": "2023-12-16" 转换成这个格式
- this.form.pushDateSt = moment(val[0]._d).format('YYYY-MM-DD')
- this.form.pushDateEd = moment(val[1]._d).format('YYYY-MM-DD')
- },
- // 处理请求参数
- setExpressions() {
- const expressions = []
- const filter = ['bussTimeSt', 'bussTimeEd', 'pushDateSt', 'pushDateEd', 'modelType']
- for (const key in this.form) {
- if (this.form[key] && !filter.includes(key)) {
- expressions.push({
- dataType: 'str',
- name: key,
- op: 'like',
- stringValue: '%' + this.form[key] + '%',
- })
- }
- if (this.form[key] && filter.includes(key)) {
- expressions.push({
- dataType: 'str',
- name: key,
- op: 'eq',
- stringValue: this.form[key],
- })
- }
- }
- return expressions
- },
- processReq(req) {
- req.data.expressions = []
- req.data.expressions = this.setExpressions()
- return req
- },
- handleReset() {
- this.$refs.advancedSearchForm.resetFields()
- this.form.bussTimeEd = null
- this.form.bussTimeSt = null
- this.form.pushDateSt = null
- this.form.pushDateEd = null
- this.time1 = []
- this.time2 = []
- this.handleAction('serach')
- },
- // 查询
- handleAction(type) {
- // this.reqData.pushDateSt = this.form.timeRange.length ? this.form.timeRange[0] : ''
- // this.reqData.pushDateEd = this.form.timeRange.length ? this.form.timeRange[1] : ''
- // 调用方法
- switch (type) {
- case 'serach':
- this.handleSearch()
- break
- }
- },
- handleSearch() {
- this.dataKey++
- },
- detailClick(record) {
- const unitCode = record.unitCode
- let url = '#/audit-view-change?'
- const allQueryData = {
- businessCode: record.businessCode,
- jmEventType: record.jmEventType,
- eventTagName: record.eventTagName,
- modelTypeName: record.modelTypeName,
- pushDate: record.pushDate,
- unitCode: unitCode,
- modelId: record.modelId,
- }
- if (record.modelTypeName !== '整改类' && record.modelTypeName !== '定位型-整改类') {
- url = '#/audit-view-detail?'
- }
- for (const key in allQueryData) {
- if (allQueryData[key]) {
- url += `${key}=${allQueryData[key]}&`
- }
- }
- window.open(url)
- },
- fnexport() {
- this.exportExpressions = this.setExpressions()
- const account = getUserInfo().account
- AuditRiskbraryService.getUserInfo(account).then((res) => {
- this.exportExpressions.push({
- dataType: 'str',
- name: 'unitCode',
- op: 'eq',
- stringValue: res.data.parentCode,
- })
- setTimeout(() => {
- this.$refs.export.exportdataRisk()
- }, 200)
- })
- },
- },
- }
- </script>
- <style module lang="scss">
- @use '@/common/design' as *;
- .wrap-height {
- height: 100%;
- .row-height {
- display: flex;
- flex: auto;
- height: 100%;
- .rightcard {
- flex: 1;
- width: calc(100% - 20%);
- height: 100%;
- }
- }
- .button-content {
- button {
- margin: 0 4px;
- }
- }
- }
- .no-action {
- padding: 0 15px;
- color: $text-color-secondary;
- }
- </style>
|