|
|
@@ -10,29 +10,27 @@
|
|
|
</template>
|
|
|
<!-- <template #createTime="{ record }">
|
|
|
<Time v-if="record.createTime" :value="record.createTime" mode="datetime" />
|
|
|
- </template> -->
|
|
|
- <template #action="{ record }">
|
|
|
- <TableAction
|
|
|
- :actions="[
|
|
|
- {
|
|
|
- icon: 'mdi:information-outline',
|
|
|
- label: t('common.details'),
|
|
|
- onClick: () => {
|
|
|
- go(`/order/list/detail/${record.orderNo}`);
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
+ </template> {
|
|
|
icon: 'mdi:printer-outline',
|
|
|
label: t('common.print'),
|
|
|
color: 'error',
|
|
|
onClick: () => {
|
|
|
createMessage.info(t('common.notConnect'));
|
|
|
},
|
|
|
+ },-->
|
|
|
+ <template #action="{ record }">
|
|
|
+ <TableAction
|
|
|
+ :actions="[
|
|
|
+ {
|
|
|
+ icon: 'mdi:information-outline',
|
|
|
+ label: t('routes.staff.setpaswd'),
|
|
|
+ onClick: handleOpenModal.bind(null, record),
|
|
|
},
|
|
|
]"
|
|
|
/>
|
|
|
</template>
|
|
|
</BasicTable>
|
|
|
+ <SetpaswordModal @register="register" />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="ts">
|
|
|
@@ -40,8 +38,10 @@
|
|
|
import { BasicTable, useTable, BasicColumn, FormProps, TableAction } from '/@/components/Table';
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { uploadApi } from '/@/api/sys/upload';
|
|
|
+ import { useModal } from '/@/components/Modal';
|
|
|
// import { Switch } from 'ant-design-vue';
|
|
|
// import { h } from 'vue';
|
|
|
+ import SetpaswordModal from './setpaswordModal.vue';
|
|
|
import { ListApi } from '/@/api/staff/list';
|
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
// import { useCopyToClipboard } from '/@/hooks/web/useCopyToClipboard';
|
|
|
@@ -73,8 +73,9 @@
|
|
|
// userPassword: "2a22bac40f44af4d3b5fdc20ea706fc5"
|
|
|
|
|
|
export default defineComponent({
|
|
|
- components: { BasicTable, TableAction },
|
|
|
+ components: { BasicTable, TableAction, SetpaswordModal },
|
|
|
setup() {
|
|
|
+ const [register, { openModal }] = useModal();
|
|
|
const { createMessage } = useMessage();
|
|
|
const go = useGo();
|
|
|
const { t } = useI18n();
|
|
|
@@ -121,13 +122,13 @@
|
|
|
// slots: { customRender: 'createTime' },
|
|
|
width: 130,
|
|
|
},
|
|
|
- // {
|
|
|
- // title: '操作',
|
|
|
- // dataIndex: '',
|
|
|
- // slots: { customRender: 'action' },
|
|
|
- // fixed: 'right',
|
|
|
- // width: 140,
|
|
|
- // },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: '',
|
|
|
+ slots: { customRender: 'action' },
|
|
|
+ fixed: 'right',
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
];
|
|
|
|
|
|
const searchForm: Partial<FormProps> = {
|
|
|
@@ -180,7 +181,9 @@
|
|
|
return '';
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ function handleOpenModal(record: Recordable) {
|
|
|
+ openModal(true, record);
|
|
|
+ }
|
|
|
return {
|
|
|
registerTable,
|
|
|
createMessage,
|
|
|
@@ -189,6 +192,8 @@
|
|
|
renderRoleType,
|
|
|
renderStatus,
|
|
|
uploadApi: uploadApi as any,
|
|
|
+ handleOpenModal,
|
|
|
+ register,
|
|
|
};
|
|
|
},
|
|
|
});
|