Browse Source

成绩查询

ops-management-platform-frontend-dev
wbc 2 months ago
parent
commit
9ceded234d
  1. 98
      src/views/IO/delayPatrol/waitAudit/faultModal.vue
  2. 99
      src/views/IO/delayPatrol/waitPatrol/faultModal.vue
  3. 6
      src/views/IO/patrol/patroling/data.ts
  4. 21
      src/views/IO/workOrder/orderSend/api.ts
  5. 3
      src/views/IO/workOrder/orderSend/data.ts
  6. 260
      src/views/IO/workOrder/orderSend/faultModal.vue
  7. 1
      src/views/IO/workOrder/orderSend/index.vue
  8. 2
      src/views/analysis/faultNum/data.ts
  9. 2
      src/views/analysis/resAndFix/data.ts
  10. 121
      src/views/project/IOCheck/checkManage/addModal.vue
  11. 55
      src/views/project/IOCheck/checkManage/api.ts
  12. 8
      src/views/project/IOCheck/checkManage/data.ts
  13. 18
      src/views/project/IOCheck/checkManage/index.vue
  14. 109
      src/views/project/IOCheck/checkRating/addModal.vue
  15. 75
      src/views/project/IOCheck/checkRating/api.ts
  16. 87
      src/views/project/IOCheck/checkRating/checkConfig.vue
  17. 12
      src/views/project/IOCheck/checkRating/data.ts
  18. 35
      src/views/project/IOCheck/checkRating/index.vue
  19. 87
      src/views/project/IOCheck/checkRating/ratingModal.vue
  20. 23
      src/views/project/IOCheck/ratingSearch/api.ts
  21. 30
      src/views/project/IOCheck/ratingSearch/data.ts
  22. 40
      src/views/project/IOCheck/ratingSearch/detailDrawer.vue
  23. 42
      src/views/project/IOCheck/ratingSearch/index.vue
  24. 4
      src/views/project/contractManage/addModal.vue
  25. 74
      src/views/property/point/pointModal.vue

98
src/views/IO/delayPatrol/waitAudit/faultModal.vue

@ -1,6 +1,6 @@
<template> <template>
<a-modal v-model:open="visible" title="工单上报" @ok="handleOk" width="70%"> <a-modal v-model:open="visible" title="工单上报" @ok="handleOk" width="70%" @cancel="closeModal">
<a-form :model="form" layout="vertical"> <a-form :model="form" layout="vertical" ref="formRef" :rules="rules">
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="所属项目" name="projectName"> <a-form-item label="所属项目" name="projectName">
@ -52,12 +52,12 @@
</a-row> </a-row>
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="响应级别"> <a-form-item label="响应级别" name="responseLevel">
<a-select v-model:value="form.responseLevel" :options="responseLevelOptions" /> <a-select v-model:value="form.responseLevel" :options="responseLevelOptions" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="响应时限"> <a-form-item label="响应时限" name="responseTime">
<a-input v-model:value="form.responseTime" /> <a-input v-model:value="form.responseTime" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -164,7 +164,14 @@
<script> <script>
import { reactive, ref } from 'vue'; import { reactive, ref } from 'vue';
import { getInfo, getSubcategoryType, workOrderAdd,getProjectInfo,getOrganizationType,getContractNamesByProjectName} from './api'; import {
getInfo,
getSubcategoryType,
workOrderAdd,
getProjectInfo,
getOrganizationType,
getContractNamesByProjectName,
} from './api';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
export default { export default {
@ -172,7 +179,7 @@
const visible = ref(false); const visible = ref(false);
const form = reactive({ const form = reactive({
projectName: '', projectName: '',
contractName:null, contractName: null,
isAccident: null, isAccident: null,
repairer: '', repairer: '',
responseTime: '', responseTime: '',
@ -190,21 +197,21 @@
latitude: '', latitude: '',
}); });
// //
const projectNameOptions = ref([]) const projectNameOptions = ref([]);
const getProjectNameOptions= async () =>{ const getProjectNameOptions = async () => {
const res = await getProjectInfo(); const res = await getProjectInfo();
projectNameOptions.value = res projectNameOptions.value = res;
} };
const projectNameChange = async(val) =>{ const projectNameChange = async (val) => {
const res = await getContractNamesByProjectName({projectName:val}) const res = await getContractNamesByProjectName({ projectName: val });
contractNameOptions.value = res contractNameOptions.value = res;
} };
const contractNameOptions = ref([]) const contractNameOptions = ref([]);
const organizationNameOptions = ref([]) const organizationNameOptions = ref([]);
const getOrganizationNameOptions= async () =>{ const getOrganizationNameOptions = async () => {
const res = await getOrganizationType(); const res = await getOrganizationType();
organizationNameOptions.value = res.rows organizationNameOptions.value = res.rows;
} };
const responseLevelOptions = [ const responseLevelOptions = [
{ {
value: 0, value: 0,
@ -249,8 +256,8 @@
const obj = faultLocationOptions.find((i) => { const obj = faultLocationOptions.find((i) => {
return (i.value = val); return (i.value = val);
}); });
form.longitude = obj.longitude form.longitude = obj.longitude;
form.latitude = obj.latitude form.latitude = obj.latitude;
initMap(obj.longitude, obj.latitude, obj.organizationName); initMap(obj.longitude, obj.latitude, obj.organizationName);
}; };
const faultSubcategoryOptions = ref([]); const faultSubcategoryOptions = ref([]);
@ -260,19 +267,23 @@
}; };
const showModal = () => { const showModal = () => {
visible.value = true; visible.value = true;
getFaultSubcategoryOptions() getFaultSubcategoryOptions();
getProjectNameOptions() getProjectNameOptions();
getOrganizationNameOptions() getOrganizationNameOptions();
}; };
const handleOk = () => { const handleOk = () => {
let params = {}; formRef.value.validate().then((valid) => {
for (let i in form) { if (valid) {
params[i] = form[i]; let params = {};
} for (let i in form) {
workOrderAdd(params).then((_) => { params[i] = form[i];
message.success('操作成功'); }
visible.value = false; workOrderAdd(params).then((_) => {
message.success('操作成功');
closeModal()
});
}
}); });
}; };
// //
@ -303,6 +314,26 @@
console.error('加载高德地图失败:', error); console.error('加载高德地图失败:', error);
} }
}; };
const closeModal = () => {
formRef.value.resetFields();
visible.value = false;
map.value.destroy()
};
const formRef = ref();
const rules = {
projectName: [{ required: true, message: '请选择' }],
contractName: [{ required: true, message: '请选择' }],
isAccident: [{ required: true, message: '请选择' }],
repairer: [{ required: true, message: '请输入' }],
faultLocation: [{ required: true, message: '请输入' }],
organizationName: [{ required: true, message: '请选择' }],
responseTime: [{ required: true, message: '请输入' }],
responseLevel: [{ required: true, message: '请选择' }],
faultCategory: [{ required: true, message: '请选择' }],
faultSubcategory: [{ required: true, message: '请选择' }],
faultDescription:[{ required: true, message: '请输入' }],
isDispatched: [{ required: true, message: '请选择' }],
};
return { return {
visible, visible,
form, form,
@ -316,7 +347,10 @@
contractNameOptions, contractNameOptions,
organizationNameOptions, organizationNameOptions,
faultLocationChange, faultLocationChange,
projectNameChange projectNameChange,
closeModal,
formRef,
rules,
}; };
}, },
}; };

99
src/views/IO/delayPatrol/waitPatrol/faultModal.vue

@ -1,6 +1,6 @@
<template> <template>
<a-modal v-model:open="visible" title="工单上报" @ok="handleOk" width="70%"> <a-modal v-model:open="visible" title="工单上报" @ok="handleOk" width="70%" @cancel="closeModal">
<a-form :model="form" layout="vertical"> <a-form :model="form" layout="vertical" ref="formRef" :rules="rules">
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="所属项目" name="projectName"> <a-form-item label="所属项目" name="projectName">
@ -52,12 +52,12 @@
</a-row> </a-row>
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="响应级别"> <a-form-item label="响应级别" name="responseLevel">
<a-select v-model:value="form.responseLevel" :options="responseLevelOptions" /> <a-select v-model:value="form.responseLevel" :options="responseLevelOptions" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="响应时限"> <a-form-item label="响应时限" name="responseTime">
<a-input v-model:value="form.responseTime" /> <a-input v-model:value="form.responseTime" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -164,7 +164,14 @@
<script> <script>
import { reactive, ref } from 'vue'; import { reactive, ref } from 'vue';
import { getInfo, getSubcategoryType, workOrderAdd,getProjectInfo,getOrganizationType,getContractNamesByProjectName} from './api'; import {
getInfo,
getSubcategoryType,
workOrderAdd,
getProjectInfo,
getOrganizationType,
getContractNamesByProjectName,
} from './api';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
export default { export default {
@ -172,7 +179,7 @@
const visible = ref(false); const visible = ref(false);
const form = reactive({ const form = reactive({
projectName: '', projectName: '',
contractName:null, contractName: null,
isAccident: null, isAccident: null,
repairer: '', repairer: '',
responseTime: '', responseTime: '',
@ -190,22 +197,21 @@
latitude: '', latitude: '',
}); });
// //
const projectNameOptions = ref([]) const projectNameOptions = ref([]);
const getProjectNameOptions= async () =>{ const getProjectNameOptions = async () => {
const res = await getProjectInfo(); const res = await getProjectInfo();
projectNameOptions.value = res projectNameOptions.value = res;
} };
const projectNameChange = async(val) =>{ const projectNameChange = async (val) => {
const res = await getContractNamesByProjectName({projectName:val}) const res = await getContractNamesByProjectName({ projectName: val });
contractNameOptions.value = res contractNameOptions.value = res;
} };
const contractNameOptions = ref([]) const contractNameOptions = ref([]);
const organizationNameOptions = ref([]);
const organizationNameOptions = ref([]) const getOrganizationNameOptions = async () => {
const getOrganizationNameOptions= async () =>{
const res = await getOrganizationType(); const res = await getOrganizationType();
organizationNameOptions.value = res.rows organizationNameOptions.value = res.rows;
} };
const responseLevelOptions = [ const responseLevelOptions = [
{ {
value: 0, value: 0,
@ -250,8 +256,8 @@
const obj = faultLocationOptions.find((i) => { const obj = faultLocationOptions.find((i) => {
return (i.value = val); return (i.value = val);
}); });
form.longitude = obj.longitude form.longitude = obj.longitude;
form.latitude = obj.latitude form.latitude = obj.latitude;
initMap(obj.longitude, obj.latitude, obj.organizationName); initMap(obj.longitude, obj.latitude, obj.organizationName);
}; };
const faultSubcategoryOptions = ref([]); const faultSubcategoryOptions = ref([]);
@ -261,19 +267,23 @@
}; };
const showModal = () => { const showModal = () => {
visible.value = true; visible.value = true;
getFaultSubcategoryOptions() getFaultSubcategoryOptions();
getProjectNameOptions() getProjectNameOptions();
getOrganizationNameOptions() getOrganizationNameOptions();
}; };
const handleOk = () => { const handleOk = () => {
let params = {}; formRef.value.validate().then((valid) => {
for (let i in form) { if (valid) {
params[i] = form[i]; let params = {};
} for (let i in form) {
workOrderAdd(params).then((_) => { params[i] = form[i];
message.success('操作成功'); }
visible.value = false; workOrderAdd(params).then((_) => {
message.success('操作成功');
closeModal()
});
}
}); });
}; };
// //
@ -304,6 +314,26 @@
console.error('加载高德地图失败:', error); console.error('加载高德地图失败:', error);
} }
}; };
const closeModal = () => {
formRef.value.resetFields();
visible.value = false;
map.value.destroy()
};
const formRef = ref();
const rules = {
projectName: [{ required: true, message: '请选择' }],
contractName: [{ required: true, message: '请选择' }],
isAccident: [{ required: true, message: '请选择' }],
repairer: [{ required: true, message: '请输入' }],
faultLocation: [{ required: true, message: '请输入' }],
organizationName: [{ required: true, message: '请选择' }],
responseTime: [{ required: true, message: '请输入' }],
responseLevel: [{ required: true, message: '请选择' }],
faultCategory: [{ required: true, message: '请选择' }],
faultSubcategory: [{ required: true, message: '请选择' }],
faultDescription:[{ required: true, message: '请输入' }],
isDispatched: [{ required: true, message: '请选择' }],
};
return { return {
visible, visible,
form, form,
@ -317,7 +347,10 @@
contractNameOptions, contractNameOptions,
organizationNameOptions, organizationNameOptions,
faultLocationChange, faultLocationChange,
projectNameChange projectNameChange,
closeModal,
formRef,
rules,
}; };
}, },
}; };

6
src/views/IO/patrol/patroling/data.ts

@ -15,9 +15,13 @@ export const formSchemas: FormSchema[] = [
componentProps: {}, componentProps: {},
}, },
{ {
field: 'plaDate', field: '[startDate, endDate]',
label: '计划日期', label: '计划日期',
component: 'RangePicker', component: 'RangePicker',
componentProps: {
format: 'YYYY-MM-DD',
valueFormat:'YYYY-MM-DD'
},
}, },
{ {
field: 'progress', field: 'progress',

21
src/views/IO/workOrder/orderSend/api.ts

@ -5,6 +5,11 @@ enum Api {
root = '/platform/workOrder', root = '/platform/workOrder',
list = '/platform/workOrder/list', list = '/platform/workOrder/list',
export = '/workflow/leave/export', export = '/workflow/leave/export',
getSubcategoryType = '/platform/subcategoryType/list',
workOrderAdd = '/platform/workOrder/add',
getProjectInfo = '/platform/projectInfo/getNames',
getOrganizationType = '/platform/organizationType/list',
getContractNamesByProjectName = '/platform/contractInfo/getContractNamesByProjectName',
} }
export function list(params?: PageQuery) { export function list(params?: PageQuery) {
@ -30,3 +35,19 @@ export function update(data: any) {
export function removeByIds(ids: any) { export function removeByIds(ids: any) {
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` });
} }
export function getSubcategoryType() {
return defHttp.get({ url: Api.getSubcategoryType });
}
export function workOrderAdd(data: any) {
return defHttp.post({ url: Api.workOrderAdd, data });
}
export function getProjectInfo() {
return defHttp.get({ url: Api.getProjectInfo });
}
export function getOrganizationType() {
return defHttp.get({ url: Api.getOrganizationType });
}
export function getContractNamesByProjectName(data:any) {
return defHttp.post({ url: Api.getContractNamesByProjectName,data });
}

3
src/views/IO/workOrder/orderSend/data.ts

@ -89,5 +89,8 @@ export const columns: BasicColumn[] = [
{ {
title: '当前状态', title: '当前状态',
dataIndex: 'status', dataIndex: 'status',
customRender: ({ value }) => {
return value == 0 ? '启用' : '禁用';
},
}, },
]; ];

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

@ -1,6 +1,6 @@
<template> <template>
<a-modal v-model:open="visible" title="工单上报" @ok="handleOk" width="70%"> <a-modal v-model:open="visible" title="工单上报" @ok="handleOk" width="70%" @cancel="closeModal">
<a-form :model="form" layout="vertical"> <a-form :model="form" layout="vertical" ref="formRef" :rules="rules">
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="所属项目" name="projectName"> <a-form-item label="所属项目" name="projectName">
@ -8,6 +8,29 @@
v-model:value="form.projectName" v-model:value="form.projectName"
:options="projectNameOptions" :options="projectNameOptions"
placeholder="请选择" placeholder="请选择"
@change="projectNameChange"
:fieldNames="{
label: 'projectName',
value: 'projectName',
options: 'options',
}"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="所属合同" name="contractName">
<a-select
v-model:value="form.contractName"
:options="contractNameOptions"
placeholder="请选择"
:disabled="!form.projectName"
:fieldNames="{
label: 'contractName',
value: 'contractName',
options: 'options',
}"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -23,23 +46,19 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="报修人员" name="repairer"> <a-form-item label="报修人员" name="repairer">
<a-input v-model:value="form.repairer" placeholder="请输入" /> <a-input v-model:value="form.repairer" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="响应级别"> <a-form-item label="响应级别" name="responseLevel">
<a-select <a-select v-model:value="form.responseLevel" :options="responseLevelOptions" />
v-model:value="form.responseLevel"
:options="responseLevelOptions"
placeholder="请选择"
/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="响应时限"> <a-form-item label="响应时限" name="responseTime">
<a-input v-model:value="form.responseTime" placeholder="请输入" /> <a-input v-model:value="form.responseTime" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -48,8 +67,7 @@
<a-form-item label="故障大类" name="faultCategory"> <a-form-item label="故障大类" name="faultCategory">
<a-select <a-select
v-model:value="form.faultCategory" v-model:value="form.faultCategory"
:options="[{ value: '前端' }]" :options="[{ value: '前端' }, { value: '后端' }]"
placeholder="请选择"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -58,31 +76,48 @@
<a-select <a-select
v-model:value="form.faultSubcategory" v-model:value="form.faultSubcategory"
:options="faultSubcategoryOptions" :options="faultSubcategoryOptions"
placeholder="请选择" :fieldNames="{
label: 'typeName',
value: 'id',
options: 'options',
}"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="故障机构" name="institution"> <a-form-item label="所属机构" name="organizationName">
<a-select <a-select
v-model:value="form.institution" v-model:value="form.organizationName"
:options="institutionOptions" :options="organizationNameOptions"
placeholder="请选择" :fieldNames="{
label: 'organizationName',
value: 'organizationName',
options: 'options',
}"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="故障地点" name="faultLocation"> <a-form-item label="故障地点" name="faultLocation">
<a-input v-model:value="form.faultLocation" placeholder="请输入" /> <a-select
v-model:value="form.faultLocation"
:options="faultLocationOptions"
@change="faultLocationChange"
/>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </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-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="故障描述" name="faultDescription"> <a-form-item label="故障描述" name="faultDescription">
<a-textarea v-model:value="form.faultDescription" :rows="4" placeholder="请输入" /> <a-textarea v-model:value="form.faultDescription" :rows="4" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -112,7 +147,6 @@
<a-select <a-select
v-model:value="form.maintenanceRequirement" v-model:value="form.maintenanceRequirement"
:options="maintenanceRequirementOptions" :options="maintenanceRequirementOptions"
placeholder="请选择"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -120,43 +154,64 @@
<a-row :gutter="[16, 16]" v-if="form.isDispatched == 1"> <a-row :gutter="[16, 16]" v-if="form.isDispatched == 1">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="派遣意见" name="dispatchOpinion"> <a-form-item label="派遣意见" name="dispatchOpinion">
<a-textarea v-model:value="form.dispatchOpinion" :rows="4" placeholder="请输入" /> <a-textarea v-model:value="form.dispatchOpinion" :rows="4" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </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-form>
</a-modal> </a-modal>
</template> </template>
<script> <script>
import { reactive, ref } from 'vue'; import { reactive, ref } from 'vue';
import {
getInfo,
getSubcategoryType,
workOrderAdd,
getProjectInfo,
getOrganizationType,
getContractNamesByProjectName,
} from './api';
import { message } from 'ant-design-vue';
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
export default { export default {
setup() { setup() {
const visible = ref(false); const visible = ref(false);
const form = reactive({ const form = reactive({
projectName: '', projectName: '',
contractName: null,
isAccident: null, isAccident: null,
repairer: '', repairer: '',
responseTime: '', responseTime: '',
responseLevel: '', responseLevel: '',
faultCategory: '', faultCategory: null,
faultSubcategory: '', faultSubcategory: null,
institution: '', organizationName: '',
faultLocation: '', faultLocation: '',
faultDescription: '', faultDescription: '',
faultImg: [], faultImg: null,
isDispatched: null, isDispatched: null,
maintenanceRequirement: '', maintenanceRequirement: null,
dispatchOpinion: '', dispatchOpinion: '',
longitude: '',
latitude: '',
}); });
// //
const projectNameOptions = ref([]);
const getProjectNameOptions = async () => {
const res = await getProjectInfo();
projectNameOptions.value = res;
};
const projectNameChange = async (val) => {
const res = await getContractNamesByProjectName({ projectName: val });
contractNameOptions.value = res;
};
const contractNameOptions = ref([]);
const organizationNameOptions = ref([]);
const getOrganizationNameOptions = async () => {
const res = await getOrganizationType();
organizationNameOptions.value = res.rows;
};
const responseLevelOptions = [ const responseLevelOptions = [
{ {
value: 0, value: 0,
@ -172,114 +227,113 @@
}, },
]; ];
const maintenanceRequirementOptions = [ const maintenanceRequirementOptions = [
{
value: 0,
label: '常规',
},
{
value: 1,
label: '紧急',
},
{
value: 2,
label: '特级',
},
];
const institutionOptions = [
{
value: 0,
label: '常规',
},
{ {
value: 1, value: 1,
label: '紧急', label: '新增',
},
{
value: 2,
label: '特级',
}, },
]; ];
const faultSubcategoryOptions = [ const faultLocationOptions = [
{
value: 0,
label: '常规',
},
{
value: 1,
label: '紧急',
},
{
value: 2,
label: '特级',
},
];
const projectNameOptions = [
{ {
value: '1', value: '1',
label: 'a', label: 'a',
latitude: '29.8537459',
longitude: '121.5591519',
}, },
{ {
value: '2', value: '2',
label: 'b', label: 'b',
latitude: '29.8572957 ',
longitude: '121.5611743',
}, },
{ {
value: '3', value: '3',
label: 'c', label: 'c',
latitude: '29.8537459',
longitude: '121.5591519',
}, },
]; ];
const faultLocationChange = (val) => {
const obj = faultLocationOptions.find((i) => {
return (i.value = val);
});
form.longitude = obj.longitude;
form.latitude = obj.latitude;
initMap(obj.longitude, obj.latitude, obj.organizationName);
};
const faultSubcategoryOptions = ref([]);
const getFaultSubcategoryOptions = async () => {
const res = await getSubcategoryType();
faultSubcategoryOptions.value = res.rows;
};
const showModal = () => { const showModal = () => {
visible.value = true; visible.value = true;
initMap(); getFaultSubcategoryOptions();
getProjectNameOptions();
getOrganizationNameOptions();
}; };
const handleOk = () => { const handleOk = () => {
console.log('Form Data:', form); formRef.value.validate().then((valid) => {
// if (valid) {
visible.value = false; let params = {};
for (let i in form) {
params[i] = form[i];
}
workOrderAdd(params).then((_) => {
message.success('操作成功');
closeModal()
});
}
});
}; };
// //
const map = ref(null); const map = ref(null);
const initMap = async (longitude, latitude, organizationName) => {
const initMap = async () => {
try { try {
// JavaScript API // JavaScript API
await AMapLoader.load({ await AMapLoader.load({
key: '786a2e7cc6d4be5ba1d6174a0aa10f2b', // API Key key: '786a2e7cc6d4be5ba1d6174a0aa10f2b',
version: '2.0', version: '2.0',
plugins: [], // plugins: [],
}); });
// //
map.value = new AMap.Map('amapContainer', { map.value = new AMap.Map('amapContainer', {
zoom: 7, zoom: 17,
center: [116.397428, 39.90923], // center: [longitude, latitude],
}); });
// //
const marker = new AMap.Marker({ const marker = new AMap.Marker({
position: new AMap.LngLat(122, 30), position: new AMap.LngLat(longitude, latitude),
title: '点位1', title: organizationName,
});
const marker1 = new AMap.Marker({
position: new AMap.LngLat(120, 28),
title: '点位2',
}); });
const markerList = [marker, marker1]; const markerList = [marker];
map.value.add(markerList); 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);
});
} catch (error) { } catch (error) {
console.error('加载高德地图失败:', error); console.error('加载高德地图失败:', error);
} }
}; };
const closeModal = () => {
formRef.value.resetFields();
visible.value = false;
map.value.destroy()
};
const formRef = ref();
const rules = {
projectName: [{ required: true, message: '请选择' }],
contractName: [{ required: true, message: '请选择' }],
isAccident: [{ required: true, message: '请选择' }],
repairer: [{ required: true, message: '请输入' }],
faultLocation: [{ required: true, message: '请输入' }],
organizationName: [{ required: true, message: '请选择' }],
responseTime: [{ required: true, message: '请输入' }],
responseLevel: [{ required: true, message: '请选择' }],
faultCategory: [{ required: true, message: '请选择' }],
faultSubcategory: [{ required: true, message: '请选择' }],
faultDescription:[{ required: true, message: '请输入' }],
isDispatched: [{ required: true, message: '请选择' }],
};
return { return {
visible, visible,
form, form,
@ -287,10 +341,16 @@
handleOk, handleOk,
responseLevelOptions, responseLevelOptions,
maintenanceRequirementOptions, maintenanceRequirementOptions,
institutionOptions,
faultSubcategoryOptions, faultSubcategoryOptions,
faultLocationOptions,
projectNameOptions, projectNameOptions,
map, contractNameOptions,
organizationNameOptions,
faultLocationChange,
projectNameChange,
closeModal,
formRef,
rules,
}; };
}, },
}; };

1
src/views/IO/workOrder/orderSend/index.vue

@ -3,7 +3,6 @@
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
<template #toolbar> <template #toolbar>
<a-button type="primary" @click="showFaultModal">故障上报</a-button> <a-button type="primary" @click="showFaultModal">故障上报</a-button>
<a-button type="primary" @click="showFaultModal">批量上报</a-button>
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'"> <template v-if="column && record && column.key === 'action'">

2
src/views/analysis/faultNum/data.ts

@ -33,7 +33,7 @@ export const formSchemas: FormSchema[] = [
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '运维单位', title: '运维单位',
dataIndex: 'ioUnit', dataIndex: 'ioCompany',
}, },
{ {
title: '故障原因', title: '故障原因',

2
src/views/analysis/resAndFix/data.ts

@ -37,7 +37,7 @@ export const columns: BasicColumn[] = [
}, },
{ {
title: '运维单位', title: '运维单位',
dataIndex: 'ioUnit', dataIndex: 'ioCompany',
}, },
{ {
title: '故障总数量', title: '故障总数量',

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

@ -1,18 +1,23 @@
<template> <template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%"> <a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%" @cancel="closeModal">
<a-form :model="form" layout="vertical"> <a-form :model="form" layout="vertical" ref="formRef" :rules="rules">
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="12"> <!-- <a-col :span="12">
<a-form-item label="类型" name="type"> <a-form-item label="类型" name="type">
<a-select v-model:value="form.type" :options="statusOptions" placeholder="请选择" /> <a-select v-model:value="form.type" :options="statusOptions" placeholder="请选择" />
</a-form-item> </a-form-item>
</a-col> </a-col> -->
<a-col :span="12"> <a-col :span="24">
<a-form-item label="考核类型" name="checkType"> <a-form-item label="考核类型" name="checkType">
<a-select <a-select
v-model:value="form.checkType" v-model:value="form.checkType"
:options="statusOptions" :options="checkTypeOptions"
placeholder="请选择" placeholder="请选择"
:fieldNames="{
label: 'name',
value: 'name',
options: 'options',
}"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -22,8 +27,13 @@
<a-form-item label="评分大类" name="largeRating"> <a-form-item label="评分大类" name="largeRating">
<a-select <a-select
v-model:value="form.largeRating" v-model:value="form.largeRating"
:options="statusOptions" :options="largeRatingOptions"
placeholder="请选择" placeholder="请选择"
:fieldNames="{
label: 'name',
value: 'name',
options: 'options',
}"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -44,8 +54,8 @@
</a-row> </a-row>
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="扣分标准" name="subStandards"> <a-form-item label="扣分标准" name="standards">
<a-textarea v-model:value="form.subStandards" :rows="4" placeholder="请输入" /> <a-textarea v-model:value="form.standards" :rows="4" placeholder="请输入" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -55,53 +65,102 @@
<script> <script>
import { reactive, ref } from 'vue'; import { reactive, ref } from 'vue';
import {
getInfo,
add,
update,
getCheckType,
getLargeRatingType
} from './api';
import { message } from 'ant-design-vue';
export default { export default {
setup() { setup() {
const title = ref('新增'); const title = ref('新增');
const visible = ref(false); const visible = ref(false);
const form = reactive({ const form = reactive({
type: '', // type: '',
checkType: '', checkType: null,
largeRating: '', largeRating: null,
smallRating: '', smallRating: '',
rating: '', rating: '',
subStandards: '', standards: '',
id:null
}); });
// //
const statusOptions = [ const checkTypeOptions = ref([])
{ const largeRatingOptions = ref([])
value: 0, const getCheckTypeOptions = async() =>{
label: '禁用', const res = await getCheckType()
}, checkTypeOptions.value = res.rows
{ }
value: 1, const getLrgeRatingOptions = async() =>{
label: '启用', const res = await getLargeRatingType()
}, largeRatingOptions.value = res.rows
]; }
const showModal = (type, id) => { const showModal = async(type, id) => {
visible.value = true;
getCheckTypeOptions()
getLrgeRatingOptions()
if (type == 1) { if (type == 1) {
title.value = '新增'; title.value = '新增';
} else if (type == 2) { } else if (type == 2) {
title.value = '编辑'; title.value = '编辑';
console.log(id); const data = await getInfo(id);
for (let i in form) {
form[i] = data[i];
}
} }
visible.value = true;
}; };
const handleOk = () => { const handleOk = () => {
console.log('Form Data:', form); formRef.value.validate().then((valid) => {
// if (valid) {
if (title.value == '新增') {
let params = {};
for (let i in form) {
params[i] = form[i];
}
add(params).then((_) => {
message.success('新增成功');
closeModal()
});
} else {
let params = {};
for (let i in form) {
params[i] = form[i];
}
update(params).then((_) => {
message.success('编辑成功');
closeModal()
});
}
}
});
};
const formRef = ref()
const rules = {
standards: '',
checkType: [{ required: true, message: '请选择' }],
largeRating: [{ required: true, message: '请选择' }],
smallRating: [{ required: true, message: '请输入' }],
rating: [{ required: true, message: '请输入' }],
standards: [{ required: true, message: '请输入' }],
};
const closeModal = () => {
formRef.value.resetFields();
visible.value = false; visible.value = false;
}; };
return { return {
visible, visible,
title, title,
form, form,
showModal, showModal,
handleOk, handleOk,
statusOptions, formRef,
rules,
closeModal,
checkTypeOptions,
largeRatingOptions
}; };
}, },
}; };

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

@ -1,58 +1,45 @@
import { ID, IDS, PageQuery, commonExport } from '@/api/base'; import { commonExport } from '@/api/base';
import { defHttp } from '@/utils/http/axios'; import { defHttp } from '@/utils/http/axios';
import { Dayjs } from 'dayjs';
enum Api { enum Api {
root = '/workflow/leave', root = '/platform/management',
list = '/workflow/leave/list', list = '/platform/management/list',
export = '/workflow/leave/export', export = '/workflow/leave/export',
getCheckType = '/platform/checkType/list',
getLargeRatingType = '/platform/largeRatingType/list',
} }
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 list(params?: any) {
return defHttp.get({ url: Api.list, params });
} }
export function exportExcel(data: any) { export function exportExcel(data: any) {
return commonExport(Api.export, data); return commonExport(Api.export, data);
} }
export function getInfo(id: ID) { export function getInfo(id: any) {
return defHttp.get<Leave>({ url: `${Api.root}/${id}` }); return defHttp.get({ url: `${Api.root}/${id}` });
} }
export function add(data: any) { export function add(data: any) {
return defHttp.post<Resp>({ url: Api.root, data }); return defHttp.post({ url: Api.root, data });
} }
export function update(data: any) { export function update(data: any) {
return defHttp.put<Resp>({ url: Api.root, data }); return defHttp.put({ url: Api.root, data });
} }
export function removeByIds(ids: IDS) { export function removeByIds(ids: any) {
return defHttp.deleteWithMsg<void>({ url: `${Api.root}/${ids.join(',')}` }); return defHttp.deleteWithMsg<void>({ url: `${Api.root}/${ids.join(',')}` });
} }
export function getCheckType() {
return defHttp.get({ url: Api.getCheckType });
}
export function getLargeRatingType() {
return defHttp.get({ url: Api.getLargeRatingType });
}

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

@ -27,12 +27,12 @@ export const formSchemas: FormSchema[] = [
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '类型', title: '考核类型',
dataIndex: 'type', dataIndex: 'checkType',
}, },
{ {
title: '评分大类', title: '评分大类',
dataIndex: 'langeRating', dataIndex: 'largeRating',
}, },
{ {
title: '评分小类', title: '评分小类',
@ -44,7 +44,7 @@ export const columns: BasicColumn[] = [
}, },
{ {
title: '扣分标准', title: '扣分标准',
dataIndex: 'subStandards', dataIndex: 'standards',
}, },
{ {
title: '创建日期', title: '创建日期',

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

@ -9,7 +9,14 @@
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'"> <template v-if="column && record && column.key === 'action'">
<a-button type="link" @click="handleEdit(record.id)">编辑</a-button> <a-button type="link" @click="handleEdit(record.id)">编辑</a-button>
<a-button type="link" @click="handleDelete(record.id)">删除</a-button> <a-popconfirm
title="确定要删除吗?"
ok-text="是"
cancel-text="否"
@confirm="handleDelete(record.id)"
>
<a-button type="link">删除</a-button>
</a-popconfirm>
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
@ -20,14 +27,14 @@
<script setup lang="ts"> <script setup lang="ts">
import { PageWrapper } from '@/components/Page'; import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table'; import { BasicTable, useTable } from '@/components/Table';
import { list } from './api'; import { list,removeByIds} from './api';
import { formSchemas, columns } from './data'; import { formSchemas, columns } from './data';
import addModal from './addModal.vue'; import addModal from './addModal.vue';
import { ref } from 'vue'; import { ref } from 'vue';
defineOptions({ name: 'CheckManage' }); defineOptions({ name: 'CheckManage' });
const [registerTable] = useTable({ const [registerTable,{reload}] = useTable({
rowSelection: { rowSelection: {
type: 'checkbox', type: 'checkbox',
}, },
@ -62,8 +69,9 @@
const handleEdit = (id: any) => { const handleEdit = (id: any) => {
addModalRef.value.showModal(2, id); addModalRef.value.showModal(2, id);
}; };
const handleDelete = (id: any) => { const handleDelete = async (id: any) => {
addModalRef.value.showModal(2, id); await removeByIds([id]);
reload();
}; };
</script> </script>

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

@ -1,10 +1,10 @@
<template> <template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="30%"> <a-modal v-model:open="visible" :title="title" @ok="handleOk" width="30%" @cancel="closeModal">
<a-form :model="form" layout="vertical"> <a-form :model="form" layout="vertical" ref="formRef" :rules="rules">
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="运维单位" name="ioUnit"> <a-form-item label="运维单位" name="ioCompany">
<a-select v-model:value="form.ioUnit" :options="statusOptions" placeholder="请选择" /> <a-select v-model:value="form.ioCompany" :options="ioCompanyOptions" placeholder="请选择" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -13,8 +13,13 @@
<a-form-item label="考核项目" name="checkProject"> <a-form-item label="考核项目" name="checkProject">
<a-select <a-select
v-model:value="form.checkProject" v-model:value="form.checkProject"
:options="statusOptions" :options="checkProjectOptions"
placeholder="请选择" placeholder="请选择"
:fieldNames="{
label: 'projectName',
value: 'projectName',
options: 'options',
}"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -22,7 +27,7 @@
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="考核时间" name="checkTime"> <a-form-item label="考核时间" name="checkTime">
<a-date-picker v-model:value="form.checkTime" placeholder="请选择" type="month" /> <a-date-picker v-model:value="form.checkTime" placeholder="请选择" picker="month" valueFormat="YYYY-MM" format="YYYY-MM"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -39,41 +44,91 @@
<script> <script>
import { reactive, ref } from 'vue'; import { reactive, ref } from 'vue';
import {
getInfo,
add,
update,
getProjectInfo,
getIoCompanyNames
} from './api';
import { message } from 'ant-design-vue';
export default { export default {
setup() { setup() {
const title = ref('新增'); const title = ref('新增');
const visible = ref(false); const visible = ref(false);
const form = reactive({ const form = reactive({
ioUnit: '', ioCompany: null,
checkProject: '', checkProject: null,
checkTime: '', checkTime: '',
checkName: '', checkName: '',
id:null
}); });
// //
const statusOptions = [ const ioCompanyOptions = ref([])
{ const checkProjectOptions = ref([])
value: 0, const getIoCompanyOptions = async() =>{
label: '禁用', const res = await getIoCompanyNames()
}, ioCompanyOptions.value = res.map(i=>{
{ return {
value: 1, value:i
label: '启用', }
}, })
]; }
const showModal = (type, id) => { const getCheckProjectOptions = async() =>{
const res = await getProjectInfo()
checkProjectOptions.value = res
}
const showModal = async(type, id) => {
visible.value = true;
getIoCompanyOptions()
getCheckProjectOptions()
if (type == 1) { if (type == 1) {
title.value = '新增'; title.value = '新增';
} else if (type == 2) { } else if (type == 2) {
title.value = '编辑'; title.value = '编辑';
console.log(id); const data = await getInfo(id);
for (let i in form) {
form[i] = data[i];
}
} }
visible.value = true;
}; };
const handleOk = () => { const handleOk = () => {
console.log('Form Data:', form); formRef.value.validate().then((valid) => {
// if (valid) {
if (title.value == '新增') {
let params = {};
for (let i in form) {
params[i] = form[i];
}
add(params).then((_) => {
message.success('新增成功');
closeModal()
});
} else {
let params = {};
for (let i in form) {
params[i] = form[i];
}
update(params).then((_) => {
message.success('编辑成功');
closeModal()
});
}
}
});
};
const formRef = ref()
const rules = {
standards: '',
checkType: [{ required: true, message: '请选择' }],
largeRating: [{ required: true, message: '请选择' }],
smallRating: [{ required: true, message: '请输入' }],
rating: [{ required: true, message: '请输入' }],
standards: [{ required: true, message: '请输入' }],
};
const closeModal = () => {
formRef.value.resetFields();
visible.value = false; visible.value = false;
}; };
@ -83,7 +138,11 @@
form, form,
showModal, showModal,
handleOk, handleOk,
statusOptions, formRef,
rules,
closeModal,
checkProjectOptions,
ioCompanyOptions
}; };
}, },
}; };

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

@ -1,58 +1,65 @@
import { ID, IDS, PageQuery, commonExport } from '@/api/base'; import { commonExport } from '@/api/base';
import { defHttp } from '@/utils/http/axios'; import { defHttp } from '@/utils/http/axios';
import { Dayjs } from 'dayjs';
enum Api { enum Api {
root = '/workflow/leave', root = '/platform/evaluationInfo',
list = '/workflow/leave/list', list = '/platform/evaluationInfo/list',
export = '/workflow/leave/export', export = '/workflow/leave/export',
getProjectInfo = '/platform/projectInfo/getNames',
getIoCompanyNames = '/platform/inspectPlanInfo/getIoCompanyNames',
queryByFlag = '/platform/evaluationTemplate/queryByFlag',
batchEdit = '/platform/evaluationTemplate/batchEdit',
getEvaluationTemplate = '/platform/evaluationTemplate/getTree',
addBySelect = '/platform/evaluationInfo/addBySelect',
} }
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 list(params?: any) {
return defHttp.get({ url: Api.list, params });
} }
export function exportExcel(data: any) { export function exportExcel(data: any) {
return commonExport(Api.export, data); return commonExport(Api.export, data);
} }
export function getInfo(id: ID) { export function getInfo(id: any) {
return defHttp.get<Leave>({ url: `${Api.root}/${id}` }); return defHttp.get({ url: `${Api.root}/${id}` });
} }
export function add(data: any) { export function add(data: any) {
return defHttp.post<Resp>({ url: Api.root, data }); return defHttp.post({ url: Api.root, data });
} }
export function update(data: any) { export function update(data: any) {
return defHttp.put<Resp>({ url: Api.root, data }); return defHttp.put({ url: Api.root, data });
} }
export function removeByIds(ids: IDS) { export function removeByIds(ids: any) {
return defHttp.deleteWithMsg<void>({ url: `${Api.root}/${ids.join(',')}` }); return defHttp.deleteWithMsg<void>({ url: `${Api.root}/${ids.join(',')}` });
} }
export function getProjectInfo() {
return defHttp.get({ url: Api.getProjectInfo });
}
export function getIoCompanyNames() {
return defHttp.get({ url: Api.getIoCompanyNames });
}
export function queryByFlag(params?: any) {
return defHttp.get({ url: Api.queryByFlag, params });
}
export function batchEdit(data: any) {
return defHttp.put({ url: Api.batchEdit, data });
}
export function getEvaluationTemplate() {
return defHttp.get({ url: Api.getEvaluationTemplate});
}
export function addBySelect(data: any) {
return defHttp.post({ url: Api.addBySelect, data });
}

87
src/views/project/IOCheck/checkRating/checkConfig.vue

@ -0,0 +1,87 @@
<template>
<a-modal
v-model:open="visible"
title="配置考核项"
@ok="handleOk"
width="80%"
@cancel="closeModal"
>
<div>
<a-tree
v-model:checkedKeys="checkedTree"
checkable
:tree-data="treeData"
@check="onCheck"
v-if="treeData.length"
:defaultExpandAll="true"
:fieldNames="{
children: 'children',
title: 'name',
key: 'id',
disabled: 'disabled',
}"
>
</a-tree>
</div>
</a-modal>
</template>
<script>
import { reactive, ref } from 'vue';
import { getEvaluationTemplate,addBySelect } from './api';
import { message } from 'ant-design-vue';
export default {
setup() {
const visible = ref(false);
const treeData = ref([]);
const checkedTree = ref([]);
const flag = ref('');
const onCheck = (checkedKeysValue, info) => {
console.log(checkedKeysValue, info);
};
const handleOk = () => {
if(checkedTree.value&&checkedTree.value.length>0){
const params = {
flag:flag.value,
checkList:checkedTree.value
}
addBySelect(params).then(_=>{
message.success('操作成功')
closeModal()
})
}else{
message.warning('请勾选配置项')
}
};
const showModal = async (id) => {
visible.value = true;
const res = await getEvaluationTemplate();
treeData.value = res.tree;
flag.value = id;
};
const closeModal = () => {
checkedTree.value = [];
visible.value = false;
};
return {
visible,
treeData,
checkedTree,
onCheck,
handleOk,
showModal,
closeModal,
flag,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-modal-body {
max-width: 600px;
margin: 0 auto;
}
</style>

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

@ -7,8 +7,9 @@ export const formSchemas: FormSchema[] = [
label: '考核时间', label: '考核时间',
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
format: 'YYYY-MM-DD', format: 'YYYY-MM',
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM',
picker:'month'
}, },
}, },
]; ];
@ -16,7 +17,7 @@ export const formSchemas: FormSchema[] = [
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '运维单位', title: '运维单位',
dataIndex: 'ioUnit', dataIndex: 'ioCompany',
}, },
{ {
title: '考核项目', title: '考核项目',
@ -33,5 +34,10 @@ export const columns: BasicColumn[] = [
{ {
title: '考核得分', title: '考核得分',
dataIndex: 'checkRating', dataIndex: 'checkRating',
customRender:({value}) =>{
if(!value){
return '暂未评分'
}
}
}, },
]; ];

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

@ -3,35 +3,42 @@
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
<template #toolbar> <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>
<a-button type="primary" @click="handleRating(1, 2)">评分</a-button>
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'"> <template v-if="column && record && column.key === 'action'">
<a-button type="link" @click="handleEdit(record.id)">编辑</a-button> <a-button type="link" @click="handleEdit(record.id)">编辑</a-button>
<a-button type="link" @click="handleDelete(record.id)">删除</a-button> <a-popconfirm
<a-button type="primary" @click="handleRating(1, record.id)">评分</a-button> title="确定要删除吗?"
<a-button type="primary" @click="handleRating(2, record.id)">查看评分</a-button> ok-text="是"
cancel-text="否"
@confirm="handleDelete(record.id)"
>
<a-button type="link">删除</a-button>
</a-popconfirm>
<a-button type="link" @click="handleRating(1, record.id)">评分</a-button>
<a-button type="link" @click="handleRating(2, record.id)">查看评分</a-button>
<a-button type="link" v-if="!record.checkRating" @click="handleCheckConfig(record.id)">配置考核项</a-button>
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
<addModal ref="addModalRef" /> <addModal ref="addModalRef" />
<ratingModal ref="ratingModalRef" /> <ratingModal ref="ratingModalRef" />
<checkConfig ref="checkConfigRef" />
</PageWrapper> </PageWrapper>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { PageWrapper } from '@/components/Page'; import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table'; import { BasicTable, useTable } from '@/components/Table';
import { list } from './api'; import { list,removeByIds} from './api';
import { formSchemas, columns } from './data'; import { formSchemas, columns } from './data';
import addModal from './addModal.vue'; import addModal from './addModal.vue';
import { ref } from 'vue'; import { ref } from 'vue';
import ratingModal from './ratingModal.vue'; import ratingModal from './ratingModal.vue';
import checkConfig from './checkConfig.vue';
defineOptions({ name: 'CheckRating' }); defineOptions({ name: 'CheckRating' });
const [registerTable] = useTable({ const [registerTable,{reload}] = useTable({
rowSelection: { rowSelection: {
type: 'checkbox', type: 'checkbox',
}, },
@ -52,7 +59,7 @@
}, },
columns: columns, columns: columns,
actionColumn: { actionColumn: {
width: 200, width: 400,
title: '操作', title: '操作',
key: 'action', key: 'action',
fixed: 'right', fixed: 'right',
@ -66,14 +73,20 @@
const handleEdit = (id: any) => { const handleEdit = (id: any) => {
addModalRef.value.showModal(2, id); addModalRef.value.showModal(2, id);
}; };
const handleDelete = (id: any) => { const handleDelete = async (id: any) => {
addModalRef.value.showModal(2, id); await removeByIds([id]);
reload();
}; };
// //
const ratingModalRef = ref(); const ratingModalRef = ref();
const handleRating = (type: Number, id: any) => { const handleRating = (type: Number, id: any) => {
ratingModalRef.value.showModal(type, id); ratingModalRef.value.showModal(type, id);
}; };
//
const checkConfigRef = ref()
const handleCheckConfig= (id:any) => {
checkConfigRef.value.showModal(id);
};
</script> </script>
<style scoped></style> <style scoped></style>

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

@ -1,5 +1,5 @@
<template> <template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%"> <a-modal v-model:open="visible" :title="title" @ok="handleOk" width="80%">
<a-table :dataSource="dataSource" :columns="columns" bordered> <a-table :dataSource="dataSource" :columns="columns" bordered>
<template #summary> <template #summary>
<a-table-summary-row> <a-table-summary-row>
@ -11,19 +11,19 @@
<a-typography-text /> <a-typography-text />
</a-table-summary-cell> </a-table-summary-cell>
<a-table-summary-cell> <a-table-summary-cell>
<a-typography-text type="danger">{{ totals.sumRating }}</a-typography-text> <a-typography-text>{{ totals.sumRating }}</a-typography-text>
</a-table-summary-cell> </a-table-summary-cell>
<a-table-summary-cell> <a-table-summary-cell>
<a-typography-text>{{ totals.subRating }}</a-typography-text> <a-typography-text type="danger">{{ 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-cell>
</a-table-summary-row> </a-table-summary-row>
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'subRating'"> <template v-if="column && record && column.key === 'subRating'">
<a-input v-model:value="record.subRating" /> <a-input v-model:value="record.subRating" :disabled="title=='评分详情'"/>
</template>
<template v-if="column && record && column.key === 'remark'" >
<a-input v-model:value="record.remark" :disabled="title=='评分详情'"/>
</template> </template>
</template> </template>
</a-table> </a-table>
@ -32,13 +32,17 @@
<script> <script>
import { computed, ref } from 'vue'; import { computed, ref } from 'vue';
import {
queryByFlag,
batchEdit,
} from './api';
import { message } from 'ant-design-vue';
export default { export default {
setup() { setup() {
const title = ref('详情'); const title = ref('详情');
const visible = ref(false); const visible = ref(false);
const rowSpanMap = ref([]); const rowSpanMap = ref([]);
const columns = [ const columns = [
{ {
title: '评分大类', title: '评分大类',
@ -57,8 +61,8 @@
}, },
{ {
title: '扣分标准', title: '扣分标准',
dataIndex: 'subStandards', dataIndex: 'standards',
key: 'subStandards', key: 'standards',
}, },
{ {
title: '总分', title: '总分',
@ -76,48 +80,7 @@
key: 'remark', key: 'remark',
}, },
]; ];
const dataSource = ref([ 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: 'dsd',
},
{
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 getRowSpanMap = () => {
const spans = []; const spans = [];
let k = 0; // let k = 0; //
@ -144,7 +107,7 @@
rowSpanMap.value = spans; rowSpanMap.value = spans;
}; };
getRowSpanMap();
// //
const totals = computed(() => { const totals = computed(() => {
let sumRating = 0; let sumRating = 0;
@ -161,14 +124,22 @@
currentRating, currentRating,
}; };
}); });
const showModal = (type, id) => { const showModal = async(type, id) => {
visible.value = true;
if (type == 1) { if (type == 1) {
console.log(id); title.value = '评分';
visible.value = true; } else if (type == 2) {
title.value = '评分详情';
} }
const data = await queryByFlag({flag:id});
dataSource.value = data
getRowSpanMap();
}; };
const handleOk = () => { const handleOk = () => {
console.log('submit'); batchEdit(dataSource.value).then(_=>{
message.success('操作成功')
visible.value = false
})
}; };
return { return {
visible, visible,

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

@ -1,13 +1,19 @@
import { ID, IDS, PageQuery, commonExport } from '@/api/base'; import { commonExport } from '@/api/base';
import { defHttp } from '@/utils/http/axios'; import { defHttp } from '@/utils/http/axios';
enum Api { enum Api {
root = '/workflow/leave', root = '/platform/evaluationInfo',
list = '/workflow/leave/list', list = '/platform/evaluationInfo/listForScore',
export = '/workflow/leave/export', export = '/workflow/leave/export',
getProjectInfo = '/platform/projectInfo/getNames',
} }
export function list(params?: PageQuery) {
export function list(params?: any) {
return defHttp.get({ url: Api.list, params }); return defHttp.get({ url: Api.list, params });
} }
@ -15,7 +21,7 @@ export function exportExcel(data: any) {
return commonExport(Api.export, data); return commonExport(Api.export, data);
} }
export function getInfo(id: ID) { export function getInfo(id: any) {
return defHttp.get({ url: `${Api.root}/${id}` }); return defHttp.get({ url: `${Api.root}/${id}` });
} }
@ -27,6 +33,9 @@ export function update(data: any) {
return defHttp.put({ url: Api.root, data }); return defHttp.put({ url: Api.root, data });
} }
export function removeByIds(ids: IDS) { export function removeByIds(ids: any) {
return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); return defHttp.deleteWithMsg<void>({ url: `${Api.root}/${ids.join(',')}` });
}
export function getProjectInfo() {
return defHttp.get({ url: Api.getProjectInfo });
} }

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

@ -3,24 +3,10 @@ import { FormSchema } from '@/components/Form';
export const formSchemas: FormSchema[] = [ export const formSchemas: FormSchema[] = [
{ {
field: 'projectName', field: 'checkProject',
label: '项目名称', label: '项目名称',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [
{
value: '1',
label: '2323',
},
{
value: '2',
label: '2323',
},
{
value: '3',
label: '2323',
},
],
}, },
}, },
{ {
@ -28,8 +14,9 @@ export const formSchemas: FormSchema[] = [
label: '考核时间', label: '考核时间',
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
format: 'YYYY-MM-DD', format: 'YYYY-MM',
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM',
picker:'month'
}, },
}, },
]; ];
@ -37,7 +24,7 @@ export const formSchemas: FormSchema[] = [
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '运维单位', title: '运维单位',
dataIndex: 'ioUnit', dataIndex: 'ioCompany',
}, },
{ {
title: '考核项目', title: '考核项目',
@ -49,6 +36,11 @@ export const columns: BasicColumn[] = [
}, },
{ {
title: '分值', title: '分值',
dataIndex: 'rating', dataIndex: 'checkRating',
customRender:({value}) =>{
if(!value){
return '暂未评分'
}
}
}, },
]; ];

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

@ -2,7 +2,7 @@
<div> <div>
<!-- 抽屉组件 --> <!-- 抽屉组件 -->
<a-drawer <a-drawer
title="详情" title="折线图"
placement="right" placement="right"
:closable="true" :closable="true"
:open="visible" :open="visible"
@ -15,7 +15,7 @@
</template> </template>
<script> <script>
import { ref } from 'vue'; import { reactive, ref } from 'vue';
import { useECharts } from '@/hooks/web/useECharts'; import { useECharts } from '@/hooks/web/useECharts';
// import { getInfo } from './api'; // import { getInfo } from './api';
@ -23,22 +23,14 @@
setup() { setup() {
// //
const chartRef = ref(); const chartRef = ref();
const { setOptions } = useECharts(chartRef); const { setOptions } = useECharts(chartRef);
const visible = ref(false); const options = reactive({
const showDrawer = () => {
visible.value = true;
console.log('11');
setOptions(options);
};
//
const onClose = () => {
visible.value = false;
};
const options = {
title: { title: {
text: '成绩查询', text: '成绩查询',
}, },
tooltip: {
trigger: 'axis',
},
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
@ -48,10 +40,28 @@
}, },
series: [ series: [
{ {
data: [150, 230, 224, 218, 135, 147, 260], data: [],
type: 'line', type: 'line',
}, },
], ],
});
const visible = ref(false);
const showDrawer = (data) => {
visible.value = true;
console.log(data);
let xline = [];
let yline = [];
data.forEach((i) => {
xline.push(i.ioCompany);
yline.push(i.checkRating);
});
options.xAxis.data = xline;
options.series[0].data = yline;
setOptions(options);
};
//
const onClose = () => {
visible.value = false;
}; };
return { return {

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

@ -3,12 +3,7 @@
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
<template #toolbar> <template #toolbar>
<a-button type="primary" @click="handleDetail">导出</a-button> <a-button type="primary" @click="handleDetail">导出</a-button>
<a-button type="link" @click="handleDetail">详情</a-button> <a-button type="primary" @click="handleDetail" v-if="getDataSource().length>0">折线图</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> </template>
</BasicTable> </BasicTable>
<detailDrawer ref="detailDrawerRef" /> <detailDrawer ref="detailDrawerRef" />
@ -18,14 +13,17 @@
<script setup lang="ts"> <script setup lang="ts">
import { PageWrapper } from '@/components/Page'; import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table'; import { BasicTable, useTable } from '@/components/Table';
import { list } from './api'; import { list,getProjectInfo } from './api';
import { formSchemas, columns } from './data'; import { formSchemas, columns } from './data';
import detailDrawer from './detailDrawer.vue'; import detailDrawer from './detailDrawer.vue';
import { ref } from 'vue'; import { ref} from 'vue';
defineOptions({ name: 'RatingSearch' }); defineOptions({ name: 'RatingSearch' });
// const newFormSchemas: any = computed(() => {
const [registerTable] = useTable({
// return formSchemas;
// });
const [registerTable,{getDataSource}] = useTable({
rowSelection: { rowSelection: {
type: 'checkbox', type: 'checkbox',
}, },
@ -44,19 +42,29 @@
lg: 6, lg: 6,
}, },
}, },
immediate:false,
columns: columns, columns: columns,
actionColumn: {
width: 200,
title: '操作',
key: 'action',
fixed: 'right',
},
}); });
// //
const detailDrawerRef = ref(); const detailDrawerRef = ref();
const handleDetail = () => { const handleDetail = () => {
detailDrawerRef.value.showDrawer(); const data = getDataSource()
detailDrawerRef.value.showDrawer(data);
};
const projectOptions = ref([]);
const getProjectOptions = async () => {
const res = await getProjectInfo();
res.forEach((i: any) => {
i.value = i.projectName;
i.label = i.projectName;
});
projectOptions.value = res;
formSchemas[0].componentProps.options = projectOptions.value;
};
const getOptions = () => {
getProjectOptions();
}; };
getOptions();
</script> </script>
<style scoped></style> <style scoped></style>

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

@ -276,7 +276,7 @@
params.endDate = params.contractDuration[1]; params.endDate = params.contractDuration[1];
add(params).then((_) => { add(params).then((_) => {
message.success('新增成功'); message.success('新增成功');
visible.value = false; closeModal()
}); });
} else { } else {
let params = {}; let params = {};
@ -287,7 +287,7 @@
params.endDate = params.contractDuration[1]; params.endDate = params.contractDuration[1];
update(params).then((_) => { update(params).then((_) => {
message.success('编辑成功'); message.success('编辑成功');
visible.value = false; closeModal()
}); });
} }
} }

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

@ -1,6 +1,6 @@
<template> <template>
<a-modal v-model:open="visible" title="工单上报" @ok="handleOk" width="70%"> <a-modal v-model:open="visible" title="工单上报" @ok="handleOk" width="70%" @cancel="closeModal">
<a-form :model="form" layout="vertical"> <a-form :model="form" layout="vertical" ref="formRef" :rules="rules">
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="所属项目" name="projectName"> <a-form-item label="所属项目" name="projectName">
@ -24,7 +24,7 @@
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="是否事故" name="isAccident"> <a-form-item label="是否事故" name="isAccident">
@ -142,7 +142,7 @@
<script> <script>
import { reactive, ref } from 'vue'; import { reactive, ref } from 'vue';
import { getInfo, getSubcategoryType, workOrderAdd,getContractNamesByProjectName } from './api'; import { getInfo, getSubcategoryType, workOrderAdd, getContractNamesByProjectName } from './api';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
export default { export default {
@ -150,7 +150,7 @@
const visible = ref(false); const visible = ref(false);
const form = reactive({ const form = reactive({
projectName: '', projectName: '',
contractName:null, contractName: null,
isAccident: null, isAccident: null,
repairer: '', repairer: '',
responseTime: '', responseTime: '',
@ -165,7 +165,7 @@
maintenanceRequirement: null, maintenanceRequirement: null,
dispatchOpinion: '', dispatchOpinion: '',
longitude: '', longitude: '',
latitude: '', latitude: '',
}); });
// //
const responseLevelOptions = [ const responseLevelOptions = [
@ -189,7 +189,7 @@
}, },
]; ];
const faultSubcategoryOptions = ref([]); const faultSubcategoryOptions = ref([]);
const contractNameOptions = ref([]) const contractNameOptions = ref([]);
const getOptions = async () => { const getOptions = async () => {
const res = await getSubcategoryType(); const res = await getSubcategoryType();
faultSubcategoryOptions.value = res.rows; faultSubcategoryOptions.value = res.rows;
@ -197,34 +197,37 @@
getOptions(); getOptions();
const showModal = async (id) => { const showModal = async (id) => {
visible.value = true; visible.value = true;
const data = await getInfo(id); const data = await getInfo(id);
for (let i in form) { for (let i in form) {
form[i] = data[i]; form[i] = data[i];
} }
const res = await getContractNamesByProjectName({projectName:form.projectName}) const res = await getContractNamesByProjectName({ projectName: form.projectName });
contractNameOptions.value = res contractNameOptions.value = res;
initMap(form.longitude,form.latitude,form.organizationName); initMap(form.longitude, form.latitude, form.organizationName);
}; };
const handleOk = () => { const handleOk = () => {
let params = {}; formRef.value.validate().then((valid) => {
for (let i in form) { if (valid) {
params[i] = form[i]; let params = {};
} for (let i in form) {
workOrderAdd(params).then((_) => { params[i] = form[i];
message.success('操作成功'); }
visible.value = false; workOrderAdd(params).then((_) => {
message.success('操作成功');
closeModal();
});
}
}); });
//
}; };
// //
const map = ref(null); const map = ref(null);
const initMap = async (longitude,latitude,organizationName) => { const initMap = async (longitude, latitude, organizationName) => {
try { try {
// JavaScript API // JavaScript API
await AMapLoader.load({ await AMapLoader.load({
key: '786a2e7cc6d4be5ba1d6174a0aa10f2b', key: '786a2e7cc6d4be5ba1d6174a0aa10f2b',
version: '2.0', version: '2.0',
plugins: [], plugins: [],
}); });
@ -232,7 +235,7 @@
// //
map.value = new AMap.Map('amapContainer', { map.value = new AMap.Map('amapContainer', {
zoom: 17, zoom: 17,
center: [longitude, latitude], center: [longitude, latitude],
}); });
// //
@ -246,6 +249,26 @@
console.error('加载高德地图失败:', error); console.error('加载高德地图失败:', error);
} }
}; };
const closeModal = () => {
formRef.value.resetFields();
visible.value = false;
map.value.destroy();
};
const formRef = ref();
const rules = {
projectName: [{ required: true, message: '请选择' }],
contractName: [{ required: true, message: '请选择' }],
isAccident: [{ required: true, message: '请选择' }],
repairer: [{ required: true, message: '请输入' }],
faultLocation: [{ required: true, message: '请输入' }],
organizationName: [{ required: true, message: '请选择' }],
responseTime: [{ required: true, message: '请输入' }],
responseLevel: [{ required: true, message: '请选择' }],
faultCategory: [{ required: true, message: '请选择' }],
faultSubcategory: [{ required: true, message: '请选择' }],
faultDescription: [{ required: true, message: '请输入' }],
isDispatched: [{ required: true, message: '请选择' }],
};
return { return {
visible, visible,
form, form,
@ -254,7 +277,10 @@
responseLevelOptions, responseLevelOptions,
maintenanceRequirementOptions, maintenanceRequirementOptions,
faultSubcategoryOptions, faultSubcategoryOptions,
contractNameOptions contractNameOptions,
closeModal,
formRef,
rules,
}; };
}, },
}; };

Loading…
Cancel
Save