123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <template>
- <div>
- <a-card>
- <!-- 高级搜索组件 -->
- <audit-advanced-query
- :expand="expand"
- :search-data="formData"
- :ref-name="searchform"
- :search-style="{ height: '150px', left: '20px', top: '80px' }"
- :search-fun="handleSearch"
- @searchedClick="searchedClick"
- >
- <template>
- <a-col :span="12">
- <a-form-model-item :label="'目录名称'" prop="contentsTitle">
- <a-input v-model="formData.contentsTitle" allow-clear />
- </a-form-model-item>
- </a-col>
- </template>
- </audit-advanced-query>
- <sd-data-table-ex
- ref="deployDataTable"
- :filter-expressions="expressions"
- :columns="columns"
- :actions="actions"
- form-id="iamDirectoryDeploy"
- page-id="audit/deploy/iamDirectoryDeploy"
- :search-fields="['contentsTitle']"
- show-selection
- :show-advance-query="true"
- @searchbtnClick="searchbtnClick"
- >
- <div slot="islink" slot-scope="text, record">
- <a @click="rowClick(record)">{{ text }}</a>
- </div>
- </sd-data-table-ex>
- </a-card>
- </div>
- </template>
- <script>
- import TableActionTypes from '@/common/services/table-action-types'
- import crossWindowWatcher from '@/common/services/cross-window-watcher'
- import auditAdvancedQueryMixins from '../../components/audit-advanced-query-mixins'
- import auditAdvancedGroupMixins from '../../components/audit-advanced-group-mixins'
- import auditAdvancedQuery from '../../components/audit-advanced-query.vue'
- import components from './_import-components/audit-deploy-list-import'
- export default {
- name: 'AuditDeployList',
- metaInfo: {
- title: '目录配置',
- },
- components: {
- ...components,
- auditAdvancedQuery,
- },
- mixins: [auditAdvancedQueryMixins, auditAdvancedGroupMixins],
- data() {
- return {
- searchform: 'searchform',
- expressions: [],
- formId: 'iamDirectoryDeploy',
- formData: {
- contentsTitle: '',
- },
- columns: [
- {
- title: '序号',
- dataIndex: 'sortNumber',
- customRender: (text, record, index) => `${index + 1}`,
- width: '80px',
- },
- {
- title: '目录名称',
- dataIndex: 'contentsTitle',
- scopedSlots: { customRender: 'islink' },
- },
- {
- title: '显示顺序',
- dataIndex: 'contentsOrder',
- defaultSortOrder: 'asc', // 没有点击任何排序列时,默认的排序列
- width: '10%',
- },
- {
- title: '归辑内容',
- dataIndex: 'collectionContent',
- width: '35%',
- },
- {
- title: '简要描述',
- dataIndex: 'remarks',
- },
- ],
- actions: [
- {
- label: '新建',
- id: 'new',
- permission: 'create',
- type: TableActionTypes.primary,
- callback: () => {
- const url = '/audit-deploy-form' // 新页面要打开的路由地址
- crossWindowWatcher.waitForChanged(url).then((refreshFlag) => {
- if (refreshFlag) {
- // 这里写或者调刷新的方法
- this.refresh()
- }
- })
- },
- },
- {
- label: '删除',
- id: 'delete',
- type: TableActionTypes.oa.delete, // 删除按钮,不需要回调,会自动处理
- },
- ],
- }
- },
- methods: {
- // 查询
- handleSearch() {
- this.expressions = []
- // 项目名称
- if (this.formData.contentsTitle) {
- this.expressions.push({
- dataType: 'str',
- name: 'contentsTitle',
- op: 'like',
- stringValue: `%${this.formData.contentsTitle}%`,
- })
- }
- },
- refresh() {
- return this.$refs.deployDataTable.refresh(true)
- },
- rowClick(record) {
- const url = '/audit-deploy-form?record=' + record.id // 新页面要打开的路由地址
- crossWindowWatcher.waitForChanged(url).then((refreshFlag) => {
- if (refreshFlag) {
- this.refresh()
- }
- })
- },
- },
- }
- </script>
- <style module lang="scss">
- @use '@/common/design' as *;
- </style>
|