Browse Source

feat: 资产

ops-management-platform-frontend-dev
wbc 2 months ago
parent
commit
4517caea33
  1. 1
      .eslintrc.cjs
  2. 3
      package.json
  3. 2
      src/views/IO/delayPatrol/allDelayPatrol/detailDrawer.vue
  4. 10
      src/views/IO/delayPatrol/allDelayPatrol/index.vue
  5. 2
      src/views/IO/delayPatrol/waitAudit/detailDrawer.vue
  6. 10
      src/views/IO/delayPatrol/waitAudit/index.vue
  7. 2
      src/views/IO/delayPatrol/waitPatrol/detailDrawer.vue
  8. 10
      src/views/IO/delayPatrol/waitPatrol/index.vue
  9. 2
      src/views/IO/patrol/allPatrol/detailDrawer.vue
  10. 8
      src/views/IO/patrol/allPatrol/index.vue
  11. 2
      src/views/IO/patrol/patroling/detailDrawer.vue
  12. 8
      src/views/IO/patrol/patroling/index.vue
  13. 7
      src/views/IO/patrolReport/reportModal.vue
  14. 20
      src/views/IO/workOrder/delayAudit/faultModal.vue
  15. 13
      src/views/IO/workOrder/orderAudit/faultModal.vue
  16. 13
      src/views/IO/workOrder/orderSearch/faultModal.vue
  17. 79
      src/views/IO/workOrder/orderSend/faultModal.vue
  18. 204
      src/views/calculation/calculationAudit/addModal.vue
  19. 32
      src/views/calculation/calculationAudit/api.ts
  20. 107
      src/views/calculation/calculationAudit/data.ts
  21. 56
      src/views/calculation/calculationAudit/index.vue
  22. 204
      src/views/calculation/calculationList/addModal.vue
  23. 32
      src/views/calculation/calculationList/api.ts
  24. 107
      src/views/calculation/calculationList/data.ts
  25. 56
      src/views/calculation/calculationList/index.vue
  26. 108
      src/views/document/addModal.vue
  27. 32
      src/views/document/api.ts
  28. 32
      src/views/document/data.ts
  29. 110
      src/views/document/detailDrawer.vue
  30. 72
      src/views/document/index.vue
  31. 151
      src/views/notice/addModal.vue
  32. 32
      src/views/notice/api.ts
  33. 32
      src/views/notice/data.ts
  34. 117
      src/views/notice/detailDrawer.vue
  35. 72
      src/views/notice/index.vue
  36. 116
      src/views/project/IOCheck/checkManage/addModal.vue
  37. 58
      src/views/project/IOCheck/checkManage/api.ts
  38. 53
      src/views/project/IOCheck/checkManage/data.ts
  39. 70
      src/views/project/IOCheck/checkManage/index.vue
  40. 98
      src/views/project/IOCheck/checkRating/addModal.vue
  41. 58
      src/views/project/IOCheck/checkRating/api.ts
  42. 37
      src/views/project/IOCheck/checkRating/data.ts
  43. 79
      src/views/project/IOCheck/checkRating/index.vue
  44. 193
      src/views/project/IOCheck/checkRating/ratingModal.vue
  45. 58
      src/views/project/IOCheck/ratingSearch/api.ts
  46. 54
      src/views/project/IOCheck/ratingSearch/data.ts
  47. 88
      src/views/project/IOCheck/ratingSearch/detailDrawer.vue
  48. 62
      src/views/project/IOCheck/ratingSearch/index.vue
  49. 204
      src/views/project/contractManage/addModal.vue
  50. 58
      src/views/project/contractManage/api.ts
  51. 36
      src/views/project/contractManage/data.ts
  52. 164
      src/views/project/contractManage/detailDrawer.vue
  53. 72
      src/views/project/contractManage/index.vue
  54. 180
      src/views/project/projectManage/addModal.vue
  55. 58
      src/views/project/projectManage/api.ts
  56. 32
      src/views/project/projectManage/data.ts
  57. 163
      src/views/project/projectManage/detailDrawer.vue
  58. 74
      src/views/project/projectManage/index.vue
  59. 220
      src/views/project/serviceManage/addModal.vue
  60. 132
      src/views/project/serviceManage/addTypeModal.vue
  61. 58
      src/views/project/serviceManage/api.ts
  62. 52
      src/views/project/serviceManage/data.ts
  63. 191
      src/views/project/serviceManage/index.vue
  64. 1
      src/views/property/meterial/addModal.vue
  65. 5
      src/views/property/meterial/index.vue
  66. 1
      src/views/property/point/addModal.vue
  67. 2
      src/views/property/point/detailDrawer.vue
  68. 12
      src/views/property/point/index.vue
  69. 13
      src/views/property/point/pointModal.vue
  70. 242
      src/views/property/propertyList/addModal.vue
  71. 5
      src/views/property/propertyList/index.vue

1
.eslintrc.cjs

@ -3,5 +3,6 @@ module.exports = {
extends: ['@vben'],
rules: {
'no-undef': 'off',
"vue/no-v-html":"off"
},
};

3
package.json

@ -68,6 +68,7 @@
}
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@ant-design/icons-vue": "7.0.1",
"@iconify/iconify": "3.1.1",
"@logicflow/core": "1.2.26",
@ -76,6 +77,8 @@
"@vben/hooks": "workspace:*",
"@vue/shared": "3.4.37",
"@vueuse/core": "^10.11.1",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12",
"@zxcvbn-ts/core": "3.0.4",
"ant-design-vue": "4.2.6",
"axios": "1.7.4",

2
src/views/IO/delayPatrol/allDelayPatrol/detailDrawer.vue

@ -2,7 +2,7 @@
<div>
<!-- 抽屉组件 -->
<a-drawer
title="巡检详情"
title="详情"
placement="right"
:closable="true"
:open="visible"

10
src/views/IO/delayPatrol/allDelayPatrol/index.vue

@ -2,10 +2,12 @@
<PageWrapper dense>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="goDetail">上报</a-button>
<a-button type="primary" @click="handleDetail">上报</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'"> </template>
<template v-if="column && record && column.key === 'action'">
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
</template>
</BasicTable>
<detailDrawer ref="detailDrawerRef" />
@ -20,7 +22,7 @@
import detailDrawer from './detailDrawer.vue';
import { ref } from 'vue';
defineOptions({ name: 'Patroling' });
defineOptions({ name: 'AllDelayPatrol' });
const [registerTable] = useTable({
rowSelection: {
@ -52,7 +54,7 @@
//
const detailDrawerRef = ref();
const goDetail = () => {
const handleDetail = () => {
detailDrawerRef.value.showDrawer();
};
</script>

2
src/views/IO/delayPatrol/waitAudit/detailDrawer.vue

@ -2,7 +2,7 @@
<div>
<!-- 抽屉组件 -->
<a-drawer
title="巡检详情"
title="详情"
placement="right"
:closable="true"
:open="visible"

10
src/views/IO/delayPatrol/waitAudit/index.vue

@ -26,10 +26,12 @@
<a-col :span="20">
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="goDetail">上报</a-button>
<a-button type="primary" @click="handleDetail">上报</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'"> </template>
<template v-if="column && record && column.key === 'action'">
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
</template>
</BasicTable>
<detailDrawer ref="detailDrawerRef" />
@ -46,7 +48,7 @@
import detailDrawer from './detailDrawer.vue';
import { ref } from 'vue';
defineOptions({ name: 'Patroling' });
defineOptions({ name: 'WaitAudit' });
const [registerTable, { reload }] = useTable({
rowSelection: {
@ -152,7 +154,7 @@
};
//
const detailDrawerRef = ref();
const goDetail = () => {
const handleDetail = () => {
detailDrawerRef.value.showDrawer();
};
</script>

2
src/views/IO/delayPatrol/waitPatrol/detailDrawer.vue

@ -2,7 +2,7 @@
<div>
<!-- 抽屉组件 -->
<a-drawer
title="巡检详情"
title="详情"
placement="right"
:closable="true"
:open="visible"

10
src/views/IO/delayPatrol/waitPatrol/index.vue

@ -2,10 +2,12 @@
<PageWrapper dense>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="goDetail">上报</a-button>
<a-button type="primary" @click="handleDetail">上报</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'"> </template>
<template v-if="column && record && column.key === 'action'">
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
</template>
</BasicTable>
<detailDrawer ref="detailDrawerRef" />
@ -20,7 +22,7 @@
import detailDrawer from './detailDrawer.vue';
import { ref } from 'vue';
defineOptions({ name: 'Patroling' });
defineOptions({ name: 'WaitPatrol' });
const [registerTable] = useTable({
rowSelection: {
@ -52,7 +54,7 @@
//
const detailDrawerRef = ref();
const goDetail = () => {
const handleDetail = () => {
detailDrawerRef.value.showDrawer();
};
</script>

2
src/views/IO/patrol/allPatrol/detailDrawer.vue

@ -2,7 +2,7 @@
<div>
<!-- 抽屉组件 -->
<a-drawer
title="巡检详情"
title="详情"
placement="right"
:closable="true"
:open="visible"

8
src/views/IO/patrol/allPatrol/index.vue

@ -3,10 +3,12 @@
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleAdd">生成计划</a-button>
<a-button type="primary" @click="goDetail">重置计划</a-button>
<a-button type="primary" @click="handleDetail">重置计划</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'"> </template>
<template v-if="column && record && column.key === 'action'">
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
</template>
</BasicTable>
<detailDrawer ref="detailDrawerRef" />
@ -62,7 +64,7 @@
const go = useGo();
//
const detailDrawerRef = ref();
const goDetail = () => {
const handleDetail = () => {
detailDrawerRef.value.showDrawer();
};
</script>

2
src/views/IO/patrol/patroling/detailDrawer.vue

@ -2,7 +2,7 @@
<div>
<!-- 抽屉组件 -->
<a-drawer
title="巡检详情"
title="详情"
placement="right"
:closable="true"
:open="visible"

8
src/views/IO/patrol/patroling/index.vue

@ -3,10 +3,12 @@
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleAdd">生成计划</a-button>
<a-button type="primary" @click="goDetail">重置计划</a-button>
<a-button type="primary" @click="handleDetail">重置计划</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'"> </template>
<template v-if="column && record && column.key === 'action'">
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
</template>
</BasicTable>
<detailDrawer ref="detailDrawerRef" />
@ -59,7 +61,7 @@
}
//
const detailDrawerRef = ref();
const goDetail = () => {
const handleDetail = () => {
detailDrawerRef.value.showDrawer();
};
//

7
src/views/IO/patrolReport/reportModal.vue

@ -57,10 +57,10 @@
<a-col :span="24">
<a-form-item label="附件" name="attachment">
<a-upload
v-model:file-list="attachmentList"
v-model:file-list="form.attachment"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
>
<a-button> Upload </a-button>
<a-button type="primary"> 上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
@ -72,7 +72,7 @@
v-model:file-list="inspectionPhotoList"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
>
<a-button> Upload </a-button>
<a-button type="primary"> 上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
@ -95,7 +95,6 @@
export default {
setup() {
//
const title = ref('新增前端巡检日报');
const attachmentList = ref([]);
const inspectionPhotoList = ref([]);

20
src/views/IO/workOrder/delayAudit/faultModal.vue

@ -86,6 +86,25 @@
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="故障描述" name="faultDescription">
<a-textarea v-model:value="form.faultDescription" :rows="4" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="故障图片" name="faultImg">
<a-upload
v-model:file-list="form.faultImg"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
>
<a-button type="primary"> 上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="是否派遣" name="isDispatched">
@ -133,6 +152,7 @@
institution: '',
faultLocation: '',
faultDescription: '',
faultImg: [],
isDispatched: null,
maintenanceRequirement: '',
dispatchOpinion: '',

13
src/views/IO/workOrder/orderAudit/faultModal.vue

@ -86,6 +86,18 @@
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="故障图片" name="faultImg">
<a-upload
v-model:file-list="form.faultImg"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
>
<a-button type="primary"> 上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="是否派遣" name="isDispatched">
@ -133,6 +145,7 @@
institution: '',
faultLocation: '',
faultDescription: '',
faultImg: [],
isDispatched: null,
maintenanceRequirement: '',
dispatchOpinion: '',

13
src/views/IO/workOrder/orderSearch/faultModal.vue

@ -86,6 +86,18 @@
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="故障图片" name="faultImg">
<a-upload
v-model:file-list="form.faultImg"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
>
<a-button type="primary"> 上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="是否派遣" name="isDispatched">
@ -133,6 +145,7 @@
institution: '',
faultLocation: '',
faultDescription: '',
faultImg: [],
isDispatched: null,
maintenanceRequirement: '',
dispatchOpinion: '',

79
src/views/IO/workOrder/orderSend/faultModal.vue

@ -86,6 +86,18 @@
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="故障图片" name="faultImg">
<a-upload
v-model:file-list="form.faultImg"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
>
<a-button type="primary"> 上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="是否派遣" name="isDispatched">
@ -112,12 +124,18 @@
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div id="amapContainer" style="width: 100%; height: 500px"></div>
</a-col>
</a-row>
</a-form>
</a-modal>
</template>
<script>
import { reactive, ref } from 'vue';
import AMapLoader from '@amap/amap-jsapi-loader';
export default {
setup() {
@ -133,6 +151,7 @@
institution: '',
faultLocation: '',
faultDescription: '',
faultImg: [],
isDispatched: null,
maintenanceRequirement: '',
dispatchOpinion: '',
@ -194,8 +213,23 @@
label: '特级',
},
];
const projectNameOptions = [
{
value: '1',
label: 'a',
},
{
value: '2',
label: 'b',
},
{
value: '3',
label: 'c',
},
];
const showModal = () => {
visible.value = true;
initMap();
};
const handleOk = () => {
@ -203,6 +237,49 @@
//
visible.value = false;
};
//
const map = ref(null);
const initMap = async () => {
try {
// JavaScript API
await AMapLoader.load({
key: '786a2e7cc6d4be5ba1d6174a0aa10f2b', // API Key
version: '2.0',
plugins: [], //
});
//
map.value = new AMap.Map('amapContainer', {
zoom: 7,
center: [116.397428, 39.90923], //
});
//
const marker = new AMap.Marker({
position: new AMap.LngLat(122, 30),
title: '点位1',
});
const marker1 = new AMap.Marker({
position: new AMap.LngLat(120, 28),
title: '点位2',
});
const markerList = [marker, marker1];
map.value.add(markerList);
// marker.setMap(map.value);
// marker1.setMap(map.value);
map.value.on('click', (e) => {
const newMarker = new AMap.Marker({
position: new AMap.LngLat(e.lnglat.lng, e.lnglat.lat),
title: '新点位',
});
map.value.add(newMarker);
console.log(map.value);
});
} catch (error) {
console.error('加载高德地图失败:', error);
}
};
return {
visible,
@ -213,6 +290,8 @@
maintenanceRequirementOptions,
institutionOptions,
faultSubcategoryOptions,
projectNameOptions,
map,
};
},
};

204
src/views/calculation/calculationAudit/addModal.vue

@ -0,0 +1,204 @@
<template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%">
<a-form :model="form" layout="vertical">
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="合同名称" name="contractName">
<a-input v-model:value="form.contractName" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="父级合同" name="contractParent">
<a-select
v-model:value="form.projectName"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="合同编号" name="contractCode">
<a-input v-model:value="form.contractCode" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="合同类别" name="contractType">
<a-select
v-model:value="form.contractType"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="所属区域" name="district">
<a-select
v-model:value="form.district"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="合同金额" name="contractPrice">
<a-input v-model:value="form.contractPrice" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="签订日期" name="signDate">
<a-date-picker v-model:value="form.signDate" placeholder="请选择" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="合同工期" name="contractDuration">
<a-range-picker v-model:value="form.contractDuration" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="甲方单位" name="partyA">
<a-select
v-model:value="form.partyA"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="甲方代表" name="partyAPerson">
<a-input v-model:value="form.partyAPerson" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="乙方单位" name="partyB">
<a-select
v-model:value="form.partyB"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="乙方代表" name="partyBPerson">
<a-input v-model:value="form.partyBPerson" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="合同内容" name="contractContent">
<a-textarea v-model:value="form.contractContent" :rows="4" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="备注" name="remark">
<a-textarea v-model:value="form.remark" :rows="4" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="附件" name="attachment">
<a-upload
v-model:file-list="form.attachment"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
>
<a-button type="primary"> 上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-modal>
</template>
<script>
import { reactive, ref } from 'vue';
export default {
setup() {
const title = ref('新增');
const visible = ref(false);
const form = reactive({
contractName: '',
contractCode: '',
contractParent: '',
contractType: '',
district: '',
contractPrice: '',
signDate: '',
contractDuration: [],
partyA: '',
partyAPerson: '',
partyB: '',
partyBPerson: '',
contractContent: '',
remark: '',
attachment: [],
});
//
const projectNameOptions = [
{
value: '1',
label: 'a',
},
{
value: '2',
label: 'b',
},
{
value: '3',
label: 'c',
},
];
const showModal = (type, id) => {
if (type == 1) {
title.value = '新增';
} else if (type == 2) {
title.value = '编辑';
console.log(id);
}
visible.value = true;
};
const handleOk = () => {
console.log('Form Data:', form);
//
visible.value = false;
};
return {
visible,
title,
form,
showModal,
handleOk,
projectNameOptions,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-modal-body {
max-width: 600px;
margin: 0 auto;
}
</style>

32
src/views/calculation/calculationAudit/api.ts

@ -0,0 +1,32 @@
import { ID, IDS, PageQuery, commonExport } from '@/api/base';
import { defHttp } from '@/utils/http/axios';
enum Api {
root = '/workflow/leave',
list = '/workflow/leave/list',
export = '/workflow/leave/export',
}
export function list(params?: PageQuery) {
return defHttp.get({ url: Api.list, params });
}
export function exportExcel(data: any) {
return commonExport(Api.export, data);
}
export function getInfo(id: ID) {
return defHttp.get({ url: `${Api.root}/${id}` });
}
export function add(data: any) {
return defHttp.post({ url: Api.root, data });
}
export function update(data: any) {
return defHttp.put({ url: Api.root, data });
}
export function removeByIds(ids: IDS) {
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` });
}

107
src/views/calculation/calculationAudit/data.ts

@ -0,0 +1,107 @@
import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
export const formSchemas: FormSchema[] = [
{
field: 'calculationCode',
label: '结算编号',
component: 'Input',
componentProps: {
placeholder: '请输入',
},
},
{
field: 'ioCompany',
label: '运维单位',
component: 'Select',
componentProps: {
options: [
{
value: '1',
label: '2323',
},
{
value: '2',
label: '2323',
},
{
value: '3',
label: '2323',
},
],
},
},
{
field: 'statusKey',
label: '状态搜素',
component: 'Select',
componentProps: {
options: [
{
value: '1',
label: '2323',
},
{
value: '2',
label: '2323',
},
{
value: '3',
label: '2323',
},
],
},
},
{
field: 'calculationRange',
label: '结算范围',
component: 'RangePicker',
},
];
export const columns: BasicColumn[] = [
{
title: '编号',
dataIndex: 'code',
},
{
title: '结算日期',
dataIndex: 'calculaitionDate',
},
{
title: '开始日期',
dataIndex: 'startDate',
},
{
title: '结束日期',
dataIndex: 'endDate',
},
{
title: '结算总价',
dataIndex: 'calculationSum',
},
{
title: '材料费用',
dataIndex: 'meterialCost',
},
{
title: '超期接单扣款',
dataIndex: 'outDateOrderCost',
},
{
title: '超期处理扣款',
dataIndex: 'outDateHandleCost',
},
{
title: '其他扣款',
dataIndex: 'otherCost',
},
{
title: '所属单位',
dataIndex: 'unit',
},
{
title: '当前状态',
dataIndex: 'status',
},
];

56
src/views/calculation/calculationAudit/index.vue

@ -0,0 +1,56 @@
<template>
<PageWrapper dense>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleAdd">审核</a-button>
</template>
</BasicTable>
<addModal ref="addModalRef" />
</PageWrapper>
</template>
<script setup lang="ts">
import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table';
import { list } from './api';
import { formSchemas, columns } from './data';
import addModal from './addModal.vue';
import { ref } from 'vue';
defineOptions({ name: 'CalculationAudit' });
const [registerTable] = useTable({
rowSelection: {
type: 'checkbox',
},
title: '代办审核',
api: list,
showIndexColumn: true,
rowKey: 'id',
useSearchForm: true,
formConfig: {
schemas: formSchemas,
name: 'calculationAudit',
baseColProps: {
xs: 24,
sm: 24,
md: 24,
lg: 6,
},
},
columns: columns,
actionColumn: {
width: 200,
title: '操作',
key: 'action',
fixed: 'right',
},
});
//
const addModalRef = ref();
const handleAdd = () => {
addModalRef.value.showModal(1);
};
</script>
<style scoped></style>

204
src/views/calculation/calculationList/addModal.vue

@ -0,0 +1,204 @@
<template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%">
<a-form :model="form" layout="vertical">
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="合同名称" name="contractName">
<a-input v-model:value="form.contractName" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="父级合同" name="contractParent">
<a-select
v-model:value="form.projectName"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="合同编号" name="contractCode">
<a-input v-model:value="form.contractCode" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="合同类别" name="contractType">
<a-select
v-model:value="form.contractType"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="所属区域" name="district">
<a-select
v-model:value="form.district"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="合同金额" name="contractPrice">
<a-input v-model:value="form.contractPrice" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="签订日期" name="signDate">
<a-date-picker v-model:value="form.signDate" placeholder="请选择" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="合同工期" name="contractDuration">
<a-range-picker v-model:value="form.contractDuration" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="甲方单位" name="partyA">
<a-select
v-model:value="form.partyA"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="甲方代表" name="partyAPerson">
<a-input v-model:value="form.partyAPerson" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="乙方单位" name="partyB">
<a-select
v-model:value="form.partyB"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="乙方代表" name="partyBPerson">
<a-input v-model:value="form.partyBPerson" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="合同内容" name="contractContent">
<a-textarea v-model:value="form.contractContent" :rows="4" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="备注" name="remark">
<a-textarea v-model:value="form.remark" :rows="4" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="附件" name="attachment">
<a-upload
v-model:file-list="form.attachment"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
>
<a-button type="primary"> 上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-modal>
</template>
<script>
import { reactive, ref } from 'vue';
export default {
setup() {
const title = ref('新增');
const visible = ref(false);
const form = reactive({
contractName: '',
contractCode: '',
contractParent: '',
contractType: '',
district: '',
contractPrice: '',
signDate: '',
contractDuration: [],
partyA: '',
partyAPerson: '',
partyB: '',
partyBPerson: '',
contractContent: '',
remark: '',
attachment: [],
});
//
const projectNameOptions = [
{
value: '1',
label: 'a',
},
{
value: '2',
label: 'b',
},
{
value: '3',
label: 'c',
},
];
const showModal = (type, id) => {
if (type == 1) {
title.value = '新增';
} else if (type == 2) {
title.value = '编辑';
console.log(id);
}
visible.value = true;
};
const handleOk = () => {
console.log('Form Data:', form);
//
visible.value = false;
};
return {
visible,
title,
form,
showModal,
handleOk,
projectNameOptions,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-modal-body {
max-width: 600px;
margin: 0 auto;
}
</style>

32
src/views/calculation/calculationList/api.ts

@ -0,0 +1,32 @@
import { ID, IDS, PageQuery, commonExport } from '@/api/base';
import { defHttp } from '@/utils/http/axios';
enum Api {
root = '/workflow/leave',
list = '/workflow/leave/list',
export = '/workflow/leave/export',
}
export function list(params?: PageQuery) {
return defHttp.get({ url: Api.list, params });
}
export function exportExcel(data: any) {
return commonExport(Api.export, data);
}
export function getInfo(id: ID) {
return defHttp.get({ url: `${Api.root}/${id}` });
}
export function add(data: any) {
return defHttp.post({ url: Api.root, data });
}
export function update(data: any) {
return defHttp.put({ url: Api.root, data });
}
export function removeByIds(ids: IDS) {
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` });
}

107
src/views/calculation/calculationList/data.ts

@ -0,0 +1,107 @@
import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
export const formSchemas: FormSchema[] = [
{
field: 'calculationCode',
label: '结算编号',
component: 'Input',
componentProps: {
placeholder: '请输入',
},
},
{
field: 'ioCompany',
label: '运维单位',
component: 'Select',
componentProps: {
options: [
{
value: '1',
label: '2323',
},
{
value: '2',
label: '2323',
},
{
value: '3',
label: '2323',
},
],
},
},
{
field: 'statusKey',
label: '状态搜素',
component: 'Select',
componentProps: {
options: [
{
value: '1',
label: '2323',
},
{
value: '2',
label: '2323',
},
{
value: '3',
label: '2323',
},
],
},
},
{
field: 'calculationRange',
label: '结算范围',
component: 'RangePicker',
},
];
export const columns: BasicColumn[] = [
{
title: '编号',
dataIndex: 'code',
},
{
title: '结算日期',
dataIndex: 'calculaitionDate',
},
{
title: '开始日期',
dataIndex: 'startDate',
},
{
title: '结束日期',
dataIndex: 'endDate',
},
{
title: '结算总价',
dataIndex: 'calculationSum',
},
{
title: '材料费用',
dataIndex: 'meterialCost',
},
{
title: '超期接单扣款',
dataIndex: 'outDateOrderCost',
},
{
title: '超期处理扣款',
dataIndex: 'outDateHandleCost',
},
{
title: '其他扣款',
dataIndex: 'otherCost',
},
{
title: '所属单位',
dataIndex: 'unit',
},
{
title: '当前状态',
dataIndex: 'status',
},
];

56
src/views/calculation/calculationList/index.vue

@ -0,0 +1,56 @@
<template>
<PageWrapper dense>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleAdd">详情</a-button>
</template>
</BasicTable>
<addModal ref="addModalRef" />
</PageWrapper>
</template>
<script setup lang="ts">
import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table';
import { list } from './api';
import { formSchemas, columns } from './data';
import addModal from './addModal.vue';
import { ref } from 'vue';
defineOptions({ name: 'CalculationList' });
const [registerTable] = useTable({
rowSelection: {
type: 'checkbox',
},
title: '全部列表',
api: list,
showIndexColumn: true,
rowKey: 'id',
useSearchForm: true,
formConfig: {
schemas: formSchemas,
name: 'calculationList',
baseColProps: {
xs: 24,
sm: 24,
md: 24,
lg: 6,
},
},
columns: columns,
actionColumn: {
width: 200,
title: '操作',
key: 'action',
fixed: 'right',
},
});
//
const addModalRef = ref();
const handleAdd = () => {
addModalRef.value.showModal(1);
};
</script>
<style scoped></style>

108
src/views/document/addModal.vue

@ -0,0 +1,108 @@
<template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%">
<a-form :model="form" layout="vertical">
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="文档名称" name="documentName">
<a-input v-model:value="form.documentName" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="类型" name="type">
<a-select
v-model:value="form.type"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="状态" name="status">
<a-radio-group v-model:value="form.status">
<a-radio :value="1">启用</a-radio>
<a-radio :value="0">禁用</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="附件" name="attachment">
<a-upload
v-model:file-list="form.attachment"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
>
<a-button type="primary"> 上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-modal>
</template>
<script>
import { reactive, ref } from 'vue';
export default {
setup() {
const title = ref('新增');
const visible = ref(false);
const form = reactive({
documentName: '',
type: '',
status: 1,
attachment: [],
});
//
const projectNameOptions = [
{
value: '1',
label: 'a',
},
{
value: '2',
label: 'b',
},
{
value: '3',
label: 'c',
},
];
const showModal = (type, id) => {
if (type == 1) {
title.value = '新增';
} else if (type == 2) {
title.value = '编辑';
console.log(id);
}
visible.value = true;
};
const handleOk = () => {
console.log('Form Data:', form);
//
visible.value = false;
};
return {
visible,
title,
form,
showModal,
handleOk,
projectNameOptions,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-modal-body {
max-width: 600px;
margin: 0 auto;
}
</style>

32
src/views/document/api.ts

@ -0,0 +1,32 @@
import { ID, IDS, PageQuery, commonExport } from '@/api/base';
import { defHttp } from '@/utils/http/axios';
enum Api {
root = '/workflow/leave',
list = '/workflow/leave/list',
export = '/workflow/leave/export',
}
export function list(params?: PageQuery) {
return defHttp.get({ url: Api.list, params });
}
export function exportExcel(data: any) {
return commonExport(Api.export, data);
}
export function getInfo(id: ID) {
return defHttp.get({ url: `${Api.root}/${id}` });
}
export function add(data: any) {
return defHttp.post({ url: Api.root, data });
}
export function update(data: any) {
return defHttp.put({ url: Api.root, data });
}
export function removeByIds(ids: IDS) {
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` });
}

32
src/views/document/data.ts

@ -0,0 +1,32 @@
import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
export const formSchemas: FormSchema[] = [
{
field: 'ducumentName',
label: '文档名称',
component: 'Input',
componentProps: {
placeholder: '请输入',
},
},
];
export const columns: BasicColumn[] = [
{
title: '文档名称',
dataIndex: 'ducumentName',
},
{
title: '类型',
dataIndex: 'type',
},
{
title: '状态',
dataIndex: 'status',
},
{
title: '创建时间',
dataIndex: 'createTime',
},
];

110
src/views/document/detailDrawer.vue

@ -0,0 +1,110 @@
<template>
<div>
<!-- 抽屉组件 -->
<a-drawer
title="合同详情"
placement="right"
:closable="true"
:open="visible"
@close="onClose"
width="600px"
>
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="详细信息">
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">名称</span>{{ detail.ducumentName }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">类型</span>{{ detail.type }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">状态</span>{{ detail.status }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">录入时间</span>{{ detail.createTime }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">附件</span>{{ detail.attachment }}</div>
</a-col>
</a-row>
</a-tab-pane>
</a-tabs>
</a-drawer>
</div>
</template>
<script>
import { reactive, ref } from 'vue';
// import { getInfo } from './api';
export default {
setup() {
//
let detail = reactive({
ducumentName: '',
type: '',
status: '',
createTime: '',
attachment: [],
});
//
const visible = ref(false);
// const showDrawer = async(id) => {
// const data = await getInfo(id)
// for(let i in detail){
// detail[i] = data[i]
// }
// visible.value = true;
// console.log(detail)
// };
const showDrawer = () => {
visible.value = true;
};
//
const onClose = () => {
visible.value = false;
};
const activeKey = ref('1');
return {
visible,
showDrawer,
onClose,
activeKey,
detail,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-btn {
margin: 20px;
}
/* .singerDetail{
margin-bottom: 10px;
} */
div {
margin-bottom: 10px;
}
.timeText {
margin: 0 0 40px 20px;
color: red;
}
.titleLabel {
color: gray;
}
</style>

72
src/views/document/index.vue

@ -0,0 +1,72 @@
<template>
<PageWrapper dense>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleAdd">新增</a-button>
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'">
<!-- <a-button type="link" @click="handleEdit(record.id)">编辑</a-button>
<a-button type="link" @click="handleDelete(record.id)">删除</a-button> -->
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
</template>
</BasicTable>
<detailDrawer ref="detailDrawerRef" />
<addModal ref="addModalRef" />
</PageWrapper>
</template>
<script setup lang="ts">
import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table';
import { list } from './api';
import { formSchemas, columns } from './data';
import detailDrawer from './detailDrawer.vue';
import { ref } from 'vue';
import addModal from './addModal.vue';
defineOptions({ name: 'Document' });
const [registerTable] = useTable({
rowSelection: {
type: 'checkbox',
},
title: '文档管理',
api: list,
showIndexColumn: true,
rowKey: 'id',
useSearchForm: true,
formConfig: {
schemas: formSchemas,
name: 'document',
baseColProps: {
xs: 24,
sm: 24,
md: 24,
lg: 6,
},
},
columns: columns,
actionColumn: {
width: 200,
title: '操作',
key: 'action',
fixed: 'right',
},
});
//
const detailDrawerRef = ref();
const handleDetail = () => {
detailDrawerRef.value.showDrawer();
};
//
const addModalRef = ref();
const handleAdd = () => {
addModalRef.value.showModal(1);
};
</script>
<style scoped></style>

151
src/views/notice/addModal.vue

@ -0,0 +1,151 @@
<template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%">
<a-form :model="form" layout="vertical">
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="标题" name="title">
<a-input v-model:value="form.title" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="类型" name="type">
<a-select
v-model:value="form.type"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div style="border: 1px solid #ccc">
<Toolbar
style="border-bottom: 1px solid #ccc"
:editor="editorRef"
:defaultConfig="toolbarConfig"
:mode="mode"
/>
<Editor
style="height: 500px; overflow-y: hidden"
v-model="form.content"
:defaultConfig="editorConfig"
:mode="mode"
@on-created="handleCreated"
/>
</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="附件" name="attachment">
<a-upload
v-model:file-list="form.attachment"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
>
<a-button type="primary"> 上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-modal>
</template>
<script>
import { reactive, ref, shallowRef, onMounted, onBeforeUnmount } from 'vue';
import { Editor, Toolbar } from '@wangeditor/editor-for-vue';
import '@wangeditor/editor/dist/css/style.css';
export default {
components: { Editor, Toolbar },
setup() {
const title = ref('新增');
const visible = ref(false);
const form = reactive({
title: '',
type: '',
content: '<p>hello</p>',
attachment: [],
});
//
const projectNameOptions = [
{
value: '1',
label: 'a',
},
{
value: '2',
label: 'b',
},
{
value: '3',
label: 'c',
},
];
const showModal = (type, id) => {
if (type == 1) {
title.value = '新增';
} else if (type == 2) {
title.value = '编辑';
console.log(id);
}
visible.value = true;
};
const handleOk = () => {
console.log('Form Data:', form);
//
visible.value = false;
};
//
// shallowRef
const editorRef = shallowRef();
// HTML
// ajax
onMounted(() => {
setTimeout(() => {
form.content = '<p>模拟 Ajax 异步设置内容</p>';
}, 1500);
});
const toolbarConfig = {};
const editorConfig = { placeholder: '请输入内容...' };
//
onBeforeUnmount(() => {
const editor = editorRef.value;
if (editor == null) return;
editor.destroy();
});
const handleCreated = (editor) => {
editorRef.value = editor; // editor
};
return {
visible,
title,
form,
showModal,
handleOk,
projectNameOptions,
editorRef,
mode: 'default',
toolbarConfig,
editorConfig,
handleCreated,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-modal-body {
max-width: 600px;
margin: 0 auto;
}
</style>

32
src/views/notice/api.ts

@ -0,0 +1,32 @@
import { ID, IDS, PageQuery, commonExport } from '@/api/base';
import { defHttp } from '@/utils/http/axios';
enum Api {
root = '/workflow/leave',
list = '/workflow/leave/list',
export = '/workflow/leave/export',
}
export function list(params?: PageQuery) {
return defHttp.get({ url: Api.list, params });
}
export function exportExcel(data: any) {
return commonExport(Api.export, data);
}
export function getInfo(id: ID) {
return defHttp.get({ url: `${Api.root}/${id}` });
}
export function add(data: any) {
return defHttp.post({ url: Api.root, data });
}
export function update(data: any) {
return defHttp.put({ url: Api.root, data });
}
export function removeByIds(ids: IDS) {
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` });
}

32
src/views/notice/data.ts

@ -0,0 +1,32 @@
import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
export const formSchemas: FormSchema[] = [
{
field: 'title',
label: '标题',
component: 'Input',
componentProps: {
placeholder: '请输入',
},
},
];
export const columns: BasicColumn[] = [
{
title: '标题',
dataIndex: 'title',
},
{
title: '类型',
dataIndex: 'type',
},
{
title: '发布日期',
dataIndex: 'createTime',
},
{
title: '操作人',
dataIndex: 'handler',
},
];

117
src/views/notice/detailDrawer.vue

@ -0,0 +1,117 @@
<template>
<div>
<!-- 抽屉组件 -->
<a-drawer
title="合同详情"
placement="right"
:closable="true"
:open="visible"
@close="onClose"
width="600px"
>
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="基本信息">
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">标题</span>{{ detail.title }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<div><span class="titleLabel">类型</span>{{ detail.type }}</div>
</a-col>
<a-col :span="12">
<div><span class="titleLabel">发布人</span>{{ detail.handler }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<div><span class="titleLabel">发布日期</span>{{ detail.createTime }}</div>
</a-col>
<a-col :span="12">
<div><span class="titleLabel">项目</span>{{ detail.projectName }}</div>
</a-col>
</a-row>
<a-row>
<a-col :span="24">
<div v-html="detail.content"></div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">附件</span>{{ detail.attachment }}</div>
</a-col>
</a-row>
</a-tab-pane>
</a-tabs>
</a-drawer>
</div>
</template>
<script>
import { reactive, ref } from 'vue';
// import { getInfo } from './api';
export default {
setup() {
//
let detail = reactive({
title: '',
type: '',
handler: '',
content: '<p>是假的是假的</p>',
createTime: '',
attachment: [],
});
//
const visible = ref(false);
// const showDrawer = async(id) => {
// const data = await getInfo(id)
// for(let i in detail){
// detail[i] = data[i]
// }
// visible.value = true;
// console.log(detail)
// };
const showDrawer = () => {
visible.value = true;
};
//
const onClose = () => {
visible.value = false;
};
const activeKey = ref('1');
return {
visible,
showDrawer,
onClose,
activeKey,
detail,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-btn {
margin: 20px;
}
/* .singerDetail{
margin-bottom: 10px;
} */
div {
margin-bottom: 10px;
}
.timeText {
margin: 0 0 40px 20px;
color: red;
}
.titleLabel {
color: gray;
}
</style>

72
src/views/notice/index.vue

@ -0,0 +1,72 @@
<template>
<PageWrapper dense>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleAdd">新增</a-button>
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'">
<!-- <a-button type="link" @click="handleEdit(record.id)">编辑</a-button>
<a-button type="link" @click="handleDelete(record.id)">删除</a-button> -->
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
</template>
</BasicTable>
<detailDrawer ref="detailDrawerRef" />
<addModal ref="addModalRef" />
</PageWrapper>
</template>
<script setup lang="ts">
import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table';
import { list } from './api';
import { formSchemas, columns } from './data';
import detailDrawer from './detailDrawer.vue';
import { ref } from 'vue';
import addModal from './addModal.vue';
defineOptions({ name: 'Document' });
const [registerTable] = useTable({
rowSelection: {
type: 'checkbox',
},
title: '文档管理',
api: list,
showIndexColumn: true,
rowKey: 'id',
useSearchForm: true,
formConfig: {
schemas: formSchemas,
name: 'document',
baseColProps: {
xs: 24,
sm: 24,
md: 24,
lg: 6,
},
},
columns: columns,
actionColumn: {
width: 200,
title: '操作',
key: 'action',
fixed: 'right',
},
});
//
const detailDrawerRef = ref();
const handleDetail = () => {
detailDrawerRef.value.showDrawer();
};
//
const addModalRef = ref();
const handleAdd = () => {
addModalRef.value.showModal(1);
};
</script>
<style scoped></style>

116
src/views/project/IOCheck/checkManage/addModal.vue

@ -0,0 +1,116 @@
<template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%">
<a-form :model="form" layout="vertical">
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="类型" name="type">
<a-select v-model:value="form.type" :options="statusOptions" placeholder="请选择" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="考核类型" name="checkType">
<a-select
v-model:value="form.checkType"
:options="statusOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="评分大类" name="largeRating">
<a-select
v-model:value="form.largeRating"
:options="statusOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="评分小类" name="smallRating">
<a-input v-model:value="form.smallRating" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="分值" name="rating">
<a-input v-model:value="form.rating" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="扣分标准" name="subStandards">
<a-textarea v-model:value="form.subStandards" :rows="4" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-modal>
</template>
<script>
import { reactive, ref } from 'vue';
export default {
setup() {
const title = ref('新增');
const visible = ref(false);
const form = reactive({
type: '',
checkType: '',
largeRating: '',
smallRating: '',
rating: '',
subStandards: '',
});
//
const statusOptions = [
{
value: 0,
label: '禁用',
},
{
value: 1,
label: '启用',
},
];
const showModal = (type, id) => {
if (type == 1) {
title.value = '新增';
} else if (type == 2) {
title.value = '编辑';
console.log(id);
}
visible.value = true;
};
const handleOk = () => {
console.log('Form Data:', form);
//
visible.value = false;
};
return {
visible,
title,
form,
showModal,
handleOk,
statusOptions,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-modal-body {
max-width: 600px;
margin: 0 auto;
}
</style>

58
src/views/project/IOCheck/checkManage/api.ts

@ -0,0 +1,58 @@
import { ID, IDS, PageQuery, commonExport } from '@/api/base';
import { defHttp } from '@/utils/http/axios';
import { Dayjs } from 'dayjs';
enum Api {
root = '/workflow/leave',
list = '/workflow/leave/list',
export = '/workflow/leave/export',
}
export interface Leave {
id: string;
leaveType: string;
startDate: string;
endDate: string;
leaveDays: number;
remark: string;
processInstanceVo?: any;
dateTime?: [string, string] | [Dayjs, Dayjs];
}
export interface Resp {
createDept: number;
createBy: number;
createTime: string;
updateBy: number;
updateTime: string;
id: string;
leaveType: string;
startDate: string;
endDate: string;
leaveDays: number;
remark?: any;
}
export function list(params?: PageQuery) {
return defHttp.get<Leave[]>({ url: Api.list, params });
}
export function exportExcel(data: any) {
return commonExport(Api.export, data);
}
export function getInfo(id: ID) {
return defHttp.get<Leave>({ url: `${Api.root}/${id}` });
}
export function add(data: any) {
return defHttp.post<Resp>({ url: Api.root, data });
}
export function update(data: any) {
return defHttp.put<Resp>({ url: Api.root, data });
}
export function removeByIds(ids: IDS) {
return defHttp.deleteWithMsg<void>({ url: `${Api.root}/${ids.join(',')}` });
}

53
src/views/project/IOCheck/checkManage/data.ts

@ -0,0 +1,53 @@
import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
export const formSchemas: FormSchema[] = [
{
field: 'type',
label: '考核类型',
component: 'Select',
componentProps: {
options: [
{
value: '1',
label: '2323',
},
{
value: '2',
label: '2323',
},
{
value: '3',
label: '2323',
},
],
},
},
];
export const columns: BasicColumn[] = [
{
title: '类型',
dataIndex: 'type',
},
{
title: '评分大类',
dataIndex: 'langeRating',
},
{
title: '评分小类',
dataIndex: 'smallRating',
},
{
title: '分值',
dataIndex: 'rating',
},
{
title: '扣分标准',
dataIndex: 'subStandards',
},
{
title: '创建日期',
dataIndex: 'createDate',
},
];

70
src/views/project/IOCheck/checkManage/index.vue

@ -0,0 +1,70 @@
<template>
<PageWrapper dense>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleAdd">新增</a-button>
<a-button type="primary" @click="handleAdd">导入</a-button>
<a-button type="primary" @click="handleAdd">导出</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'">
<a-button type="link" @click="handleEdit(record.id)">编辑</a-button>
<a-button type="link" @click="handleDelete(record.id)">删除</a-button>
</template>
</template>
</BasicTable>
<addModal ref="addModalRef" />
</PageWrapper>
</template>
<script setup lang="ts">
import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table';
import { list } from './api';
import { formSchemas, columns } from './data';
import addModal from './addModal.vue';
import { ref } from 'vue';
defineOptions({ name: 'CheckManage' });
const [registerTable] = useTable({
rowSelection: {
type: 'checkbox',
},
title: '考核管理',
api: list,
showIndexColumn: true,
rowKey: 'id',
useSearchForm: true,
formConfig: {
schemas: formSchemas,
name: 'checkManage',
baseColProps: {
xs: 24,
sm: 24,
md: 24,
lg: 6,
},
},
columns: columns,
actionColumn: {
width: 200,
title: '操作',
key: 'action',
fixed: 'right',
},
});
//
const addModalRef = ref();
const handleAdd = () => {
addModalRef.value.showModal(1);
};
const handleEdit = (id: any) => {
addModalRef.value.showModal(2, id);
};
const handleDelete = (id: any) => {
addModalRef.value.showModal(2, id);
};
</script>
<style scoped></style>

98
src/views/project/IOCheck/checkRating/addModal.vue

@ -0,0 +1,98 @@
<template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="30%">
<a-form :model="form" layout="vertical">
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="运维单位" name="ioUnit">
<a-select v-model:value="form.ioUnit" :options="statusOptions" placeholder="请选择" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="考核项目" name="checkProject">
<a-select
v-model:value="form.checkProject"
:options="statusOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="考核时间" name="checkTime">
<a-date-picker v-model:value="form.checkTime" placeholder="请选择" type="month" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="考核名称" name="checkName">
<a-textarea v-model:value="form.checkName" :rows="4" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-modal>
</template>
<script>
import { reactive, ref } from 'vue';
export default {
setup() {
const title = ref('新增');
const visible = ref(false);
const form = reactive({
ioUnit: '',
checkProject: '',
checkTime: '',
checkName: '',
});
//
const statusOptions = [
{
value: 0,
label: '禁用',
},
{
value: 1,
label: '启用',
},
];
const showModal = (type, id) => {
if (type == 1) {
title.value = '新增';
} else if (type == 2) {
title.value = '编辑';
console.log(id);
}
visible.value = true;
};
const handleOk = () => {
console.log('Form Data:', form);
//
visible.value = false;
};
return {
visible,
title,
form,
showModal,
handleOk,
statusOptions,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-modal-body {
max-width: 600px;
margin: 0 auto;
}
</style>

58
src/views/project/IOCheck/checkRating/api.ts

@ -0,0 +1,58 @@
import { ID, IDS, PageQuery, commonExport } from '@/api/base';
import { defHttp } from '@/utils/http/axios';
import { Dayjs } from 'dayjs';
enum Api {
root = '/workflow/leave',
list = '/workflow/leave/list',
export = '/workflow/leave/export',
}
export interface Leave {
id: string;
leaveType: string;
startDate: string;
endDate: string;
leaveDays: number;
remark: string;
processInstanceVo?: any;
dateTime?: [string, string] | [Dayjs, Dayjs];
}
export interface Resp {
createDept: number;
createBy: number;
createTime: string;
updateBy: number;
updateTime: string;
id: string;
leaveType: string;
startDate: string;
endDate: string;
leaveDays: number;
remark?: any;
}
export function list(params?: PageQuery) {
return defHttp.get<Leave[]>({ url: Api.list, params });
}
export function exportExcel(data: any) {
return commonExport(Api.export, data);
}
export function getInfo(id: ID) {
return defHttp.get<Leave>({ url: `${Api.root}/${id}` });
}
export function add(data: any) {
return defHttp.post<Resp>({ url: Api.root, data });
}
export function update(data: any) {
return defHttp.put<Resp>({ url: Api.root, data });
}
export function removeByIds(ids: IDS) {
return defHttp.deleteWithMsg<void>({ url: `${Api.root}/${ids.join(',')}` });
}

37
src/views/project/IOCheck/checkRating/data.ts

@ -0,0 +1,37 @@
import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
export const formSchemas: FormSchema[] = [
{
field: 'checkTime',
label: '考核时间',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
},
},
];
export const columns: BasicColumn[] = [
{
title: '运维单位',
dataIndex: 'ioUnit',
},
{
title: '考核项目',
dataIndex: 'checkProject',
},
{
title: '考核名称',
dataIndex: 'checkName',
},
{
title: '考核时间',
dataIndex: 'checkTime',
},
{
title: '考核得分',
dataIndex: 'checkRating',
},
];

79
src/views/project/IOCheck/checkRating/index.vue

@ -0,0 +1,79 @@
<template>
<PageWrapper dense>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleAdd">新增</a-button>
<a-button type="primary" @click="handleAdd">考核项编辑</a-button>
<a-button type="primary" @click="handleRating(1, 2)">评分</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'">
<a-button type="link" @click="handleEdit(record.id)">编辑</a-button>
<a-button type="link" @click="handleDelete(record.id)">删除</a-button>
<a-button type="primary" @click="handleRating(1, record.id)">评分</a-button>
<a-button type="primary" @click="handleRating(2, record.id)">查看评分</a-button>
</template>
</template>
</BasicTable>
<addModal ref="addModalRef" />
<ratingModal ref="ratingModalRef" />
</PageWrapper>
</template>
<script setup lang="ts">
import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table';
import { list } from './api';
import { formSchemas, columns } from './data';
import addModal from './addModal.vue';
import { ref } from 'vue';
import ratingModal from './ratingModal.vue';
defineOptions({ name: 'CheckRating' });
const [registerTable] = useTable({
rowSelection: {
type: 'checkbox',
},
title: '考核评分',
api: list,
showIndexColumn: true,
rowKey: 'id',
useSearchForm: true,
formConfig: {
schemas: formSchemas,
name: 'checkRating',
baseColProps: {
xs: 24,
sm: 24,
md: 24,
lg: 6,
},
},
columns: columns,
actionColumn: {
width: 200,
title: '操作',
key: 'action',
fixed: 'right',
},
});
//
const addModalRef = ref();
const handleAdd = () => {
addModalRef.value.showModal(1);
};
const handleEdit = (id: any) => {
addModalRef.value.showModal(2, id);
};
const handleDelete = (id: any) => {
addModalRef.value.showModal(2, id);
};
//
const ratingModalRef = ref();
const handleRating = (type: Number, id: any) => {
ratingModalRef.value.showModal(type, id);
};
</script>
<style scoped></style>

193
src/views/project/IOCheck/checkRating/ratingModal.vue

@ -0,0 +1,193 @@
<template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%">
<a-table :dataSource="dataSource" :columns="columns" bordered>
<template #summary>
<a-table-summary-row>
<a-table-summary-cell>评分</a-table-summary-cell>
<a-table-summary-cell>
<a-typography-text />
</a-table-summary-cell>
<a-table-summary-cell>
<a-typography-text />
</a-table-summary-cell>
<a-table-summary-cell>
<a-typography-text type="danger">{{ totals.sumRating }}</a-typography-text>
</a-table-summary-cell>
<a-table-summary-cell>
<a-typography-text>{{ totals.subRating }}</a-typography-text>
</a-table-summary-cell>
<a-table-summary-cell>
<a-typography-text type="danger">{{ totals.currentRating }}</a-typography-text>
</a-table-summary-cell>
</a-table-summary-row>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'subRating'">
<a-input v-model:value="record.subRating" />
</template>
</template>
</a-table>
</a-modal>
</template>
<script>
import { computed, ref } from 'vue';
export default {
setup() {
const title = ref('详情');
const visible = ref(false);
const rowSpanMap = ref([]);
const columns = [
{
title: '评分大类',
dataIndex: 'largeRating',
key: 'largeRating',
customCell: (_, index) => {
return {
rowSpan: rowSpanMap.value[index],
};
},
},
{
title: '评分小类',
dataIndex: 'smallRating',
key: 'smallRating',
},
{
title: '扣分标准',
dataIndex: 'subStandards',
key: 'subStandards',
},
{
title: '总分',
dataIndex: 'sumRating',
key: 'sumRating',
},
{
title: '扣分',
dataIndex: 'subRating',
key: 'subRating',
},
{
title: '备注',
dataIndex: 'remark',
key: 'remark',
},
];
const dataSource = ref([
{
largeRating: '1',
smallRating: '2',
subStandards: 'ss',
sumRating: 100,
subRating: 7,
remark: '双颊及',
},
{
largeRating: '1',
smallRating: '4',
subStandards: 'ssfdf',
sumRating: 92,
subRating: 9,
remark: '郭德纲',
},
{
largeRating: '24',
smallRating: '4',
subStandards: 'ssfdf',
sumRating: 92,
subRating: 9,
remark: '郭德纲',
},
{
largeRating: '24',
smallRating: '4',
subStandards: 'ssfdf',
sumRating: 92,
subRating: 7,
remark: '郭德纲',
},
{
largeRating: '24',
smallRating: '4',
subStandards: 'ssfdf',
sumRating: 92,
subRating: 4,
remark: '郭德纲',
},
]);
const getRowSpanMap = () => {
const spans = [];
let k = 0; //
while (k < dataSource.value.length) {
const current = dataSource.value[k].largeRating;
let count = 1;
while (
k + count < dataSource.value.length &&
dataSource.value[k + count].largeRating === current
) {
count++;
}
// rowSpan 0
spans[k] = count;
for (let i = 1; i < count; i++) {
spans[k + i] = 0;
}
k += count; //
}
rowSpanMap.value = spans;
console.log(rowSpanMap.value);
};
getRowSpanMap();
//
const totals = computed(() => {
let sumRating = 0;
let subRating = 0;
dataSource.value.forEach((i) => {
i.subRating = Number(i.subRating);
sumRating += i.sumRating;
subRating += i.subRating;
});
let currentRating = sumRating - subRating;
return {
sumRating,
subRating,
currentRating,
};
});
const showModal = (type, id) => {
if (type == 1) {
console.log(id);
visible.value = true;
}
};
const handleOk = () => {
console.log('222');
};
return {
visible,
title,
showModal,
handleOk,
columns,
dataSource,
totals,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-modal-body {
max-width: 600px;
margin: 0 auto;
}
</style>

58
src/views/project/IOCheck/ratingSearch/api.ts

@ -0,0 +1,58 @@
import { ID, IDS, PageQuery, commonExport } from '@/api/base';
import { defHttp } from '@/utils/http/axios';
import { Dayjs } from 'dayjs';
enum Api {
root = '/workflow/leave',
list = '/workflow/leave/list',
export = '/workflow/leave/export',
}
export interface Leave {
id: string;
leaveType: string;
startDate: string;
endDate: string;
leaveDays: number;
remark: string;
processInstanceVo?: any;
dateTime?: [string, string] | [Dayjs, Dayjs];
}
export interface Resp {
createDept: number;
createBy: number;
createTime: string;
updateBy: number;
updateTime: string;
id: string;
leaveType: string;
startDate: string;
endDate: string;
leaveDays: number;
remark?: any;
}
export function list(params?: PageQuery) {
return defHttp.get<Leave[]>({ url: Api.list, params });
}
export function exportExcel(data: any) {
return commonExport(Api.export, data);
}
export function getInfo(id: ID) {
return defHttp.get<Leave>({ url: `${Api.root}/${id}` });
}
export function add(data: any) {
return defHttp.post<Resp>({ url: Api.root, data });
}
export function update(data: any) {
return defHttp.put<Resp>({ url: Api.root, data });
}
export function removeByIds(ids: IDS) {
return defHttp.deleteWithMsg<void>({ url: `${Api.root}/${ids.join(',')}` });
}

54
src/views/project/IOCheck/ratingSearch/data.ts

@ -0,0 +1,54 @@
import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
export const formSchemas: FormSchema[] = [
{
field: 'projectName',
label: '项目名称',
component: 'Select',
componentProps: {
options: [
{
value: '1',
label: '2323',
},
{
value: '2',
label: '2323',
},
{
value: '3',
label: '2323',
},
],
},
},
{
field: 'checkTime',
label: '考核时间',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
},
},
];
export const columns: BasicColumn[] = [
{
title: '运维单位',
dataIndex: 'ioUnit',
},
{
title: '考核项目',
dataIndex: 'checkProject',
},
{
title: '考核时间',
dataIndex: 'checkTime',
},
{
title: '分值',
dataIndex: 'rating',
},
];

88
src/views/project/IOCheck/ratingSearch/detailDrawer.vue

@ -0,0 +1,88 @@
<template>
<div>
<!-- 抽屉组件 -->
<a-drawer
title="详情"
placement="right"
:closable="true"
:open="visible"
@close="onClose"
width="600px"
>
<div ref="chartRef" style="width: 500px; height: 500px"></div>
</a-drawer>
</div>
</template>
<script>
import { ref } from 'vue';
import { useECharts } from '@/hooks/web/useECharts';
// import { getInfo } from './api';
export default {
setup() {
//
const chartRef = ref();
const { setOptions } = useECharts(chartRef);
const visible = ref(false);
const showDrawer = () => {
visible.value = true;
console.log('11');
setOptions(options);
};
//
const onClose = () => {
visible.value = false;
};
const options = {
title: {
text: '成绩查询',
},
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
},
yAxis: {
type: 'value',
},
series: [
{
data: [150, 230, 224, 218, 135, 147, 260],
type: 'line',
},
],
};
return {
visible,
showDrawer,
onClose,
chartRef,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-btn {
margin: 20px;
}
/* .singerDetail{
margin-bottom: 10px;
} */
div {
margin-bottom: 10px;
}
.timeText {
margin: 0 0 40px 20px;
color: red;
}
.titleLabel {
color: gray;
}
</style>

62
src/views/project/IOCheck/ratingSearch/index.vue

@ -0,0 +1,62 @@
<template>
<PageWrapper dense>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleDetail">导出</a-button>
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'">
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
</template>
</BasicTable>
<detailDrawer ref="detailDrawerRef" />
</PageWrapper>
</template>
<script setup lang="ts">
import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table';
import { list } from './api';
import { formSchemas, columns } from './data';
import detailDrawer from './detailDrawer.vue';
import { ref } from 'vue';
defineOptions({ name: 'RatingSearch' });
const [registerTable] = useTable({
rowSelection: {
type: 'checkbox',
},
title: '成绩查询',
api: list,
showIndexColumn: true,
rowKey: 'id',
useSearchForm: true,
formConfig: {
schemas: formSchemas,
name: 'ratingSearch',
baseColProps: {
xs: 24,
sm: 24,
md: 24,
lg: 6,
},
},
columns: columns,
actionColumn: {
width: 200,
title: '操作',
key: 'action',
fixed: 'right',
},
});
//
const detailDrawerRef = ref();
const handleDetail = () => {
detailDrawerRef.value.showDrawer();
};
</script>
<style scoped></style>

204
src/views/project/contractManage/addModal.vue

@ -0,0 +1,204 @@
<template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%">
<a-form :model="form" layout="vertical">
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="合同名称" name="contractName">
<a-input v-model:value="form.contractName" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="父级合同" name="contractParent">
<a-select
v-model:value="form.projectName"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="合同编号" name="contractCode">
<a-input v-model:value="form.contractCode" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="合同类别" name="contractType">
<a-select
v-model:value="form.contractType"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="所属区域" name="district">
<a-select
v-model:value="form.district"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="合同金额" name="contractPrice">
<a-input v-model:value="form.contractPrice" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="签订日期" name="signDate">
<a-date-picker v-model:value="form.signDate" placeholder="请选择" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="合同工期" name="contractDuration">
<a-range-picker v-model:value="form.contractDuration" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="甲方单位" name="partyA">
<a-select
v-model:value="form.partyA"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="甲方代表" name="partyAPerson">
<a-input v-model:value="form.partyAPerson" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="乙方单位" name="partyB">
<a-select
v-model:value="form.partyB"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="乙方代表" name="partyBPerson">
<a-input v-model:value="form.partyBPerson" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="合同内容" name="contractContent">
<a-textarea v-model:value="form.contractContent" :rows="4" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="备注" name="remark">
<a-textarea v-model:value="form.remark" :rows="4" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="附件" name="attachment">
<a-upload
v-model:file-list="form.attachment"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
>
<a-button type="primary"> 上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-modal>
</template>
<script>
import { reactive, ref } from 'vue';
export default {
setup() {
const title = ref('新增');
const visible = ref(false);
const form = reactive({
contractName: '',
contractCode: '',
contractParent: '',
contractType: '',
district: '',
contractPrice: '',
signDate: '',
contractDuration: [],
partyA: '',
partyAPerson: '',
partyB: '',
partyBPerson: '',
contractContent: '',
remark: '',
attachment: [],
});
//
const projectNameOptions = [
{
value: '1',
label: 'a',
},
{
value: '2',
label: 'b',
},
{
value: '3',
label: 'c',
},
];
const showModal = (type, id) => {
if (type == 1) {
title.value = '新增';
} else if (type == 2) {
title.value = '编辑';
console.log(id);
}
visible.value = true;
};
const handleOk = () => {
console.log('Form Data:', form);
//
visible.value = false;
};
return {
visible,
title,
form,
showModal,
handleOk,
projectNameOptions,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-modal-body {
max-width: 600px;
margin: 0 auto;
}
</style>

58
src/views/project/contractManage/api.ts

@ -0,0 +1,58 @@
import { ID, IDS, PageQuery, commonExport } from '@/api/base';
import { defHttp } from '@/utils/http/axios';
import { Dayjs } from 'dayjs';
enum Api {
root = '/workflow/leave',
list = '/workflow/leave/list',
export = '/workflow/leave/export',
}
export interface Leave {
id: string;
leaveType: string;
startDate: string;
endDate: string;
leaveDays: number;
remark: string;
processInstanceVo?: any;
dateTime?: [string, string] | [Dayjs, Dayjs];
}
export interface Resp {
createDept: number;
createBy: number;
createTime: string;
updateBy: number;
updateTime: string;
id: string;
leaveType: string;
startDate: string;
endDate: string;
leaveDays: number;
remark?: any;
}
export function list(params?: PageQuery) {
return defHttp.get<Leave[]>({ url: Api.list, params });
}
export function exportExcel(data: any) {
return commonExport(Api.export, data);
}
export function getInfo(id: ID) {
return defHttp.get<Leave>({ url: `${Api.root}/${id}` });
}
export function add(data: any) {
return defHttp.post<Resp>({ url: Api.root, data });
}
export function update(data: any) {
return defHttp.put<Resp>({ url: Api.root, data });
}
export function removeByIds(ids: IDS) {
return defHttp.deleteWithMsg<void>({ url: `${Api.root}/${ids.join(',')}` });
}

36
src/views/project/contractManage/data.ts

@ -0,0 +1,36 @@
import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
export const formSchemas: FormSchema[] = [
{
field: 'contractName',
label: '合同名称',
component: 'Input',
componentProps: {
placeholder: '请输入',
},
},
];
export const columns: BasicColumn[] = [
{
title: '合同编号',
dataIndex: 'contractCode',
},
{
title: '合同名称',
dataIndex: 'contractName',
},
{
title: '合同金额(万元)',
dataIndex: 'contractPrice',
},
{
title: '甲方单位',
dataIndex: 'partyA',
},
{
title: '乙方单位',
dataIndex: 'partyB',
},
];

164
src/views/project/contractManage/detailDrawer.vue

@ -0,0 +1,164 @@
<template>
<div>
<!-- 抽屉组件 -->
<a-drawer
title="合同详情"
placement="right"
:closable="true"
:open="visible"
@close="onClose"
width="600px"
>
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="详细信息">
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">合同编号</span>{{ detail.contractCode }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">合同名称</span>{{ detail.contractName }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">合同类型</span>{{ detail.contractType }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<div><span class="titleLabel">甲方单位</span>{{ detail.partyA }}</div>
</a-col>
<a-col :span="12">
<div><span class="titleLabel">甲方代表</span>{{ detail.partyAPerson }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<div><span class="titleLabel">乙方单位</span>{{ detail.partyB }}</div>
</a-col>
<a-col :span="12">
<div><span class="titleLabel">乙方代表</span>{{ detail.partyBPerson }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<div><span class="titleLabel">合同金额</span>{{ detail.contractPrice }}</div>
</a-col>
<a-col :span="12">
<div><span class="titleLabel">签订日期</span>{{ detail.signDate }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<div><span class="titleLabel">开始日期</span>{{ detail.startDate }}</div>
</a-col>
<a-col :span="12">
<div><span class="titleLabel">结束日期</span>{{ detail.endDate }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div
><span class="titleLabel">关联合同数量</span
>{{ detail.relatedContractAmount }}</div
>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">合同内容</span>{{ detail.contractContent }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">合同备注</span>{{ detail.remark }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">合同附件</span>{{ detail.attachment }}</div>
</a-col>
</a-row>
</a-tab-pane>
</a-tabs>
</a-drawer>
</div>
</template>
<script>
import { reactive, ref } from 'vue';
// import { getInfo } from './api';
export default {
setup() {
//
let detail = reactive({
contractCode: '',
contractName: '',
contractType: '',
partyA: '',
partyAPerson: '',
partyB: '',
contractPrice: '',
signDate: '',
startDate: '',
endDate: '',
relatedContractAmount: null,
contractContent: '',
remark: '',
attachment: [],
});
//
const visible = ref(false);
// const showDrawer = async(id) => {
// const data = await getInfo(id)
// for(let i in detail){
// detail[i] = data[i]
// }
// visible.value = true;
// console.log(detail)
// };
const showDrawer = () => {
visible.value = true;
};
//
const onClose = () => {
visible.value = false;
};
const activeKey = ref('1');
return {
visible,
showDrawer,
onClose,
activeKey,
detail,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-btn {
margin: 20px;
}
/* .singerDetail{
margin-bottom: 10px;
} */
div {
margin-bottom: 10px;
}
.timeText {
margin: 0 0 40px 20px;
color: red;
}
.titleLabel {
color: gray;
}
</style>

72
src/views/project/contractManage/index.vue

@ -0,0 +1,72 @@
<template>
<PageWrapper dense>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleAdd">新增</a-button>
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'">
<!-- <a-button type="link" @click="handleEdit(record.id)">编辑</a-button>
<a-button type="link" @click="handleDelete(record.id)">删除</a-button> -->
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
</template>
</BasicTable>
<detailDrawer ref="detailDrawerRef" />
<addModal ref="addModalRef" />
</PageWrapper>
</template>
<script setup lang="ts">
import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table';
import { list } from './api';
import { formSchemas, columns } from './data';
import detailDrawer from './detailDrawer.vue';
import { ref } from 'vue';
import addModal from './addModal.vue';
defineOptions({ name: 'ContractManage' });
const [registerTable] = useTable({
rowSelection: {
type: 'checkbox',
},
title: '合同管理',
api: list,
showIndexColumn: true,
rowKey: 'id',
useSearchForm: true,
formConfig: {
schemas: formSchemas,
name: 'contractManage',
baseColProps: {
xs: 24,
sm: 24,
md: 24,
lg: 6,
},
},
columns: columns,
actionColumn: {
width: 200,
title: '操作',
key: 'action',
fixed: 'right',
},
});
//
const detailDrawerRef = ref();
const handleDetail = () => {
detailDrawerRef.value.showDrawer();
};
//
const addModalRef = ref();
const handleAdd = () => {
addModalRef.value.showModal(1);
};
</script>
<style scoped></style>

180
src/views/project/projectManage/addModal.vue

@ -0,0 +1,180 @@
<template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%">
<a-form :model="form" layout="vertical">
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="所属合同" name="contractName">
<a-select
v-model:value="form.contractName"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="项目名称" name="projectName">
<a-input v-model:value="form.projectName" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="项目编号" name="projectCode">
<a-input v-model:value="form.projectCode" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="项目类别" name="projectType">
<a-select
v-model:value="form.projectType"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="故障大类" name="faultCategory">
<a-select
v-model:value="form.faultCategory"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="接单超期时间" name="orderTakingOverTime">
<a-input v-model:value="form.orderTakingOverTime" placeholder="接单超期时间(小时)" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="接单超期扣款" name="orderTakingCost">
<a-input v-model:value="form.orderTakingCost" placeholder="接单超期扣款(元/小时)" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="处理超期时间" name="handleOverTime">
<a-input v-model:value="form.handleOverTime" placeholder="处理超期时间(小时)" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="处理超期扣款" name="handleCost">
<a-input v-model:value="form.handleCost" placeholder="处理超期扣款(元/小时)" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="项目概要" name="projectContent">
<a-textarea v-model:value="form.projectContent" :rows="4" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="项目图标" name="icon">
<a-upload
v-model:file-list="form.icon"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
>
<a-button type="primary"> 上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="附件" name="attachment">
<a-upload
v-model:file-list="form.attachment"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
>
<a-button type="primary"> 上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-modal>
</template>
<script>
import { reactive, ref } from 'vue';
export default {
setup() {
const title = ref('新增');
const visible = ref(false);
const form = reactive({
contractName: '',
contractCode: '',
projectCode: '',
projectType: '',
faultCategory: '',
orderTakingOverTime: '',
orderTakingCost: '',
handleOverTime: '',
handleCost: '',
projectContent: '',
icon: [],
attachment: [],
});
//
const projectNameOptions = [
{
value: '1',
label: 'a',
},
{
value: '2',
label: 'b',
},
{
value: '3',
label: 'c',
},
];
const showModal = (type, id) => {
if (type == 1) {
title.value = '新增';
} else if (type == 2) {
title.value = '编辑';
console.log(id);
}
visible.value = true;
};
const handleOk = () => {
console.log('Form Data:', form);
//
visible.value = false;
};
return {
visible,
title,
form,
showModal,
handleOk,
projectNameOptions,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-modal-body {
max-width: 600px;
margin: 0 auto;
}
</style>

58
src/views/project/projectManage/api.ts

@ -0,0 +1,58 @@
import { ID, IDS, PageQuery, commonExport } from '@/api/base';
import { defHttp } from '@/utils/http/axios';
import { Dayjs } from 'dayjs';
enum Api {
root = '/workflow/leave',
list = '/workflow/leave/list',
export = '/workflow/leave/export',
}
export interface Leave {
id: string;
leaveType: string;
startDate: string;
endDate: string;
leaveDays: number;
remark: string;
processInstanceVo?: any;
dateTime?: [string, string] | [Dayjs, Dayjs];
}
export interface Resp {
createDept: number;
createBy: number;
createTime: string;
updateBy: number;
updateTime: string;
id: string;
leaveType: string;
startDate: string;
endDate: string;
leaveDays: number;
remark?: any;
}
export function list(params?: PageQuery) {
return defHttp.get<Leave[]>({ url: Api.list, params });
}
export function exportExcel(data: any) {
return commonExport(Api.export, data);
}
export function getInfo(id: ID) {
return defHttp.get<Leave>({ url: `${Api.root}/${id}` });
}
export function add(data: any) {
return defHttp.post<Resp>({ url: Api.root, data });
}
export function update(data: any) {
return defHttp.put<Resp>({ url: Api.root, data });
}
export function removeByIds(ids: IDS) {
return defHttp.deleteWithMsg<void>({ url: `${Api.root}/${ids.join(',')}` });
}

32
src/views/project/projectManage/data.ts

@ -0,0 +1,32 @@
import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
export const formSchemas: FormSchema[] = [
{
field: 'projectName',
label: '项目名称',
component: 'Input',
componentProps: {
placeholder: '请输入',
},
},
];
export const columns: BasicColumn[] = [
{
title: '项目编号',
dataIndex: 'projectCode',
},
{
title: '项目名称',
dataIndex: 'projectName',
},
{
title: '项目类别',
dataIndex: 'projectType',
},
{
title: '项目概要',
dataIndex: 'projectContent',
},
];

163
src/views/project/projectManage/detailDrawer.vue

@ -0,0 +1,163 @@
<template>
<div>
<!-- 抽屉组件 -->
<a-drawer
title="项目详情"
placement="right"
:closable="true"
:open="visible"
@close="onClose"
width="600px"
>
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="详细信息">
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">项目名称</span>{{ detail.projectName }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">所属合同</span>{{ detail.contractName }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">项目编号</span>{{ detail.projectCode }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">项目类别</span>{{ detail.projectType }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">项目故障大类</span>{{ detail.faultCategory }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div
><span class="titleLabel">接单超期时间</span>{{ detail.orderTakingOverTime }}</div
>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">接单超期扣款</span>{{ detail.orderTakingCost }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">处理超期时间</span>{{ detail.handleOverTime }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">处理超期扣款</span>{{ detail.handleCost }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div
><span class="titleLabel">关联项目数量</span
>{{ detail.relatedProjectAmount }}</div
>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">项目概要</span>{{ detail.projectContent }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">项目图标</span>{{ detail.icon }}</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">项目附件</span>{{ detail.attachment }}</div>
</a-col>
</a-row>
</a-tab-pane>
</a-tabs>
</a-drawer>
</div>
</template>
<script>
import { reactive, ref } from 'vue';
// import { getInfo } from './api';
export default {
setup() {
//
let detail = reactive({
projectName: '',
contractName: '',
projectCode: '',
projectType: '',
faultCategory: '',
orderTakingOverTime: '',
orderTakingCost: '',
handleOverTime: '',
handleCost: '',
relatedProjectAmount: null,
projectContent: '',
icon: '',
attachment: [],
});
//
const visible = ref(false);
// const showDrawer = async(id) => {
// const data = await getInfo(id)
// for(let i in detail){
// detail[i] = data[i]
// }
// visible.value = true;
// console.log(detail)
// };
const showDrawer = () => {
visible.value = true;
};
//
const onClose = () => {
visible.value = false;
};
const activeKey = ref('1');
return {
visible,
showDrawer,
onClose,
activeKey,
detail,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-btn {
margin: 20px;
}
/* .singerDetail{
margin-bottom: 10px;
} */
div {
margin-bottom: 10px;
}
.timeText {
margin: 0 0 40px 20px;
color: red;
}
.titleLabel {
color: gray;
}
</style>

74
src/views/project/projectManage/index.vue

@ -0,0 +1,74 @@
<template>
<PageWrapper dense>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleAdd">新增</a-button>
<a-button type="link" @click="handleDetail">详情</a-button>
<a-button type="primary" @click="handleAdd">配置人员</a-button>
<a-button type="primary" @click="handleAdd">配置服务目录</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'">
<!-- <a-button type="link" @click="handleEdit(record.id)">编辑</a-button>
<a-button type="link" @click="handleDelete(record.id)">删除</a-button> -->
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
</template>
</BasicTable>
<detailDrawer ref="detailDrawerRef" />
<addModal ref="addModalRef" />
</PageWrapper>
</template>
<script setup lang="ts">
import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table';
import { list } from './api';
import { formSchemas, columns } from './data';
import detailDrawer from './detailDrawer.vue';
import { ref } from 'vue';
import addModal from './addModal.vue';
defineOptions({ name: 'ProjectManage' });
const [registerTable] = useTable({
rowSelection: {
type: 'checkbox',
},
title: '项目管理',
api: list,
showIndexColumn: true,
rowKey: 'id',
useSearchForm: true,
formConfig: {
schemas: formSchemas,
name: 'projectManage',
baseColProps: {
xs: 24,
sm: 24,
md: 24,
lg: 6,
},
},
columns: columns,
actionColumn: {
width: 200,
title: '操作',
key: 'action',
fixed: 'right',
},
});
//
const detailDrawerRef = ref();
const handleDetail = () => {
detailDrawerRef.value.showDrawer();
};
//
const addModalRef = ref();
const handleAdd = () => {
addModalRef.value.showModal(1);
};
</script>
<style scoped></style>

220
src/views/project/serviceManage/addModal.vue

@ -0,0 +1,220 @@
<template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%">
<a-form :model="form" layout="vertical">
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="大类名称" name="largeTypeName">
<a-select
v-model:value="form.largeTypeName"
:options="statusOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="大类编号" name="largeTypeCode">
<a-input v-model:value="form.largeTypeCode" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="中类名称" name="middleTypeName">
<a-select
v-model:value="form.middleTypeName"
:options="statusOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="中类编号" name="middleTypeCode">
<a-input v-model:value="form.middleTypeCode" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="小类名称" name="smallTypeName">
<a-select
v-model:value="form.smallTypeName"
:options="statusOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="小类编号" name="smallTypeCode">
<a-input v-model:value="form.smallTypeCode" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="说明" name="description">
<a-textarea v-model:value="form.description" :rows="4" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="交付内容" name="deliverContent">
<a-input v-model:value="form.deliverContent" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="代码" name="code">
<a-input v-model:value="form.code" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="服务项目" name="serviceProject">
<a-select
v-model:value="form.serviceProject"
:options="statusOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="服务内容" name="serviceContent">
<a-textarea v-model:value="form.serviceContent" :rows="4" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="响应级别" name="responseLevel">
<a-input v-model:value="form.responseLevel" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="频率" name="frequnency">
<a-input
v-model:value="form.frequnency"
placeholder="单位数量"
style="width: 25%; margin-right: 10px"
/>
<a-select
v-model:value="form.frequnency"
:options="statusOptions"
placeholder="周期单位"
style="width: 25%; margin-right: 10px"
/>
<a-input
v-model:value="form.frequnency"
placeholder="周期次数"
style="width: 25%; margin-right: 10px"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="备注" name="remark">
<a-textarea v-model:value="form.remark" :rows="4" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="请求类型" name="responseType">
<a-input v-model:value="form.responseType" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="交付方式" name="deliverType">
<a-input v-model:value="form.deliverType" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="交付成果" name="deliverResult">
<a-textarea v-model:value="form.deliverResult" :rows="4" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-modal>
</template>
<script>
import { reactive, ref } from 'vue';
export default {
setup() {
const title = ref('新增');
const visible = ref(false);
const form = reactive({
largeTypeName: '',
largeTypeCode: '',
middleTypeName: '',
middleTypeCode: '',
smallTypeName: '',
smallTypeCode: '',
description: '',
deliverContent: '',
code: '',
serviceProject: '',
serviceContent: '',
responseLevel: '',
frequnency: '',
remark: '',
responseType: '',
deliverType: '',
deliverResult: '',
});
//
const statusOptions = [
{
value: 0,
label: '禁用',
},
{
value: 1,
label: '启用',
},
];
const showModal = (type, id) => {
if (type == 1) {
title.value = '新增';
} else if (type == 2) {
title.value = '编辑';
console.log(id);
}
visible.value = true;
};
const handleOk = () => {
console.log('Form Data:', form);
//
visible.value = false;
};
return {
visible,
title,
form,
showModal,
handleOk,
statusOptions,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-modal-body {
max-width: 600px;
margin: 0 auto;
}
</style>

132
src/views/project/serviceManage/addTypeModal.vue

@ -0,0 +1,132 @@
<template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%">
<a-form :model="form" layout="vertical">
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="新增类型" name="type">
<a-select v-model:value="form.type" :options="statusOptions" placeholder="请选择" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="大类名称" name="largeTypeName">
<a-select
v-model:value="form.largeTypeName"
:options="statusOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="大类编号" name="largeTypeCode">
<a-input v-model:value="form.largeTypeCode" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="中类名称" name="middleTypeName">
<a-select
v-model:value="form.middleTypeName"
:options="statusOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="中类编号" name="middleTypeCode">
<a-input v-model:value="form.middleTypeCode" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="小类名称" name="smallTypeName">
<a-select
v-model:value="form.smallTypeName"
:options="statusOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="小类编号" name="smallTypeCode">
<a-input v-model:value="form.smallTypeCode" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="说明" name="description">
<a-textarea v-model:value="form.description" :rows="4" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-modal>
</template>
<script>
import { reactive, ref } from 'vue';
export default {
setup() {
const title = ref('新增');
const visible = ref(false);
const form = reactive({
largeTypeName: '',
largeTypeCode: '',
middleTypeName: '',
middleTypeCode: '',
smallTypeName: '',
smallTypeCode: '',
description: '',
type: '',
});
//
const statusOptions = [
{
value: 0,
label: '禁用',
},
{
value: 1,
label: '启用',
},
];
const showModal = (type, id) => {
if (type == 1) {
title.value = '新增';
} else if (type == 2) {
title.value = '编辑';
console.log(id);
}
visible.value = true;
};
const handleOk = () => {
console.log('Form Data:', form);
//
visible.value = false;
};
return {
visible,
title,
form,
showModal,
handleOk,
statusOptions,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-modal-body {
max-width: 600px;
margin: 0 auto;
}
</style>

58
src/views/project/serviceManage/api.ts

@ -0,0 +1,58 @@
import { ID, IDS, PageQuery, commonExport } from '@/api/base';
import { defHttp } from '@/utils/http/axios';
import { Dayjs } from 'dayjs';
enum Api {
root = '/workflow/leave',
list = '/workflow/leave/list',
export = '/workflow/leave/export',
}
export interface Leave {
id: string;
leaveType: string;
startDate: string;
endDate: string;
leaveDays: number;
remark: string;
processInstanceVo?: any;
dateTime?: [string, string] | [Dayjs, Dayjs];
}
export interface Resp {
createDept: number;
createBy: number;
createTime: string;
updateBy: number;
updateTime: string;
id: string;
leaveType: string;
startDate: string;
endDate: string;
leaveDays: number;
remark?: any;
}
export function list(params?: PageQuery) {
return defHttp.get<Leave[]>({ url: Api.list, params });
}
export function exportExcel(data: any) {
return commonExport(Api.export, data);
}
export function getInfo(id: ID) {
return defHttp.get<Leave>({ url: `${Api.root}/${id}` });
}
export function add(data: any) {
return defHttp.post<Resp>({ url: Api.root, data });
}
export function update(data: any) {
return defHttp.put<Resp>({ url: Api.root, data });
}
export function removeByIds(ids: IDS) {
return defHttp.deleteWithMsg<void>({ url: `${Api.root}/${ids.join(',')}` });
}

52
src/views/project/serviceManage/data.ts

@ -0,0 +1,52 @@
import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
export const formSchemas: FormSchema[] = [
{
field: 'serviceContent',
label: '服务内容',
component: 'Input',
componentProps: {
placeholder: '请输入',
},
},
];
export const columns: BasicColumn[] = [
{
title: '交付内容',
dataIndex: 'deliverContent',
},
{
title: '服务项目',
dataIndex: 'serviceProject',
},
{
title: '代码',
dataIndex: 'code',
},
{
title: '服务内容',
dataIndex: 'serviceContent',
},
{
title: '相应级别',
dataIndex: 'responseLevel',
},
{
title: '服务频率',
dataIndex: 'frequency',
},
{
title: '请求类型',
dataIndex: 'responseType',
},
{
title: '交付方式',
dataIndex: 'deliverType',
},
{
title: '交付成果',
dataIndex: 'deliverResult',
},
];

191
src/views/project/serviceManage/index.vue

@ -0,0 +1,191 @@
<template>
<PageWrapper dense>
<a-row>
<a-col :span="8" style="margin-top: 1%">
<div>
<a-button type="primary" @click="handleAdd" size="small" class="treeButton"
>新增目录</a-button
>
<a-button type="primary" @click="handleAdd" size="small" class="treeButton"
>编辑目录</a-button
>
<a-button type="primary" @click="handleAdd" size="small" class="treeButton"
>删除目录</a-button
>
<a-button type="primary" @click="handleAdd" size="small" class="treeButton"
>导入</a-button
>
</div>
<a-tree
:show-line="true"
:show-icon="true"
:depoint-expanded-keys="['0-0-0']"
:tree-data="treeData"
@select="onSelect"
>
<template #title="{ dataRef }">
<template v-if="dataRef.key === '0-0-0-1'">
<div>multiple line title</div>
<div>multiple line title</div>
</template>
<template v-else>{{ dataRef.title }}</template>
</template>
</a-tree>
</a-col>
<a-col :span="16">
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleAdd">新增协议</a-button>
<a-button type="primary" @click="handleTypeAdd">新增类型</a-button>
<a-button type="primary" @click="handleAdd">导入</a-button>
<a-button type="primary" @click="handleAdd">导出</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'">
<a-button type="link" @click="handleEdit(record.id)">编辑</a-button>
<a-button type="link" @click="handleDelete(record.id)">删除</a-button>
</template>
</template>
</BasicTable>
<addModal ref="addModalRef" />
<AddTypeModal ref="addTypeModalRef" />
</a-col>
</a-row>
</PageWrapper>
</template>
<script setup lang="ts">
import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table';
import { list } from './api';
import { formSchemas, columns } from './data';
import addModal from './addModal.vue';
import { ref } from 'vue';
import AddTypeModal from './addTypeModal.vue';
defineOptions({ name: 'ServiceManage' });
const [registerTable, { reload }] = useTable({
rowSelection: {
type: 'checkbox',
},
title: '服务管理',
api: list,
showIndexColumn: true,
rowKey: 'id',
useSearchForm: true,
formConfig: {
schemas: formSchemas,
name: 'serviceManage',
baseColProps: {
xs: 24,
sm: 24,
md: 24,
lg: 6,
},
},
columns: columns,
actionColumn: {
width: 200,
title: '操作',
key: 'action',
fixed: 'right',
},
});
//
const addModalRef = ref();
const handleAdd = () => {
addModalRef.value.showModal(1);
};
const handleEdit = (id: any) => {
addModalRef.value.showModal(2, id);
};
const handleDelete = (id: any) => {
addModalRef.value.showModal(2, id);
};
//
const addTypeModalRef = ref();
const handleTypeAdd = () => {
addTypeModalRef.value.showModal(1);
};
//tree
const treeData = ref([
{
title: 'parent 1',
key: '0-0',
children: [
{
title: 'parent 1-0',
key: '0-0-0',
children: [
{
title: 'leaf',
key: '0-0-0-0',
},
{
key: '0-0-0-1',
},
{
title: 'leaf',
key: '0-0-0-2',
},
],
},
{
title: 'parent 1-1',
key: '0-0-1',
children: [
{
title: 'leaf',
key: '0-0-1-0',
},
],
},
{
title: 'parent 1-2',
key: '0-0-2',
children: [
{
title: 'leaf 1',
key: '0-0-2-0',
},
{
title: 'leaf 2',
key: '0-0-2-1',
},
],
},
],
},
{
title: 'parent 2',
key: '0-1',
children: [
{
title: 'parent 2-0',
key: '0-1-0',
children: [
{
title: 'leaf',
key: '0-1-0-0',
},
{
title: 'leaf',
key: '0-1-0-1',
},
],
},
],
},
]);
const onSelect = (selectedKeys: any, info: any) => {
console.log('selected', selectedKeys, info);
reload();
};
</script>
<style scoped>
.treeButton {
margin: 0 1% 1%;
}
</style>

1
src/views/property/meterial/addModal.vue

@ -59,7 +59,6 @@
export default {
setup() {
//
const title = ref('新增');
const visible = ref(false);
const form = reactive({

5
src/views/property/meterial/index.vue

@ -9,7 +9,6 @@
:tree-data="treeData"
@select="onSelect"
>
<template #icon><carry-out-outlined /></template>
<template #title="{ dataRef }">
<template v-if="dataRef.key === '0-0-0-1'">
<div>multiple line title</div>
@ -17,10 +16,6 @@
</template>
<template v-else>{{ dataRef.title }}</template>
</template>
<template #switcherIcon="{ dataRef, depointIcon }">
<SmileTwoTone v-if="dataRef.key === '0-0-2'" />
<component :is="depointIcon" v-else />
</template>
</a-tree>
</a-col>
<a-col :span="20">

1
src/views/property/point/addModal.vue

@ -60,7 +60,6 @@
export default {
setup() {
//
const title = ref('新增');
const visible = ref(false);
const form = reactive({

2
src/views/property/point/detailDrawer.vue

@ -2,7 +2,7 @@
<div>
<!-- 抽屉组件 -->
<a-drawer
title="巡检详情"
title="详情"
placement="right"
:closable="true"
:open="visible"

12
src/views/property/point/index.vue

@ -9,7 +9,6 @@
:tree-data="treeData"
@select="onSelect"
>
<template #icon><carry-out-outlined /></template>
<template #title="{ dataRef }">
<template v-if="dataRef.key === '0-0-0-1'">
<div>multiple line title</div>
@ -17,24 +16,21 @@
</template>
<template v-else>{{ dataRef.title }}</template>
</template>
<template #switcherIcon="{ dataRef, depointIcon }">
<SmileTwoTone v-if="dataRef.key === '0-0-2'" />
<component :is="depointIcon" v-else />
</template>
</a-tree>
</a-col>
<a-col :span="20">
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleAdd">新增</a-button>
<a-button type="primary" @click="goDetail">导入</a-button>
<a-button type="primary" @click="handleDetail">导入</a-button>
<a-button type="primary" @click="showpointModal">点位上报</a-button>
<a-button type="primary" @click="goDetail">点位导出</a-button>
<a-button type="primary" @click="handleDetail">点位导出</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'">
<a-button type="link" @click="handleEdit(record.id)">编辑</a-button>
<a-button type="link" @click="handleDelete(record.id)">删除</a-button>
<a-button type="link" @click="handleDetail">详情</a-button>
</template>
</template>
</BasicTable>
@ -178,7 +174,7 @@
};
//
const detailDrawerRef = ref();
const goDetail = () => {
const handleDetail = () => {
detailDrawerRef.value.showDrawer();
};
</script>

13
src/views/property/point/pointModal.vue

@ -66,6 +66,18 @@
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="故障图片" name="faultImg">
<a-upload
v-model:file-list="form.faultImg"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
>
<a-button type="primary"> 上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="是否派遣" name="isDispatched">
@ -112,6 +124,7 @@
institution: '',
faultLocation: '',
faultDescription: '',
faultImg: [],
isDispatched: null,
maintenanceRequirement: '',
dispatchOpinion: '',

242
src/views/property/propertyList/addModal.vue

@ -3,50 +3,192 @@
<a-form :model="form" layout="vertical">
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="名称" name="name">
<a-input v-model:value="form.name" placeholder="请输入" />
<a-form-item label="项目名称" name="projectName">
<a-select
v-model:value="form.projectName"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="状态" name="status">
<a-select v-model:value="form.status" :options="statusOptions" placeholder="请选择" />
<a-form-item label="所属机构" name="institution">
<a-select
v-model:value="form.institution"
:options="projectNameOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="规格" name="standards">
<a-col :span="12">
<a-form-item label="资产名称" name="propertyName">
<a-input v-model:value="form.propertyName" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="规格参数" name="standards">
<a-input v-model:value="form.standards" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="单价(元)" name="price">
<a-input v-model:value="form.price" placeholder="请输入" />
<a-form-item label="资产编号" name="propertyCode">
<a-input v-model:value="form.propertyCode" placeholder="请输入" /><a-button
type="primary"
style="margin-top: 10px"
>随机生成</a-button
>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="数量" name="amount">
<a-input v-model:value="form.amount" placeholder="请输入" />
<a-col :span="12">
<a-form-item label="生产厂家" name="manufacturer">
<a-input v-model:value="form.manufacturer" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="合同价" name="contractPrice">
<a-input v-model:value="form.contractPrice" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="安装状态" name="installStatus">
<a-select
v-model:value="form.installStatus"
:options="installStatusOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="安装方式" name="installType">
<a-select
v-model:value="form.installType"
:options="installTypeOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="单位" name="unit">
<a-input v-model:value="form.unit" placeholder="请输入" />
<a-form-item label="安装地点" name="installAddress">
<a-select
v-model:value="form.installAddress"
:options="installAddressOptions"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="备注" name="remark">
<a-textarea v-model:value="form.remark" :rows="4" placeholder="请输入" />
<a-form-item label="关联资产" name="relatedProperty">
<a-input v-model:value="form.relatedProperty" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="产权单位" name="propertyUnit">
<a-input v-model:value="form.propertyUnit" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="配置信息" name="assets">
<a-input v-model:value="form.assets" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="建设项目" name="buildProject">
<a-input v-model:value="form.buildProject" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="建设日期" name="buildDate">
<a-date-picker v-model:value="form.buildDate" placeholder="请选择" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="责任人" name="responsibilityPerson">
<a-input v-model:value="form.responsibilityPerson" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="入库日期" name="inDate">
<a-date-picker v-model:value="form.inDate" placeholder="请选择" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="出库日期" name="outDate">
<a-date-picker v-model:value="form.outDate" placeholder="请选择" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="经办人" name="handler">
<a-input v-model:value="form.handler" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="安装/建设单位" name="buildUnit">
<a-input v-model:value="form.buildUnit" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="联系单位" name="contactUnit">
<a-input v-model:value="form.contactUnit" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="验收通过日期" name="passDate">
<a-date-picker v-model:value="form.passDate" placeholder="请选择" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="资产移交日期" name="transferDate">
<a-date-picker v-model:value="form.transferDate" placeholder="请选择" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="维护单位" name="serviceUnit">
<a-input v-model:value="form.serviceUnit" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="联系方式" name="contactType">
<a-input v-model:value="form.contactType" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="维护日期始" name="serviceStartDate">
<a-date-picker v-model:value="form.serviceStartDate" placeholder="请选择" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="维护日期止" name="serviceEndDate">
<a-date-picker v-model:value="form.serviceEndDate" placeholder="请选择" />
</a-form-item>
</a-col>
</a-row>
@ -59,20 +201,69 @@
export default {
setup() {
//
const title = ref('新增');
const visible = ref(false);
const form = reactive({
name: '',
status: null,
remark: '',
unit: '',
price: '',
amount: '',
projectName: '',
institution: null,
propertyName: '',
standards: '',
propertyCode: '',
manufacturer: '',
contractPrice: '',
installStatus: '',
installType: '',
installAddress: '',
relatedProperty: '',
propertyUnit: '',
assets: '',
buildProject: '',
buildDate: '',
responsibilityPerson: '',
inDate: '',
outDate: '',
handler: '',
buildUnit: '',
contactUnit: '',
passDate: '',
transferDate: '',
serviceUnit: '',
contactType: '',
serviceStartDate: '',
serviceEndDate: '',
});
//
const statusOptions = [
const projectNameOptions = [
{
value: 0,
label: '禁用',
},
{
value: 1,
label: '启用',
},
];
const installStatusOptions = [
{
value: 0,
label: '禁用',
},
{
value: 1,
label: '启用',
},
];
const installTypeOptions = [
{
value: 0,
label: '禁用',
},
{
value: 1,
label: '启用',
},
];
const installAddressOptions = [
{
value: 0,
label: '禁用',
@ -104,7 +295,10 @@
form,
showModal,
handleOk,
statusOptions,
projectNameOptions,
installAddressOptions,
installTypeOptions,
installStatusOptions,
};
},
};

5
src/views/property/propertyList/index.vue

@ -9,7 +9,6 @@
:tree-data="treeData"
@select="onSelect"
>
<template #icon><carry-out-outlined /></template>
<template #title="{ dataRef }">
<template v-if="dataRef.key === '0-0-0-1'">
<div>multiple line title</div>
@ -17,10 +16,6 @@
</template>
<template v-else>{{ dataRef.title }}</template>
</template>
<template #switcherIcon="{ dataRef, depointIcon }">
<SmileTwoTone v-if="dataRef.key === '0-0-2'" />
<component :is="depointIcon" v-else />
</template>
</a-tree>
</a-col>
<a-col :span="20">

Loading…
Cancel
Save