|
|
@@ -1,104 +1,106 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <BasicTable :rowSelection="{ type: 'checkbox' }" @register="registerTable" :clickToRowSelect="false" class="zjsqkList">
|
|
|
- <template #toolbar>
|
|
|
- <Authority>
|
|
|
- <a-button style="background-color: rgb(252, 139, 1); color: rgb(255, 255, 255);border: none;" type="primary"
|
|
|
- @click="handleCreate">提交申请</a-button>
|
|
|
- </Authority>
|
|
|
- <!-- <Authority>
|
|
|
- <Popconfirm title="您确定要批量删除数据" ok-text="确定" cancel-text="取消" @confirm="handleDeleteOrBatchDelete(null)">
|
|
|
- <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
|
|
|
- </Popconfirm>
|
|
|
- </Authority> -->
|
|
|
- </template>
|
|
|
- <!-- <template #status="{ record }">
|
|
|
- <Switch :checked="record.status === 1" :loading="record.pendingStatus" checkedChildren="启用" unCheckedChildren="禁用"
|
|
|
- @change="(checked: boolean) => statusChange(checked, record)" />
|
|
|
- </template> -->
|
|
|
- <template #action="{ record }">
|
|
|
- <TableAction :actions="[
|
|
|
- // {
|
|
|
- // label: '浏览',
|
|
|
- // icon: '' /**clarity:note-edit-line*/,
|
|
|
- // // ifShow: record.servicealiasname,
|
|
|
- // // ifShow: ((action) => action.servicealiasname),
|
|
|
- // ifShow: record.servicealiasname,
|
|
|
- // onClick: see.bind(null, record),
|
|
|
- // },
|
|
|
- // {
|
|
|
- // label: '查看',
|
|
|
- // icon: '' /**clarity:note-edit-line*/,
|
|
|
- // onClick: handleEdit.bind(null, record),
|
|
|
- // },
|
|
|
- // {
|
|
|
- // label: '编辑',
|
|
|
- // icon: '' /**clarity:note-edit-line*/,
|
|
|
- // color: 'warning',
|
|
|
- // onClick: handleEdit.bind(null, record),
|
|
|
- // },
|
|
|
- // {
|
|
|
- // label: '删除',
|
|
|
- // icon: '' /**ant-design:delete-outlined'*/,
|
|
|
- // color: 'error',
|
|
|
- // ifShow: record.roleType != RoleEnum.SYS_ADMIN,
|
|
|
- // popConfirm: {
|
|
|
- // title: '是否确认删除',
|
|
|
- // confirm: handleDelete.bind(null, record),
|
|
|
- // },
|
|
|
- // },
|
|
|
- {
|
|
|
- label: '提交申请',
|
|
|
- icon: '' /**clarity:note-edit-line*/,
|
|
|
- // ifShow: record.servicealiasname,
|
|
|
- // ifShow: ((action) => action.servicealiasname),
|
|
|
- disabled: record.shzt != '未提交' && record.shzt != '审核不通过',
|
|
|
- // onClick: submitApply.bind(null, record),
|
|
|
- onClick: applyHandleEdit.bind(null, record),
|
|
|
- },
|
|
|
- {
|
|
|
- label: '移出',
|
|
|
- tooltip: '移出',
|
|
|
- // icon: 'ant-design:form-outlined',
|
|
|
- onClick: handleDelete.bind(null, record),
|
|
|
- disabled: record.shzt != '未提交' && record.shzt != '审核不通过'
|
|
|
- },
|
|
|
- ]" />
|
|
|
- </template>
|
|
|
- <template #pdate="{ record }">
|
|
|
- <Tag :color="'red'">
|
|
|
- {{
|
|
|
- record.publishdate ? moment(record.publishdate).format('YYYY-MM-DD HH:mm:ss') : ''
|
|
|
- }}
|
|
|
- </Tag>
|
|
|
- </template>
|
|
|
- <template #systemkey="{ record }">
|
|
|
- <span :id="'zjsqk' + record.id">{{ getAppName(record.systemkey, `zjsqk${record.id}`) }}</span>
|
|
|
- </template>
|
|
|
- <template #shr="{ record }">
|
|
|
- <span :id="'shr' + record.id">{{ getUser(record, `shr${record.id}`) }}</span>
|
|
|
- </template>
|
|
|
- <template #tjsqsj="{ record }">
|
|
|
- {{ record?.tjsqsj?.replace('.0', '') }}
|
|
|
- </template>
|
|
|
- <template #shyj="{ record }">
|
|
|
- <span :id="'shyj' + record.id">{{ getYJ(record, `shyj${record.id}`) }}</span>
|
|
|
- </template>
|
|
|
- <template #index="{ index }">
|
|
|
- {{ index + 1 }}
|
|
|
- </template>
|
|
|
- <template #status="{ record }">
|
|
|
- <Tag :style="`color:${record.shzt == '未提交' ? 'red' : '#05B069'};`">
|
|
|
- {{
|
|
|
- record.shzt
|
|
|
- }}
|
|
|
- </Tag>
|
|
|
- </template>
|
|
|
- </BasicTable>
|
|
|
- <MapSourceModal @register="registerModal" @success="handleSuccess" />
|
|
|
- <!-- 申请弹出框 -->
|
|
|
- <ApplyModal @register="registerModal" @success="applyHandleSuccess" />
|
|
|
- </div>
|
|
|
+ <BasicModal width="1440px" v-bind="$attrs" title="申请库" :showOkBtn="false" :showCancelBtn="false">
|
|
|
+ <div>
|
|
|
+ <BasicTable :rowSelection="{ type: 'checkbox' }" @register="registerTable" :clickToRowSelect="false" class="zjsqkList">
|
|
|
+ <template #toolbar>
|
|
|
+ <Authority>
|
|
|
+ <a-button style="background-color: rgb(252, 139, 1); color: rgb(255, 255, 255);border: none;" type="primary"
|
|
|
+ @click="handleCreate">提交申请</a-button>
|
|
|
+ </Authority>
|
|
|
+ <!-- <Authority>
|
|
|
+ <Popconfirm title="您确定要批量删除数据" ok-text="确定" cancel-text="取消" @confirm="handleDeleteOrBatchDelete(null)">
|
|
|
+ <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
|
|
|
+ </Popconfirm>
|
|
|
+ </Authority> -->
|
|
|
+ </template>
|
|
|
+ <!-- <template #status="{ record }">
|
|
|
+ <Switch :checked="record.status === 1" :loading="record.pendingStatus" checkedChildren="启用" unCheckedChildren="禁用"
|
|
|
+ @change="(checked: boolean) => statusChange(checked, record)" />
|
|
|
+ </template> -->
|
|
|
+ <template #action="{ record }">
|
|
|
+ <TableAction :actions="[
|
|
|
+ // {
|
|
|
+ // label: '浏览',
|
|
|
+ // icon: '' /**clarity:note-edit-line*/,
|
|
|
+ // // ifShow: record.servicealiasname,
|
|
|
+ // // ifShow: ((action) => action.servicealiasname),
|
|
|
+ // ifShow: record.servicealiasname,
|
|
|
+ // onClick: see.bind(null, record),
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: '查看',
|
|
|
+ // icon: '' /**clarity:note-edit-line*/,
|
|
|
+ // onClick: handleEdit.bind(null, record),
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: '编辑',
|
|
|
+ // icon: '' /**clarity:note-edit-line*/,
|
|
|
+ // color: 'warning',
|
|
|
+ // onClick: handleEdit.bind(null, record),
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: '删除',
|
|
|
+ // icon: '' /**ant-design:delete-outlined'*/,
|
|
|
+ // color: 'error',
|
|
|
+ // ifShow: record.roleType != RoleEnum.SYS_ADMIN,
|
|
|
+ // popConfirm: {
|
|
|
+ // title: '是否确认删除',
|
|
|
+ // confirm: handleDelete.bind(null, record),
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: '提交申请',
|
|
|
+ icon: '' /**clarity:note-edit-line*/,
|
|
|
+ // ifShow: record.servicealiasname,
|
|
|
+ // ifShow: ((action) => action.servicealiasname),
|
|
|
+ disabled: record.shzt != '未提交' && record.shzt != '审核不通过',
|
|
|
+ // onClick: submitApply.bind(null, record),
|
|
|
+ onClick: applyHandleEdit.bind(null, record),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '移出',
|
|
|
+ tooltip: '移出',
|
|
|
+ // icon: 'ant-design:form-outlined',
|
|
|
+ onClick: handleDelete.bind(null, record),
|
|
|
+ disabled: record.shzt != '未提交' && record.shzt != '审核不通过'
|
|
|
+ },
|
|
|
+ ]" />
|
|
|
+ </template>
|
|
|
+ <template #pdate="{ record }">
|
|
|
+ <Tag :color="'red'">
|
|
|
+ {{
|
|
|
+ record.publishdate ? moment(record.publishdate).format('YYYY-MM-DD HH:mm:ss') : ''
|
|
|
+ }}
|
|
|
+ </Tag>
|
|
|
+ </template>
|
|
|
+ <template #systemkey="{ record }">
|
|
|
+ <span :id="'zjsqk' + record.id">{{ getAppName(record.systemkey, `zjsqk${record.id}`) }}</span>
|
|
|
+ </template>
|
|
|
+ <template #shr="{ record }">
|
|
|
+ <span :id="'shr' + record.id">{{ getUser(record, `shr${record.id}`) }}</span>
|
|
|
+ </template>
|
|
|
+ <template #tjsqsj="{ record }">
|
|
|
+ {{ record?.tjsqsj?.replace('.0', '') }}
|
|
|
+ </template>
|
|
|
+ <template #shyj="{ record }">
|
|
|
+ <span :id="'shyj' + record.id">{{ getYJ(record, `shyj${record.id}`) }}</span>
|
|
|
+ </template>
|
|
|
+ <template #index="{ index }">
|
|
|
+ {{ index + 1 }}
|
|
|
+ </template>
|
|
|
+ <template #status="{ record }">
|
|
|
+ <Tag :style="`color:${record.shzt == '未提交' ? 'red' : '#05B069'};`">
|
|
|
+ {{
|
|
|
+ record.shzt
|
|
|
+ }}
|
|
|
+ </Tag>
|
|
|
+ </template>
|
|
|
+ </BasicTable>
|
|
|
+ <MapSourceModal @register="registerModal" @success="handleSuccess" />
|
|
|
+ <!-- 申请弹出框 -->
|
|
|
+ <ApplyModal @register="registerModal" @success="applyHandleSuccess" />
|
|
|
+ </div>
|
|
|
+ </BasicModal>
|
|
|
</template>
|
|
|
<script lang="ts">
|
|
|
import { defineComponent, nextTick, onBeforeMount, createVNode, onMounted } from 'vue';
|
|
|
@@ -122,10 +124,11 @@ import { deleteResInCar } from '/@/api/resource/plat';
|
|
|
import eventBus from '/@/utils/eventBus';
|
|
|
import ApplyModal from './applyModal/ApplyModal.vue';
|
|
|
import { list } from '/@/api/authorize/authorize';
|
|
|
+import { BasicModal } from '/@/components/Modal';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'RoleManagement',
|
|
|
- components: { BasicTable, MapDrawer, ApplyModal, MapSourceModal, TableAction, Authority, Switch, Popconfirm },
|
|
|
+ components: { BasicTable, BasicModal, MapDrawer, ApplyModal, MapSourceModal, TableAction, Authority, Switch, Popconfirm },
|
|
|
setup() {
|
|
|
|
|
|
const [registerModal, { openModal }] = useModal();
|
|
|
@@ -150,6 +153,11 @@ export default defineComponent({
|
|
|
},
|
|
|
rowSelection: { type: 'checkbox' },
|
|
|
rowKey: (record) => record.id,
|
|
|
+ canResize: false,
|
|
|
+ pagination: {
|
|
|
+ pageSize: 10,
|
|
|
+ hideOnSinglePage: false
|
|
|
+ },
|
|
|
tableSetting: {
|
|
|
redo: true,
|
|
|
size: true,
|
|
|
@@ -159,8 +167,7 @@ export default defineComponent({
|
|
|
});
|
|
|
const moment = Moment
|
|
|
const { createMessage } = useMessage();
|
|
|
- const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions, resetSelectedRowKeys } =
|
|
|
- useBatchDelete(delRole, handleSuccess, setProps);
|
|
|
+ const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions, resetSelectedRowKeys } = useBatchDelete(delRole, handleSuccess, setProps);
|
|
|
selectionOptions.rowSelection.getCheckboxProps = (record: Recordable) => {
|
|
|
// Demo:status为1的选择框禁用
|
|
|
if (record.status === 1) {
|
|
|
@@ -169,9 +176,9 @@ export default defineComponent({
|
|
|
return { disabled: false };
|
|
|
}
|
|
|
};
|
|
|
- nextTick(() => {
|
|
|
- setProps(selectionOptions);
|
|
|
- });
|
|
|
+ // nextTick(() => {
|
|
|
+ // if(selectionOptions) setProps(selectionOptions);
|
|
|
+ // });
|
|
|
|
|
|
function handleEdit(record: Recordable) {
|
|
|
openModal(true, {
|