Commit e07d53eb authored by 牛虎林's avatar 牛虎林

Merge remote-tracking branch 'origin/develop' into develop

parents a3e43171 83790ba6
...@@ -5,6 +5,7 @@ enum Api { ...@@ -5,6 +5,7 @@ enum Api {
GetList = '/pro/educationTraining/page', GetList = '/pro/educationTraining/page',
UpdateProject = '/pro/educationTraining/update', UpdateProject = '/pro/educationTraining/update',
DeleteProject = '/pro/educationTraining/del', DeleteProject = '/pro/educationTraining/del',
GetUserList = '/pro/sys/sysUser'
} }
export const getListByPage = (params?: ProjectParams) => export const getListByPage = (params?: ProjectParams) =>
...@@ -18,3 +19,6 @@ export const updateItem = (params?: any) => ...@@ -18,3 +19,6 @@ export const updateItem = (params?: any) =>
export const deleteItem = (params?: any) => export const deleteItem = (params?: any) =>
defHttp.delete<ProjectModel>({ url: Api.DeleteProject, params }); defHttp.delete<ProjectModel>({ url: Api.DeleteProject, params });
export const getUserList = (params?: ProjectParams) =>
defHttp.post<ProjectModel>({ url: Api.GetUserList, data: params });
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
}, },
{ {
label: '第三季度', label: '第三季度',
value: '第季度', value: '第季度',
}, },
{ {
label: '第四季度', label: '第四季度',
......
...@@ -75,7 +75,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -75,7 +75,7 @@ export const searchFormSchema: FormSchema[] = [
}, },
{ {
label: '第三季度', label: '第三季度',
value: '第季度', value: '第季度',
}, },
{ {
label: '第四季度', label: '第四季度',
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
headerSticky headerSticky
> >
<template #extra> <template #extra>
<a-button type="primary" danger> 删除 </a-button> <!-- <a-button type="primary" danger> 删除 </a-button>-->
<a-button type="primary" v-if="!disabled" @click="handleSubmit"> 提交 </a-button> <a-button type="primary" v-if="!disabled" @click="handleSubmit"> 提交 </a-button>
<a-button type="default" @click="router.back()"> 返回 </a-button> <a-button type="default" @click="router.back()"> 返回 </a-button>
</template> </template>
......
...@@ -75,7 +75,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -75,7 +75,7 @@ export const searchFormSchema: FormSchema[] = [
}, },
{ {
label: '第三季度', label: '第三季度',
value: '第季度', value: '第季度',
}, },
{ {
label: '第四季度', label: '第四季度',
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
headerSticky headerSticky
> >
<template #extra> <template #extra>
<a-button type="primary" danger> 删除 </a-button> <!-- <a-button type="primary" danger> 删除 </a-button>-->
<a-button type="primary" v-if="!disabled" @click="handleSubmit"> 提交 </a-button> <a-button type="primary" v-if="!disabled" @click="handleSubmit"> 提交 </a-button>
<a-button type="default" @click="router.back()"> 返回 </a-button> <a-button type="default" @click="router.back()"> 返回 </a-button>
</template> </template>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
{{ index + 1 }} {{ index + 1 }}
</template> </template>
<template v-if="column.key === 'tenderYear'"> <template v-if="column.key === 'tenderYear'">
{{ record.tenderYear + '年' + record.biddingQuarter + '季度' }} {{ record.tenderYear + '年' + record.biddingQuarter }}
</template> </template>
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<TableAction <TableAction
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
}, },
}, },
{ {
label: '修改', label: '编辑',
onClick: handleEdit.bind(null, record, 0), onClick: handleEdit.bind(null, record, 0),
ifShow: (_action) => { ifShow: (_action) => {
return record.reviewStatus == null; return record.reviewStatus == null;
......
...@@ -82,7 +82,9 @@ function handleDelete(record: Recordable) { ...@@ -82,7 +82,9 @@ function handleDelete(record: Recordable) {
deleteItem({ id: record.id }); deleteItem({ id: record.id });
reload(); reload();
} }
function handleSuccess() {
reload();
}
function handleCreate() { function handleCreate() {
openDrawer(true, { openDrawer(true, {
isUpdate: false, isUpdate: false,
......
...@@ -37,8 +37,18 @@ ...@@ -37,8 +37,18 @@
if (isUpdate.value) { if (isUpdate.value) {
detailId.value = data.record.id; detailId.value = data.record.id;
getTitle.value = '编辑隐患管理'; getTitle.value = '编辑隐患管理';
const formEl = unref(formElRef);
if (!formEl) return;
await formEl.setProps({
disabled: false,
});
} else { } else {
getTitle.value = '创建隐患管理'; getTitle.value = '创建隐患管理';
const formEl = unref(formElRef);
if (!formEl) return;
await formEl.setProps({
disabled: false,
});
} }
if (data.disabled == true) { if (data.disabled == true) {
getTitle.value = '查看隐患管理'; getTitle.value = '查看隐患管理';
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<img :class="`${prefixCls}__top-img`" src="../../assets/images/group.png" /> <img :class="`${prefixCls}__top-img`" src="../../assets/images/group.png" />
<span <span
><p>{{ countData.counttotal }}</p ><p>{{ countData.counttotal }}</p
></span ></span
> >
</div> </div>
</Col> </Col>
...@@ -15,35 +15,35 @@ ...@@ -15,35 +15,35 @@
<div class="title">自建</div> <div class="title">自建</div>
<span <span
><p>{{ countData.countbuildbyoneself }}</p ><p>{{ countData.countbuildbyoneself }}</p
></span ></span
> >
</Col> </Col>
<Col :span="4" :class="`${prefixCls}__top-col`"> <Col :span="4" :class="`${prefixCls}__top-col`">
<div class="title">委托建设</div> <div class="title">委托建设</div>
<span <span
><p>{{ countData.countbuildbyentrust }}</p ><p>{{ countData.countbuildbyentrust }}</p
></span ></span
> >
</Col> </Col>
<Col :span="4" :class="`${prefixCls}__top-col`"> <Col :span="4" :class="`${prefixCls}__top-col`">
<div class="title">代建</div> <div class="title">代建</div>
<span <span
><p>{{ countData.countbuildbyreplace }}</p ><p>{{ countData.countbuildbyreplace }}</p
></span ></span
> >
</Col> </Col>
<Col :span="4" :class="`${prefixCls}__top-col`"> <Col :span="4" :class="`${prefixCls}__top-col`">
<div class="title">承建</div> <div class="title">承建</div>
<span <span
><p>{{ countData.countbuildbyhold }}</p ><p>{{ countData.countbuildbyhold }}</p
></span ></span
> >
</Col> </Col>
<Col :span="4" :class="`${prefixCls}__top-col`"> <Col :span="4" :class="`${prefixCls}__top-col`">
<div class="title">储备</div> <div class="title">储备</div>
<span <span
><p>{{ countData.countreserve }}</p ><p>{{ countData.countreserve }}</p
></span ></span
> >
</Col> </Col>
</Row> </Row>
......
...@@ -244,8 +244,8 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -244,8 +244,8 @@ export const searchFormSchema: FormSchema[] = [
value: '委托建设', value: '委托建设',
}, },
{ {
label: '代', label: '代',
value: '代', value: '代',
}, },
{ {
label: '承建', label: '承建',
......
...@@ -13,32 +13,42 @@ ...@@ -13,32 +13,42 @@
</BasicDrawer> </BasicDrawer>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, unref } from 'vue'; import { ref, unref } from 'vue';
import { BasicForm, useForm, FormActionType } from '@/components/Form'; import { BasicForm, useForm, FormActionType } from '@/components/Form';
import { formSchema } from './data'; import { formSchema } from './data';
import { BasicDrawer, useDrawerInner } from '@/components/Drawer'; import { BasicDrawer, useDrawerInner } from '@/components/Drawer';
import { addItem, updateItem } from '@/api/project/safetyEducation'; import { addItem, updateItem } from '@/api/project/safetyEducation';
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);
const isUpdate = ref(true); const isUpdate = ref(true);
const detailId = ref(0); const detailId = ref(0);
const formElRef = ref<Nullable<FormActionType>>(null); const formElRef = ref<Nullable<FormActionType>>(null);
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({ const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 90, labelWidth: 90,
baseColProps: { span: 24 }, baseColProps: { span: 24 },
schemas: formSchema, schemas: formSchema,
showActionButtonGroup: false, showActionButtonGroup: false,
}); });
const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => { const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
resetFields(); resetFields();
setDrawerProps({ confirmLoading: false }); setDrawerProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate; isUpdate.value = !!data?.isUpdate;
if (isUpdate.value) { if (isUpdate.value) {
detailId.value = data.record.id; detailId.value = data.record.id;
getTitle.value = '编辑安全教育'; getTitle.value = '编辑安全教育';
const formEl = unref(formElRef);
if (!formEl) return;
await formEl.setProps({
disabled: false,
});
} else { } else {
getTitle.value = '创建安全教育'; getTitle.value = '创建安全教育';
const formEl = unref(formElRef);
if (!formEl) return;
await formEl.setProps({
disabled: false,
});
} }
if (data.disabled == true) { if (data.disabled == true) {
getTitle.value = '查看安全教育'; getTitle.value = '查看安全教育';
...@@ -54,10 +64,10 @@ const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async ( ...@@ -54,10 +64,10 @@ const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (
...data.record, ...data.record,
}); });
} }
}); });
const getTitle = ref(''); const getTitle = ref('');
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate(); const values = await validate();
setDrawerProps({ confirmLoading: true }); setDrawerProps({ confirmLoading: true });
...@@ -74,5 +84,5 @@ async function handleSubmit() { ...@@ -74,5 +84,5 @@ async function handleSubmit() {
} finally { } finally {
setDrawerProps({ confirmLoading: false }); setDrawerProps({ confirmLoading: false });
} }
} }
</script> </script>
...@@ -88,6 +88,10 @@ function handleCreate() { ...@@ -88,6 +88,10 @@ function handleCreate() {
isUpdate: false, isUpdate: false,
}); });
} }
function handleSuccess() {
reload();
}
</script> </script>
<style scoped lang="less"></style> <style scoped lang="less"></style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment