Update publicUnit.vue

小修改 按钮颜色
This commit is contained in:
TimSpan 2024-11-28 14:50:55 +08:00
parent d12ca65f2c
commit d29d649933
1 changed files with 3 additions and 29 deletions

View File

@ -1,7 +1,5 @@
<template> <template>
<div> <div>
<!-- expand-column-widt 展开按钮宽度-->
<!-- :expandRowByClick="true" 点击行展开 -->
<TableProMax <TableProMax
:expandedRowRender="expandedRowRender" :expandedRowRender="expandedRowRender"
:expand-column-width="50" :expand-column-width="50"
@ -17,9 +15,6 @@
<a-button type="primary" @click="saveOrUpdateEnterprisesUnit">新增企事业单位</a-button> <a-button type="primary" @click="saveOrUpdateEnterprisesUnit">新增企事业单位</a-button>
</a-space> </a-space>
</template> </template>
<!-- <template #expandedRowRender="{ record }">
<p>{{ record }}</p>
</template> -->
</TableProMax> </TableProMax>
<a-modal v-model:open="visible" :title="serviceTitle" @ok="submit" @cancel="closeModal"> <a-modal v-model:open="visible" :title="serviceTitle" @ok="submit" @cancel="closeModal">
<FormProMax ref="formRef" v-model:value="formParams" :form-item-options="formItemOptions" /> <FormProMax ref="formRef" v-model:value="formParams" :form-item-options="formItemOptions" />
@ -179,8 +174,6 @@ const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => {
initMarker(_mapRef.value?.mapInstance) initMarker(_mapRef.value?.mapInstance)
}} }}
onSearch={debounce((val: string) => { onSearch={debounce((val: string) => {
console.log('onSearch___________________', val)
//@ts-ignore //@ts-ignore
const auto = new AMap.AutoComplete({ const auto = new AMap.AutoComplete({
city: city, city: city,
@ -188,7 +181,6 @@ const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => {
citylimit: true, citylimit: true,
}) })
auto.search(val, (status, result) => { auto.search(val, (status, result) => {
console.log('🚀 ~ auto.search ~ status, result:', status, result)
if (status === 'complete') { if (status === 'complete') {
// //
autoAddress.value = result.tips?.map((e) => { autoAddress.value = result.tips?.map((e) => {
@ -480,8 +472,6 @@ const formItemOptions = ref<FormProMaxItemOptions<serviceProjectSaveOrUpdatePara
const _tableRef = ref<ComponentExposed<typeof TableProMax>>(null) const _tableRef = ref<ComponentExposed<typeof TableProMax>>(null)
const expandedRowRender: TableProMaxProps['expandedRowRender'] = ({ record }) => { const expandedRowRender: TableProMaxProps['expandedRowRender'] = ({ record }) => {
console.log('🚀 ~ record:', record)
const _columns: _TableProps['columns'] = [ const _columns: _TableProps['columns'] = [
{ {
dataIndex: 'name', dataIndex: 'name',
@ -567,18 +557,12 @@ const expandedRowRender: TableProMaxProps['expandedRowRender'] = ({ record }) =>
return ( return (
<a-space> <a-space>
<a-button <a-button
type='primary' class='btn-warn'
onClick={async () => { onClick={async () => {
console.log('🚀 ~ customRender ~ record:编辑回显参数', record)
visible.value = true visible.value = true
serviceTitle.value = '编辑服务项目' serviceTitle.value = '编辑服务项目'
idNumberDisabled.value = record.twoType.value !== 'outsource' idNumberDisabled.value = record.twoType.value !== 'outsource'
{
/* */
}
formParams.value.securityUnitId = record.securityUnitId //id formParams.value.securityUnitId = record.securityUnitId //id
formParams.value.enterprisesUnitId = record.enterprisesUnitId //id formParams.value.enterprisesUnitId = record.enterprisesUnitId //id
formParams.value.snowFlakeId = record.snowFlakeId //id formParams.value.snowFlakeId = record.snowFlakeId //id
formParams.value.projectManagerMiniProgramUserId = record.projectManagerMiniProgramUserId //id formParams.value.projectManagerMiniProgramUserId = record.projectManagerMiniProgramUserId //id
@ -594,10 +578,6 @@ const expandedRowRender: TableProMaxProps['expandedRowRender'] = ({ record }) =>
formParams.value.houseTotal = record.houseTotal // formParams.value.houseTotal = record.houseTotal //
formParams.value.staffTotal = record.staffTotal // formParams.value.staffTotal = record.staffTotal //
formParams.value.securityUserTotal = record.securityUserTotal // formParams.value.securityUserTotal = record.securityUserTotal //
{
/* formParams.value.administrativeDivisionCodes = record.enterprisesUnitAdministrativeDivisionCodes */
}
}} }}
> >
编辑 编辑
@ -619,8 +599,7 @@ const expandedRowRender: TableProMaxProps['expandedRowRender'] = ({ record }) =>
}, },
}, },
] ]
const _reqApi: _TableProps['requestApi'] = async (params) => { const _reqApi: _TableProps['requestApi'] = async () => {
console.log('🚀 ~ params:', params)
// @ts-ignore // @ts-ignore
return await api.get('/m2/eu/listSp', { enterprisesUnitId: record?.snowFlakeId }) return await api.get('/m2/eu/listSp', { enterprisesUnitId: record?.snowFlakeId })
} }
@ -635,7 +614,7 @@ const expandedRowRender: TableProMaxProps['expandedRowRender'] = ({ record }) =>
tableHeader: (_) => { tableHeader: (_) => {
return ( return (
<Space> <Space>
<Button class='btn-success' onClick={() => addService(record)}> <Button type={'primary'} onClick={() => addService(record)}>
新增服务项目 新增服务项目
</Button> </Button>
</Space> </Space>
@ -669,12 +648,8 @@ const closeModal = async () => {
} }
const submit = async () => { const submit = async () => {
console.log('formParams.value____________________', formParams.value)
await formRef.value.validate() await formRef.value.validate()
const serviceProjectSaveOrUpdateParams = { ...formParams.value } const serviceProjectSaveOrUpdateParams = { ...formParams.value }
const resp = await api.post('/m2/eu/add_upd_sp', serviceProjectSaveOrUpdateParams) const resp = await api.post('/m2/eu/add_upd_sp', serviceProjectSaveOrUpdateParams)
message.success(resp.message) message.success(resp.message)
await _tableRef.value.requestGetTableData() await _tableRef.value.requestGetTableData()
@ -686,7 +661,6 @@ onMounted(async () => {
securityUnitIdList.value = res.data securityUnitIdList.value = res.data
}) })
const addService = function (record) { const addService = function (record) {
console.log('🚀 ~ addService ~ record:', record)
formParams.value.enterprisesUnitId = record.snowFlakeId //Id formParams.value.enterprisesUnitId = record.snowFlakeId //Id
visible.value = true visible.value = true
} }