湖州项目前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

86 lines
2.3 KiB

<template>
<BasicModal v-bind="$attrs" @register="registerModal" width="1200px" :showOkBtn="false">
<!--引用表格-->
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<!--操作栏-->
<template #action="{ record }">
<!-- <TableAction :actions="getTableAction(record)" /> -->
<TableAction :actions="getTableAction(record)" />
</template>
</BasicTable>
</BasicModal>
<BasicModal @register="registeProjectrModal" title="变更联系人" width="1200px" :showOkBtn="false">
<modifycontacts :projectid="proid" @exit="close"/>
</BasicModal>
</template>
<script lang="ts" name="addressProjectinfoComponent" setup>
//ts语法
import { ref } from 'vue';
import { ActionItem, BasicTable, TableAction, useTable } from '@/components/Table';
import modifycontacts from './modifycontacts.vue'
import { BasicModal, useModal,useModalInner } from '@/components/Modal';
import { columns, searchFormSchema } from '../../projectLib/projectInfo/projectInfo.data';
import { getProjectInfoAndChildPageList, isShowByRoles } from '../../projectLib/projectInfo/projectInfo.api';
import { useUserStore } from '@/store/modules/user';
const userStore = useUserStore();
let proid = ref();
let ProjectStage = ref()
let IsModify = ref()
const [registeProjectrModal, { openModal: openModalProjectr,closeModal:closeModalProjectr }] = useModal();//项目详情
const [registerModal, { closeModal }] = useModalInner();
console.log("isShowByRoles", isShowByRoles('manage,sys:admin'))
const [registerTable, { reload, clearSelectedRowKeys }] = useTable({
title: '项目信息',
api: getProjectInfoAndChildPageList,
useSearchForm: true,
columns: columns,
rowKey:"id",
showIndexColumn:false,
actionColumn: {
width: 140,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
},
beforeFetch() {
clearSelectedRowKeys()
},
// rowSelection: { type: 'radio' },
//表单查询项设置
formConfig: {
schemas: searchFormSchema,
}
});
function getTableAction(record): ActionItem[] {
return [
{
label: '变更联系人',
onClick: handlemodify.bind(null, record),
}
];
}
function handlemodify(record) {
proid.value = record.id
9()
}
function close(){
closeModalProjectr()
reload()
}
</script>
<style scoped></style>