123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496 |
- <template>
- <a-card>
- <!-- 高级搜索区域 -->
- <audit-advanced-query
- :expand="expand"
- :search-data="advSearchForm"
- :ref-name="searchform"
- :search-style="{ height: '170px', left: '20px', top: '60px' }"
- :search-fun="advSearch"
- @searchedClick="searchedClick"
- @resetForm="resetForm"
- >
- <template>
- <a-row>
- <a-col :span="12">
- <a-form-model-item label="项目名称" prop="projectName">
- <a-input v-model="advSearchForm.projectName" />
- </a-form-model-item>
- </a-col>
- <a-col :span="12">
- <a-form-model-item label="项目编号" prop="projectCode">
- <a-input v-model="advSearchForm.projectCode" />
- </a-form-model-item>
- </a-col>
- </a-row>
- <a-row>
- <a-col :span="12">
- <a-form-model-item label="整改责任主体" prop="auditedUnit">
- <sd-group-picker
- ref="unitSelect"
- v-model="advSearchForm.auditedUnit"
- :single="true"
- :read-only="false"
- @change="changeunit"
- />
- </a-form-model-item>
- </a-col>
- <a-col :span="12">
- <a-form-model-item :label="'状\u2003\u2003态'" prop="planStatus">
- <sd-select
- v-model="advSearchForm.planStatus"
- :allow-clear="true"
- :options="itemStatusOptions"
- />
- </a-form-model-item>
- </a-col>
- </a-row>
- </template>
- </audit-advanced-query>
- <div :class="[$style.btns]">
- <audit-advanced-export
- ref="exportExcel"
- :v-if="true"
- :class-style="[$style.buttonSpacing]"
- :config-id="191"
- :exclebxh="false"
- ></audit-advanced-export>
- </div>
- <div :class="$style.rectPlanProjectlist">
- <!-- data-url="api/xcoa-mobile/v1/iam-work-rect-feedback/all-list" -->
- <sd-data-table-ex
- ref="dataTable"
- :projectlist="true"
- :class="$style.rectfeedbacklist"
- :columns="columns"
- :actions="actions"
- show-selection
- form-id="iamWorkRectFeedback"
- data-url="api/xcoa-mobile/v1/rect-feed-back/list"
- :filter-expressions="tableExpressions"
- :show-advance-query="true"
- :search-fields="['projectName']"
- @searchbtnClick="searchbtnClick"
- >
- <div slot="isLink" slot-scope="text, record">
- <a :title="text" @click="linkProject(record)">{{ text }}</a>
- </div>
- <div slot="isnum" slot-scope="text, record">
- <span style="padding-left:43%">{{ text }}</span>
- </div>
- <div slot="opt" slot-scope="text, record" :class="$style.operatecol">
- <!-- 管理员 项目组长 项目副组长 则可以变更 -->
- <span v-for="(bt, index) in buttonsfortable" :key="index">
- <a-button
- v-if="record.changeButtons === 'true'"
- :key="index"
- type="link"
- size="small"
- @click="optbuttonClick(bt.id, record)"
- >{{ bt.label }}
- <!-- <sd-icon :type="bt.icontype" :theme="bt.theme"/> -->
- </a-button>
- </span>
- </div>
- </sd-data-table-ex>
- </div>
- <div v-show="false">
- <sd-user-picker
- ref="assignTeamLeader"
- v-model="mainSendUnit"
- :single="true"
- :read-only="false"
- @change="change"
- />
- </div>
- </a-card>
- </template>
- <script>
- import axios from '@/common/services/axios-instance'
- import TableActionTypes from '@/common/services/table-action-types'
- import crossWindowWatcher from '@/common/services/cross-window-watcher'
- import auditAdvancedQuery from '../../components/audit-advanced-query.vue'
- import auditAdvancedExport from '../../components/audit-advanced-export'
- import auditAdvancedQueryMixins from '../../components/audit-advanced-query-mixins'
- // import AuditRectplanprojectService from './audit-rectplanproject-service'
- import components from './_import-components/audit-rectfeedback-list-import'
- export default {
- name: 'AuditRectfeedbackList',
- metaInfo: {
- title: '整改反馈列表',
- },
- components: { ...components, auditAdvancedQuery, auditAdvancedExport },
- mixins: [auditAdvancedQueryMixins],
- data() {
- return {
- searchYear: '',
- yearArry: [],
- searchValue: '',
- mainSendUnit: [],
- checkboxValue: false,
- pageId: 'audit/rectFeedback/iamWorkRectFeedback',
- columns: [
- {
- title: '序号',
- customRender: (text, record, index) => `${index + 1}`,
- width: '80px',
- },
- {
- title: '项目名称',
- dataIndex: 'projectName',
- width: '450px',
- scopedSlots: { customRender: 'isLink' },
- },
- {
- title: '编号',
- dataIndex: 'rectPlanId',
- defaultSortOrder: 'descend',
- sdHidden: true,
- },
- {
- title: '项目编号',
- dataIndex: 'projectCode',
- sorter: true,
- width: '200px',
- sortDirections: ['ascend', 'descend'],
- },
- {
- title: '项目Id',
- dataIndex: 'projectId',
- sdHidden: true,
- },
- {
- title: '跟踪人账号',
- dataIndex: 'resppersonsAccount',
- sdHidden: true,
- width: '100px',
- },
- {
- title: '项目来源',
- dataIndex: 'projectSource',
- sdHidden: true,
- },
- {
- title: '跟踪人姓名',
- dataIndex: 'resppersonsName',
- sdHidden: true,
- },
- {
- title: '整改责任主体',
- dataIndex: 'auditedUnitName',
- sorter: true,
- width: '150px',
- sortDirections: ['ascend', 'descend'],
- },
- {
- title: '整改责任主体联系人',
- width: '180px',
- dataIndex: 'auditedContactsName',
- },
- {
- title: '需整改问题数量',
- dataIndex: 'rectProblemNum',
- scopedSlots: { customRender: 'isnum' },
- width: '150px',
- },
- {
- title: '整改中数量',
- dataIndex: 'rectDoProblemNum',
- scopedSlots: { customRender: 'isnum' },
- width: '150px',
- },
- {
- title: '整改完成数量',
- dataIndex: 'rectFinishNum',
- scopedSlots: { customRender: 'isnum' },
- width: '150px',
- },
- {
- title: '风险接受数量',
- dataIndex: 'riskAcceptNum',
- scopedSlots: { customRender: 'isnum' },
- width: '150px',
- },
- {
- title: '当前状态',
- sorter: true,
- dataIndex: 'rectFeedStatus',
- width: '150px',
- },
- {
- title: '当前处理人',
- dataIndex: 'currentUser',
- width: '150px',
- },
- {
- title: '操作',
- dataIndex: 'id',
- scopedSlots: { customRender: 'opt' },
- width: '100px',
- },
- {
- title: '流程ID',
- dataIndex: 'instId',
- sdHidden: true,
- },
- ],
- actions: [
- // {
- // label: '新建',
- // id: 'new',
- // type: TableActionTypes.primary, // 新建按钮,不需要回调,自动处理
- // permission: null, // 纯前端操作,不需要权限控制
- // callback: this.createrectfeedback,
- // },
- {
- label: '删除',
- id: 'delete',
- type: TableActionTypes.ex.delete, // 删除按钮,不需要回调,会自动处理(对sd-data-table无效)
- },
- {
- label: '导出',
- permission: null, // 纯前端操作,不需要权限控制
- callback: () => {
- this.$refs.exportExcel.exportdata()
- },
- },
- ],
- tableExpressions: [],
- buttonsfortable: [
- {
- label: '变更',
- id: 'changeleader',
- showCondition: '',
- },
- ],
- searchform: 'searchform',
- expand: false,
- advSearchForm: {
- projectName: '',
- projectCode: '',
- auditedUnit: '',
- planStatus: '',
- },
- itemStatusOptions: [],
- auditTypeOptions: [],
- auditModeOptions: [],
- projectId: '',
- setType: '',
- unitName: '',
- }
- },
- mounted() {
- // 初始化数据字典信息
- this.initDictionaryInfo()
- },
- methods: {
- changeunit(values) {
- this.unitName = ''
- values.forEach((element) => {
- this.unitName = element.name
- })
- },
- createrectfeedback() {
- const url = `/sd-flow-guide?code=PRODUCT_IAM_ZGFK` // 新页面要打开的路由地址
- crossWindowWatcher.waitForChanged(url).then((refreshFlag) => {
- if (refreshFlag) {
- this.$refs.dataTable.refresh()
- }
- })
- },
- initDictionaryInfo() {
- axios({
- url: 'api/xcoa-mobile/v1/iam-law/dictionary?key=RECT_FEED_STATUS',
- method: 'get',
- }).then((res) => {
- if (res.status === 200) {
- this.itemStatusOptions = res.data
- }
- })
- },
- onSearch(value) {
- this.tableExpressions = []
- if (value) {
- const expressions = []
- // 项目名称
- expressions.push({
- dataType: 'str',
- name: 'projectName',
- op: 'like',
- stringValue: `%${value}%`,
- })
- // 项目编号
- expressions.push({
- dataType: 'str',
- name: 'projectCode',
- op: 'like',
- stringValue: `%${value}%`,
- })
- this.tableExpressions.push({
- dataType: 'exps',
- op: 'or',
- expressionsValue: expressions,
- })
- }
- },
- advSearch() {
- this.tableExpressions = []
- // 项目名称
- if (this.advSearchForm.projectName) {
- this.tableExpressions.push({
- dataType: 'str',
- name: 'projectName',
- op: 'like',
- stringValue: `%${this.advSearchForm.projectName}%`,
- })
- }
- // 项目编号
- if (this.advSearchForm.projectCode) {
- this.tableExpressions.push({
- dataType: 'str',
- name: 'projectCode',
- op: 'like',
- stringValue: `%${this.advSearchForm.projectCode}%`,
- })
- }
- // 项目组长
- if (this.advSearchForm.auditedUnit) {
- this.tableExpressions.push({
- dataType: 'str',
- name: 'auditedUnitName',
- op: 'like',
- stringValue: `%${this.unitName}%`,
- })
- }
- if (this.advSearchForm.planStatus[0]) {
- this.tableExpressions.push({
- dataType: 'str',
- name: 'rectFeedStatus',
- op: 'eq',
- stringValue: `${this.advSearchForm.planStatus[0].id}`,
- })
- }
- },
- searchedClick() {
- this.expand = !this.expand
- },
- // 重置年份
- resetForm() {
- this.advSearchForm.auditedUnit = ''
- this.unitName = ''
- },
- linkProject(record) {
- // if (record.flowState === '起草') {
- // const url = '/sd-webflow/pages/draft/' + record.instId // 编辑面要打开的路由地址
- // crossWindowWatcher.waitForChanged(url).then((refreshFlag) => {
- // if (refreshFlag) {
- // // 这里写或者调刷新的方法
- // this.$refs.dataTable.refresh()
- // }
- // })
- // } else {
- window.open('#/sd-webflow/done-pages/' + record.instId)
- // }
- },
- // // 项目组长配置保存
- change(val) {
- let codes = ''
- let names = ''
- if (val.length > 0) {
- val.forEach((e) => {
- codes += e.code + ','
- names += e.name + ','
- })
- codes = codes.substr(0, codes.length - 1)
- names = names.substr(0, names.length - 1)
- }
- return new Promise((resolve) => {
- // AuditRectplanprojectService.changeTeamEditor(this.projectId, codes, names).then((res) => {
- // if (res.data) {
- // this.$refs.dataTable.clearSelection()
- // this.$refs.dataTable.refresh()
- // }
- // })
- })
- },
- AdvSearchClick() {
- this.expand = !this.expand
- },
- optbuttonClick(val, record) {
- // 变更编辑人
- if (val === 'changeleader') {
- const jsonArry = []
- if (record.resppersonsAccount !== '' && record.resppersonsAccount !== null) {
- if (record.resppersonsAccount.indexOf(',') > -1) {
- const codes = record.resppersonsAccount.split(',')
- const names = record.resppersonsName.split(',')
- for (let i = 0; i < codes.length; i++) {
- jsonArry.push({ type: 'User', code: codes[i], name: names[i], attrs: [] })
- }
- } else {
- jsonArry.push({
- type: 'User',
- code: record.resppersonsAccount,
- name: record.resppersonsName,
- attrs: [],
- })
- }
- }
- this.mainSendUnit = jsonArry
- this.projectId = record.id
- setTimeout(() => {
- this.$refs.assignTeamLeader.openPicker()
- }, 0)
- }
- },
- },
- }
- </script>
- <style module lang="scss">
- @use '@/common/design' as *;
- .btns {
- position: absolute;
- top: 24px;
- right: 20.5px;
- z-index: 100;
- display: none;
- }
- .operatecol {
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-end;
- :global(.ant-btn-sm) {
- padding: 0 3px;
- }
- }
- .advSearchBtn {
- width: 35px;
- padding: 0px;
- }
- :global(.ant-card .searchcard_audit-advanced-query_product) {
- right: 17px !important;
- }
- .buttonSpacing {
- margin-left: 5px;
- }
- .search-icon {
- font-size: 12px;
- margin-left: 1px !important;
- }
- // .rectfeedbacklist {
- // :global(.ant-table-column-title) {
- // white-space: normal;
- // }
- // }
- </style>
|