Browse Source

工单处理,回退延期等

ops-management-platform-frontend-dev
wbc 1 week ago
parent
commit
8cf49f63d7
  1. 12
      src/views/IO/delayPatrol/waitAudit/faultModal.vue
  2. 12
      src/views/IO/delayPatrol/waitPatrol/faultModal.vue
  3. 51
      src/views/IO/patrol/patroling/addModal.vue
  4. 4
      src/views/IO/workOrder/delayAudit/api.ts
  5. 40
      src/views/IO/workOrder/delayAudit/data.ts
  6. 67
      src/views/IO/workOrder/delayAudit/detailDrawer.vue
  7. 36
      src/views/IO/workOrder/orderAudit/data.ts
  8. 48
      src/views/IO/workOrder/orderAudit/detailDrawer.vue
  9. 105
      src/views/IO/workOrder/orderHandle/backModal.vue
  10. 42
      src/views/IO/workOrder/orderHandle/data.ts
  11. 198
      src/views/IO/workOrder/orderHandle/delayModal.vue
  12. 64
      src/views/IO/workOrder/orderHandle/detailDrawer.vue
  13. 181
      src/views/IO/workOrder/orderHandle/handleModal.vue
  14. 43
      src/views/IO/workOrder/orderHandle/index.vue
  15. 0
      src/views/IO/workOrder/orderHandle/receiveModal.vue
  16. 40
      src/views/IO/workOrder/orderSearch/data.ts
  17. 64
      src/views/IO/workOrder/orderSearch/detailDrawer.vue
  18. 15
      src/views/IO/workOrder/orderSearch/faultModal.vue
  19. 4
      src/views/IO/workOrder/orderSearch/index.vue
  20. 38
      src/views/IO/workOrder/orderSend/data.ts
  21. 65
      src/views/IO/workOrder/orderSend/detailDrawer.vue
  22. 15
      src/views/IO/workOrder/orderSend/faultModal.vue
  23. 6
      src/views/IO/workOrder/orderSend/index.vue
  24. 4
      src/views/IO/workOrder/orderSend/sendModal.vue
  25. 12
      src/views/property/point/pointModal.vue

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

@ -36,7 +36,7 @@
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-col :span="24">
<a-form-item label="是否事故" name="isAccident">
<a-radio-group v-model:value="form.isAccident">
<a-radio value="是"></a-radio>
@ -44,11 +44,6 @@
</a-radio-group>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="报修人员" name="repairer">
<a-input v-model:value="form.repairer" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
@ -133,9 +128,10 @@
v-model:file-list="fileLists"
:action="`${apiUrl}/resource/oss/upload`"
:headers="headers"
accept='.jpg,.jpeg,.png,.gif,.webp'
@change="handleChange"
>
<a-button type="primary"> 上传 </a-button>
<a-button type="primary"> 上传图片 </a-button>
</a-upload>
</a-form-item>
</a-col>
@ -191,7 +187,6 @@
projectName: '',
contractName: null,
isAccident: null,
repairer: '',
responseTime: '',
responseLevel: '',
faultCategory: null,
@ -329,7 +324,6 @@
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: '请输入' }],

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

@ -36,7 +36,7 @@
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-col :span="24">
<a-form-item label="是否事故" name="isAccident">
<a-radio-group v-model:value="form.isAccident">
<a-radio value="是"></a-radio>
@ -44,11 +44,6 @@
</a-radio-group>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="报修人员" name="repairer">
<a-input v-model:value="form.repairer" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
@ -133,9 +128,10 @@
v-model:file-list="fileLists"
:action="`${apiUrl}/resource/oss/upload`"
:headers="headers"
accept='.jpg,.jpeg,.png,.gif,.webp'
@change="handleChange"
>
<a-button type="primary"> 上传 </a-button>
<a-button type="primary"> 上传图片 </a-button>
</a-upload>
</a-form-item>
</a-col>
@ -191,7 +187,6 @@
projectName: '',
contractName: null,
isAccident: null,
repairer: '',
responseTime: '',
responseLevel: '',
faultCategory: null,
@ -329,7 +324,6 @@
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: '请输入' }],

51
src/views/IO/patrol/patroling/addModal.vue

@ -66,6 +66,11 @@
v-model:value="form.pointName"
:options="pointNameOptions"
placeholder="请选择"
:fieldNames="{
label: 'pointName',
value: 'pointName',
options: 'options',
}"
@change="pointNameChange"
/>
</a-form-item>
@ -106,9 +111,10 @@
import { message } from 'ant-design-vue';
import dayjs from 'dayjs';
import AMapLoader from '@amap/amap-jsapi-loader';
import { queryPointNames } from '@/api/common/index';
export default {
setup() {
const title = ref('生成计划')
const title = ref('生成计划');
const visible = ref(false);
const form = reactive({
contractName: '',
@ -121,33 +127,18 @@
pointName: '',
serviceProject: '',
finishStatus: [],
deliverContent:'',
code:''
deliverContent: '',
code: '',
});
//
const pointNameOptions = [
{
value: '1',
label: 'a',
latitude: '29.8537459',
longitude: '121.5591519',
},
{
value: '2',
label: 'b',
latitude: '29.8572957 ',
longitude: '121.5611743',
},
{
value: '3',
label: 'c',
latitude: '29.8537459',
longitude: '121.5591519',
},
];
const pointNameOptions = ref([]);
const getPointNameOptions = async() =>{
const res = await queryPointNames()
pointNameOptions.value = res
}
const showModal = async (id) => {
visible.value = true;
getPointNameOptions()
const data = await getInfo(id);
for (let i in form) {
form[i] = data[i];
@ -159,11 +150,11 @@
for (let i in form) {
params[i] = form[i];
}
params.scheduleStartDate = params.dateRange[0]
params.scheduleEndDate = params.dateRange[1]
params.scheduleStartDate = params.dateRange[0];
params.scheduleEndDate = params.dateRange[1];
if (form.deliverContent != '例行操作') {
delete params['finishStatus']
delete params['frequency']
delete params['finishStatus'];
delete params['frequency'];
createSpecialInspection(params).then((_) => {
message.success('操作成功');
visible.value = false;
@ -285,8 +276,8 @@
}
};
const pointNameChange = (val) => {
const obj = pointNameOptions.find((i) => {
return (i.value = val);
const obj = pointNameOptions.value.find((i) => {
return (i.pointName = val);
});
initMap(obj.longitude, obj.latitude, obj.organizationName);
};

4
src/views/IO/workOrder/delayAudit/api.ts

@ -2,8 +2,8 @@ import { PageQuery, commonExport } from '@/api/base';
import { defHttp } from '@/utils/http/axios';
enum Api {
root = '/platform/workOrder',
list = '/platform/workOrder/list',
root = '/platform/orderDelay',
list = '/platform/orderDelay/list',
export = '/workflow/leave/export',
getSubcategoryType = '/platform/subcategoryType/list',
workOrderAdd = '/platform/workOrder/add',

40
src/views/IO/workOrder/delayAudit/data.ts

@ -1,6 +1,35 @@
import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
const statusOptions = [
{
label:'待派遣',
value:0,
},
{
label:'待接单',
value:1,
},
{
label:'处理中',
value:2,
},
{
label:'运维单位处理时回退至派遣',
value:3,
},
{
label:'初审',
value:4,
},
{
label:'终审',
value:5,
},
{
label:'结案',
value:6,
},
];
export const formSchemas: FormSchema[] = [
{
field: 'projectName',
@ -38,4 +67,13 @@ export const columns: BasicColumn[] = [
title: '处理结果',
dataIndex: 'handleResult',
},
{
title: '当前状态',
dataIndex: 'status',
customRender: ({ value }) => {
return statusOptions.find((i) => {
return i.value == value;
})?.label;
},
},
];

67
src/views/IO/workOrder/delayAudit/detailDrawer.vue

@ -31,7 +31,7 @@
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<div><span class="titleLabel">状态</span>{{ detail.status }}</div>
<div><span class="titleLabel">状态</span>{{ statusText(detail.status) }}</div>
</a-col>
<a-col :span="12">
<div><span class="titleLabel">待处理人</span>{{ detail.handler }}</div>
@ -78,14 +78,20 @@
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">故障图片</span>{{ detail.faultImg }}</div>
<div><span class="titleLabel">故障图片</span>
<div v-for="(item,index) in detail.attachments" :key="index">
<img alt="" :src="item.url" />
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div id="orderAuditDetailMap" style="width: 100%; height: 500px"></div>
</a-col>
</a-row>
<a-col :span="24">
<div><span class="titleLabel">地图信息</span>
<div id="delayAuditDetailMap" style="width: 100%; height: 500px"></div>
</div>
</a-col>
</a-row>
</a-tab-pane>
<a-tab-pane key="3" tab="流程信息">
<div style="margin-left: 20px">
@ -145,12 +151,46 @@
responseTime: '',
faultLocation: '',
faultDescription: '',
faultImg: '',
longitude:'',
latitude:''
attachments: '',
longitude: '',
latitude: '',
});
const statusOptions = [
{
label: '待派遣',
value: 0,
},
{
label: '待接单',
value: 1,
},
{
label: '处理中',
value: 2,
},
{
label: '运维单位处理时回退至派遣',
value: 3,
},
{
label: '初审',
value: 4,
},
{
label: '终审',
value: 5,
},
{
label: '结案',
value: 6,
},
];
const statusText = (val) => {
return statusOptions.find((i) => {
return i.value == val;
})?.label;
};
//
const visible = ref(false);
const showDrawer = async (id) => {
@ -159,13 +199,13 @@
for (let i in detail) {
detail[i] = data[i];
}
initMap(detail.longitude,detail.latitude,detail.faultLocation)
initMap(detail.longitude, detail.latitude, detail.faultLocation);
};
//
const onClose = () => {
visible.value = false;
map.value?.destroy()
map.value?.destroy();
};
const activeKey = ref('1');
@ -181,7 +221,7 @@
});
//
map.value = new AMap.Map('orderAuditDetailMap', {
map.value = new AMap.Map('delayAuditDetailMap', {
zoom: 17,
center: [longitude, latitude],
});
@ -203,6 +243,7 @@
onClose,
activeKey,
detail,
statusText
};
},
};

36
src/views/IO/workOrder/orderAudit/data.ts

@ -1,6 +1,35 @@
import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
const statusOptions = [
{
label:'待派遣',
value:0,
},
{
label:'待接单',
value:1,
},
{
label:'处理中',
value:2,
},
{
label:'运维单位处理时回退至派遣',
value:3,
},
{
label:'初审',
value:4,
},
{
label:'终审',
value:5,
},
{
label:'结案',
value:6,
},
];
export const formSchemas: FormSchema[] = [
{
label: '编号',
@ -51,5 +80,10 @@ export const columns: BasicColumn[] = [
{
title: '当前状态',
dataIndex: 'status',
customRender: ({ value }) => {
return statusOptions.find((i) => {
return i.value == value;
})?.label;
},
},
];

48
src/views/IO/workOrder/orderAudit/detailDrawer.vue

@ -31,7 +31,7 @@
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<div><span class="titleLabel">状态</span>{{ detail.status }}</div>
<div><span class="titleLabel">状态</span>{{statusText(detail.status) }}</div>
</a-col>
<a-col :span="12">
<div><span class="titleLabel">待处理人</span>{{ detail.handler }}</div>
@ -78,12 +78,18 @@
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">故障图片</span>{{ detail.faultImg }}</div>
<div><span class="titleLabel">故障图片</span>
<div v-for="(item,index) in detail.attachments" :key="index">
<img alt="" :src="item.url" />
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">地图信息</span>
<div id="orderAuditDetailMap" style="width: 100%; height: 500px"></div>
</div>
</a-col>
</a-row>
</a-tab-pane>
@ -190,7 +196,7 @@
responseTime: '',
faultLocation: '',
faultDescription: '',
faultImg: '',
attachments: '',
fixPeople: '',
fixTime: '',
fixResult: '',
@ -199,6 +205,41 @@
longitude:'',
latitude:''
});
const statusOptions = [
{
label: '待派遣',
value: 0,
},
{
label: '待接单',
value: 1,
},
{
label: '处理中',
value: 2,
},
{
label: '运维单位处理时回退至派遣',
value: 3,
},
{
label: '初审',
value: 4,
},
{
label: '终审',
value: 5,
},
{
label: '结案',
value: 6,
},
];
const statusText = (val) => {
return statusOptions.find((i) => {
return i.value == val;
})?.label;
};
const historyInfo = ref([]);
const historyColumns = [
{
@ -302,6 +343,7 @@
delayInfo,
delayColumns,
detail,
statusText
};
},
};

105
src/views/IO/workOrder/orderHandle/backModal.vue

@ -0,0 +1,105 @@
<template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%" @cancel="closeModal">
<a-form :model="form" layout="vertical" ref="formRef" :rules="rules">
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="所属项目" name="projectName">
<a-input v-model:value="form.projectName" disabled />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="编号" name="id">
<a-input v-model:value="form.id" disabled />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="故障地址" name="faultLocation">
<a-input v-model:value="form.faultLocation" disabled />
</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" disabled/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="回退原因" name="backReason">
<a-textarea v-model:value="form.backReason" :rows="4" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-modal>
</template>
<script>
import { reactive, ref } from 'vue';
import { message } from 'ant-design-vue';
import { getInfo } from './api';
import { getToken } from '@/utils/auth';
import { useGlobSetting } from '@/hooks/setting';
export default {
setup(props, { emit }) {
const title = ref('工单回退');
const visible = ref(false);
const form = reactive({
projectName: '',
faultLocation: '',
faultDescription: '',
backReason: '',
id: null,
});
const showModal = async (id) => {
visible.value = true;
const data = await getInfo(id);
for (let i in form) {
form[i] = data[i];
}
};
const handleOk = () => {
formRef.value.validate().then((valid) => {
if (valid) {
emit('success');
}
});
};
const closeModal = () => {
formRef.value.resetFields();
visible.value = false;
};
const formRef = ref();
const rules = {
backReason: [{ required: true, message: '请输入' }],
};
return {
visible,
title,
form,
showModal,
handleOk,
closeModal,
formRef,
rules,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-modal-body {
max-width: 600px;
margin: 0 auto;
}
</style>

42
src/views/IO/workOrder/orderHandle/data.ts

@ -1,7 +1,36 @@
import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
//列表展示
const statusOptions = [
{
label: '待派遣',
value: 0,
},
{
label: '待接单',
value: 1,
},
{
label: '处理中',
value: 2,
},
{
label: '运维单位处理时回退至派遣',
value: 3,
},
{
label: '初审',
value: 4,
},
{
label: '终审',
value: 5,
},
{
label: '结案',
value: 6,
},
];
export const formSchemas: FormSchema[] = [
{
label: '编号',
@ -17,7 +46,7 @@ export const formSchemas: FormSchema[] = [
component: 'RangePicker',
componentProps: {
format: 'YYYY-MM-DD',
valueFormat:'YYYY-MM-DD'
valueFormat: 'YYYY-MM-DD',
},
},
];
@ -47,4 +76,13 @@ export const columns: BasicColumn[] = [
title: '剩余时间',
dataIndex: 'restTime',
},
{
title: '当前状态',
dataIndex: 'status',
customRender: ({ value }) => {
return statusOptions.find((i) => {
return i.value == value;
})?.label;
},
},
];

198
src/views/IO/workOrder/orderHandle/delayModal.vue

@ -0,0 +1,198 @@
<template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%" @cancel="closeModal">
<a-form :model="form" layout="vertical" ref="formRef" :rules="rules">
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="所属项目" name="projectName">
<a-input v-model:value="form.projectName" disabled />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="编号" name="id">
<a-input v-model:value="form.id" disabled />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="故障地址" name="faultLocation">
<a-input v-model:value="form.faultLocation" disabled />
</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" disabled/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="响应级别" name="responseLevel">
<a-select v-model:value="form.responseLevel" :options="responseLevelOptions" disabled />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="响应时限" name="responseTime">
<a-input v-model:value="form.responseTime" disabled/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="剩余时间" name="restTime">
<a-input v-model:value="form.restTime" disabled />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="延期至" name="delayTime">
<a-date-picker
:show-time="{ format: 'HH:mm:ss' }"
valueFormat="YYYY-MM-DD HH:mm:ss"
v-model:value="form.delayTime"
placeholder="请选择"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="延期图片" name="attachments">
<a-upload
v-model:file-list="fileLists"
:action="`${apiUrl}/resource/oss/upload`"
:headers="headers"
accept=".jpg,.jpeg,.png,.gif,.webp"
@change="handleChange"
>
<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="delayDescription">
<a-textarea v-model:value="form.delayDescription" :rows="4" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-modal>
</template>
<script>
import { reactive, ref } from 'vue';
import { message } from 'ant-design-vue';
import { getInfo,getSubcategoryType } from './api';
import { getToken } from '@/utils/auth';
import { useGlobSetting } from '@/hooks/setting';
export default {
setup(props, { emit }) {
const title = ref('延期申请');
const visible = ref(false);
const form = reactive({
projectName: '',
contractName:'',
faultLocation: '',
faultDescription: '',
responseLevel: '',
responseTime: '',
restTime:'',
delayTime:'',
attachments: null,
delayDescription:'',
id: null,
});
//
const responseLevelOptions = [
{
value: '常规',
},
{
value: '紧急',
},
{
value: '特级',
},
];
const showModal = async (id) => {
visible.value = true;
const data = await getInfo(id);
for (let i in form) {
form[i] = data[i];
}
};
const handleOk = () => {
formRef.value.validate().then((valid) => {
if (valid) {
emit('success');
}
});
};
const closeModal = () => {
fileLists.value = [];
formRef.value.resetFields();
visible.value = false;
};
const formRef = ref();
const rules = {
delayTime: [{ required: true, message: '请选择' }],
delayDescription: [{ required: true, message: '请输入' }],
attachments: [{ required: true, message: '请上传' }],
};
//
const fileLists = ref([]);
const globSetting = useGlobSetting();
const { apiUrl, clientId } = globSetting;
const handleChange = (info) => {
if (info.fileList.length > 0) {
form.attachments = [];
info.fileList.forEach((i) => {
if (i.status == 'done') {
form.attachments.push({
url: i.response?.data.url || i.url,
name: i.response?.data.fileName || i.name,
});
}
});
} else {
form.attachments = null;
}
console.log(fileLists);
};
return {
visible,
title,
form,
responseLevelOptions,
showModal,
handleOk,
closeModal,
formRef,
rules,
apiUrl,
headers: {
Authorization: 'Bearer ' + getToken(),
clientId,
},
handleChange,
fileLists,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-modal-body {
max-width: 600px;
margin: 0 auto;
}
</style>

64
src/views/IO/workOrder/orderHandle/detailDrawer.vue

@ -31,7 +31,7 @@
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<div><span class="titleLabel">状态</span>{{ detail.status }}</div>
<div><span class="titleLabel">状态</span>{{ statusText(detail.status) }}</div>
</a-col>
<a-col :span="12">
<div><span class="titleLabel">待处理人</span>{{ detail.handler }}</div>
@ -78,14 +78,20 @@
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">故障图片</span>{{ detail.faultImg }}</div>
<div><span class="titleLabel">故障图片</span>
<div v-for="(item,index) in detail.attachments" :key="index">
<img alt="" :src="item.url" />
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div id="orderHandleDetailMap" style="width: 100%; height: 500px"></div>
</a-col>
</a-row>
<a-col :span="24">
<div><span class="titleLabel">地图信息</span>
<div id="orderHandleDetailMap" style="width: 100%; height: 500px"></div>
</div>
</a-col>
</a-row>
</a-tab-pane>
<a-tab-pane key="2" tab="处理信息" force-render>
<a-row :gutter="[16, 16]">
@ -190,15 +196,50 @@
responseTime: '',
faultLocation: '',
faultDescription: '',
faultImg: '',
attachments: '',
fixPeople: '',
fixTime: '',
fixResult: '',
cost: '',
handleImg: '',
longitude:'',
latitude:''
longitude: '',
latitude: '',
});
const statusOptions = [
{
label: '待派遣',
value: 0,
},
{
label: '待接单',
value: 1,
},
{
label: '处理中',
value: 2,
},
{
label: '运维单位处理时回退至派遣',
value: 3,
},
{
label: '初审',
value: 4,
},
{
label: '终审',
value: 5,
},
{
label: '结案',
value: 6,
},
];
const statusText = (val) => {
return statusOptions.find((i) => {
return i.value == val;
})?.label;
};
const historyInfo = ref([]);
const historyColumns = [
{
@ -254,13 +295,13 @@
for (let i in detail) {
detail[i] = data[i];
}
initMap(detail.longitude,detail.latitude,detail.faultLocation)
initMap(detail.longitude, detail.latitude, detail.faultLocation);
};
//
const onClose = () => {
visible.value = false;
map.value?.destroy()
map.value?.destroy();
};
const activeKey = ref('1');
@ -302,6 +343,7 @@
delayInfo,
delayColumns,
detail,
statusText
};
},
};

181
src/views/IO/workOrder/orderHandle/handleModal.vue

@ -0,0 +1,181 @@
<template>
<a-modal v-model:open="visible" :title="title" @ok="handleOk" width="50%" @cancel="closeModal">
<a-form :model="form" layout="vertical" ref="formRef" :rules="rules">
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="所属项目" name="projectName">
<a-input v-model:value="form.projectName" disabled />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-form-item label="故障大类" name="faultCategory">
<a-select
v-model:value="form.faultCategory"
:options="[{ value: '前端' }, { value: '后端' }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="故障小类" name="faultSubcategory">
<a-select
v-model:value="form.faultSubcategory"
:options="faultSubcategoryOptions"
:fieldNames="{
label: 'typeName',
value: 'typeName',
options: 'options',
}"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="是否事故" name="isAccident">
<a-radio-group v-model:value="form.isAccident">
<a-radio value="是"></a-radio>
<a-radio value="否"></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="fixResult">
<a-input v-model:value="form.fixResult" placeholder="请输入" disbaled />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="费用情况" name="cost">
<a-input v-model:value="form.cost" placeholder="请输入" disbaled />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<a-form-item label="故障图片" name="attachments">
<a-upload
v-model:file-list="fileLists"
:action="`${apiUrl}/resource/oss/upload`"
:headers="headers"
accept=".jpg,.jpeg,.png,.gif,.webp"
@change="handleChange"
>
<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';
import { message } from 'ant-design-vue';
import { getInfo,getSubcategoryType } from './api';
import { getToken } from '@/utils/auth';
import { useGlobSetting } from '@/hooks/setting';
export default {
setup(props, { emit }) {
const title = ref('工单处理');
const visible = ref(false);
const form = reactive({
projectName: '',
faultCategory: null,
faultSubcategory: null,
isAccident: null,
fixResult: '',
cost: null,
attachments: null,
id: null,
});
//
const faultSubcategoryOptions = ref([]);
const getFaultSubcategoryOptions = async () => {
const res = await getSubcategoryType();
faultSubcategoryOptions.value = res.rows;
};
const showModal = async (id) => {
visible.value = true;
getFaultSubcategoryOptions();
const data = await getInfo(id);
for (let i in form) {
form[i] = data[i];
}
};
const handleOk = () => {
formRef.value.validate().then((valid) => {
if (valid) {
emit('success');
}
});
};
const closeModal = () => {
fileLists.value = [];
formRef.value.resetFields();
visible.value = false;
};
const formRef = ref();
const rules = {
faultCategory: [{ required: true, message: '请选择' }],
faultSubcategory: [{ required: true, message: '请选择' }],
isAccident: [{ required: true, message: '请选择' }],
fixResult: [{ required: true, message: '请输入' }],
cost: [{ required: true, message: '请输入' }],
attachments: [{ required: true, message: '请输入' }],
};
//
const fileLists = ref([]);
const globSetting = useGlobSetting();
const { apiUrl, clientId } = globSetting;
const handleChange = (info) => {
if (info.fileList.length > 0) {
form.attachments = [];
info.fileList.forEach((i) => {
if (i.status == 'done') {
form.attachments.push({
url: i.response?.data.url || i.url,
name: i.response?.data.fileName || i.name,
});
}
});
} else {
form.attachments = null;
}
console.log(fileLists);
};
return {
visible,
title,
form,
faultSubcategoryOptions,
showModal,
handleOk,
closeModal,
formRef,
rules,
apiUrl,
headers: {
Authorization: 'Bearer ' + getToken(),
clientId,
},
handleChange,
fileLists,
};
},
};
</script>
<style scoped>
/* 可选样式调整 */
.ant-modal-body {
max-width: 600px;
margin: 0 auto;
}
</style>

43
src/views/IO/workOrder/orderHandle/index.vue

@ -4,10 +4,24 @@
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.key === 'action'">
<a-button type="link" @click="showDrawer(record.id)">详情</a-button>
<a-popconfirm
title="确定接单吗?"
ok-text="是"
cancel-text="否"
@confirm="receive(record.id)"
>
<a-button type="link">接单</a-button>
</a-popconfirm>
<a-button type="link" @click="handle(record.id)">处理</a-button>
<a-button type="link" @click="back(record.id)">回退</a-button>
<a-button type="link" @click="delay(record.id)">延期</a-button>
</template>
</template>
</BasicTable>
<detailDrawer ref="detailDrawerRef" />
<backModal ref="backModalRef" @success="reload()"/>
<delayModal ref="delayModalRef" @success="reload()" />
<handleModal ref="handleModalRef" @success="reload()" />
</PageWrapper>
</template>
@ -17,20 +31,20 @@
import { list, getProjectInfo } from './api';
import { formSchemas, columns } from './data';
import detailDrawer from './detailDrawer.vue';
import backModal from './backModal.vue';
import handleModal from './handleModal.vue';
import delayModal from './delayModal.vue';
import { ref } from 'vue';
const [registerTable] = useTable({
rowSelection: {
type: 'checkbox',
},
title: '工单搜索',
const [registerTable,{reload}] = useTable({
title: '工单处理',
api: list,
showIndexColumn: true,
rowKey: 'id',
useSearchForm: true,
formConfig: {
schemas: formSchemas,
name: 'orderSearch',
name: 'orderHandle',
baseColProps: {
xs: 24,
sm: 24,
@ -40,7 +54,7 @@
},
columns: columns,
actionColumn: {
width: 200,
width: 320,
title: '操作',
key: 'action',
fixed: 'right',
@ -52,6 +66,21 @@
const showDrawer = (id: any) => {
detailDrawerRef.value.showDrawer(id);
};
const receive = async (id: any) => {
reload();
};
const backModalRef = ref()
const back = (id:any) =>{
backModalRef.value.showModal(id)
}
const delayModalRef = ref()
const delay = (id:any) =>{
delayModalRef.value.showModal(id)
}
const handleModalRef = ref()
const handle = (id:any) =>{
handleModalRef.value.showModal(id)
}
const projectOptions = ref([]);
const getProjectOptions = async () => {
const res = await getProjectInfo();

0
src/views/IO/workOrder/orderHandle/receiveModal.vue

40
src/views/IO/workOrder/orderSearch/data.ts

@ -12,14 +12,43 @@ const responseLevelOptions = [
value: '特级',
},
];
const statusOptions = [
{
label: '待派遣',
value: 0,
},
{
label: '待接单',
value: 1,
},
{
label: '处理中',
value: 2,
},
{
label: '运维单位处理时回退至派遣',
value: 3,
},
{
label: '初审',
value: 4,
},
{
label: '终审',
value: 5,
},
{
label: '结案',
value: 6,
},
];
export const formSchemas: FormSchema[] = [
{
field: 'projectName',
label: '项目名称',
component: 'Select',
componentProps: {
options: [
],
options: [],
},
},
{
@ -48,8 +77,7 @@ export const formSchemas: FormSchema[] = [
label: '故障小类',
component: 'Select',
componentProps: {
options: [
],
options: [],
},
},
];
@ -79,7 +107,9 @@ export const columns: BasicColumn[] = [
title: '当前状态',
dataIndex: 'status',
customRender: ({ value }) => {
return value == 0 ? '启用' : '禁用';
return statusOptions.find((i) => {
return i.value == value;
})?.label;
},
},
];

64
src/views/IO/workOrder/orderSearch/detailDrawer.vue

@ -31,7 +31,7 @@
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<div><span class="titleLabel">状态</span>{{ detail.status }}</div>
<div><span class="titleLabel">状态</span>{{ statusText(detail.status) }}</div>
</a-col>
<a-col :span="12">
<div><span class="titleLabel">待处理人</span>{{ detail.handler }}</div>
@ -78,14 +78,20 @@
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">故障图片</span>{{ detail.faultImg }}</div>
<div><span class="titleLabel">故障图片</span>
<div v-for="(item,index) in detail.attachments" :key="index">
<img alt="" :src="item.url" />
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div id="orderSearchDetailMap" style="width: 100%; height: 500px"></div>
</a-col>
</a-row>
<a-col :span="24">
<div><span class="titleLabel">地图信息</span>
<div id="orderSearchDetailMap" style="width: 100%; height: 500px"></div>
</div>
</a-col>
</a-row>
</a-tab-pane>
<a-tab-pane key="2" tab="处理信息" force-render>
<a-row :gutter="[16, 16]">
@ -190,15 +196,50 @@
responseTime: '',
faultLocation: '',
faultDescription: '',
faultImg: '',
attachments: '',
fixPeople: '',
fixTime: '',
fixResult: '',
cost: '',
handleImg: '',
longitude:'',
latitude:''
longitude: '',
latitude: '',
});
const statusOptions = [
{
label: '待派遣',
value: 0,
},
{
label: '待接单',
value: 1,
},
{
label: '处理中',
value: 2,
},
{
label: '运维单位处理时回退至派遣',
value: 3,
},
{
label: '初审',
value: 4,
},
{
label: '终审',
value: 5,
},
{
label: '结案',
value: 6,
},
];
const statusText = (val) => {
return statusOptions.find((i) => {
return i.value == val;
})?.label;
};
const historyInfo = ref([]);
const historyColumns = [
{
@ -254,13 +295,13 @@
for (let i in detail) {
detail[i] = data[i];
}
initMap(detail.longitude,detail.latitude,detail.faultLocation)
initMap(detail.longitude, detail.latitude, detail.faultLocation);
};
//
const onClose = () => {
visible.value = false;
map.value?.destroy()
map.value?.destroy();
};
const activeKey = ref('1');
@ -302,6 +343,7 @@
delayInfo,
delayColumns,
detail,
statusText,
};
},
};

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

@ -36,7 +36,7 @@
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-col :span="24">
<a-form-item label="是否事故" name="isAccident">
<a-radio-group v-model:value="form.isAccident">
<a-radio value="是"></a-radio>
@ -44,11 +44,6 @@
</a-radio-group>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="报修人员" name="repairer">
<a-input v-model:value="form.repairer" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
@ -133,9 +128,10 @@
v-model:file-list="fileLists"
:action="`${apiUrl}/resource/oss/upload`"
:headers="headers"
accept='.jpg,.jpeg,.png,.gif,.webp'
@change="handleChange"
>
<a-button type="primary"> 上传 </a-button>
<a-button type="primary"> 上传图片 </a-button>
</a-upload>
</a-form-item>
</a-col>
@ -185,13 +181,12 @@
import { useGlobSetting } from '@/hooks/setting';
import {queryPointNames} from '@/api/common/index'
export default {
setup() {
setup(props,{emit}) {
const visible = ref(false);
const form = reactive({
projectName: '',
contractName: null,
isAccident: null,
repairer: '',
responseTime: '',
responseLevel: '',
faultCategory: null,
@ -285,6 +280,7 @@
}
workOrderAdd(params).then((_) => {
message.success('操作成功');
emit('success')
closeModal();
});
}
@ -329,7 +325,6 @@
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: '请输入' }],

4
src/views/IO/workOrder/orderSearch/index.vue

@ -10,7 +10,7 @@
</template>
</template>
</BasicTable>
<faultModal ref="falutModalRef" />
<faultModal ref="falutModalRef" @success="reload()"/>
<detailDrawer ref="detailDrawerRef" @open-modal="showFaultModal" />
</PageWrapper>
</template>
@ -24,7 +24,7 @@
import detailDrawer from './detailDrawer.vue';
import { ref } from 'vue';
const [registerTable] = useTable({
const [registerTable,{reload}] = useTable({
rowSelection: {
type: 'checkbox',
},

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

@ -1,14 +1,42 @@
import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
const statusOptions = [
{
label: '待派遣',
value: 0,
},
{
label: '待接单',
value: 1,
},
{
label: '处理中',
value: 2,
},
{
label: '运维单位处理时回退至派遣',
value: 3,
},
{
label: '初审',
value: 4,
},
{
label: '终审',
value: 5,
},
{
label: '结案',
value: 6,
},
];
export const formSchemas: FormSchema[] = [
{
field: 'projectName',
label: '项目名称',
component: 'Select',
componentProps: {
options: [
],
options: [],
},
},
{
@ -51,7 +79,9 @@ export const columns: BasicColumn[] = [
title: '当前状态',
dataIndex: 'status',
customRender: ({ value }) => {
return value == 0 ? '启用' : '禁用';
return statusOptions.find((i) => {
return i.value == value;
})?.label;
},
},
];

65
src/views/IO/workOrder/orderSend/detailDrawer.vue

@ -31,7 +31,7 @@
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<div><span class="titleLabel">状态</span>{{ detail.status }}</div>
<div><span class="titleLabel">状态</span>{{statusText(detail.status) }}</div>
</a-col>
<a-col :span="12">
<div><span class="titleLabel">待处理人</span>{{ detail.handler }}</div>
@ -78,14 +78,21 @@
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div><span class="titleLabel">故障图片</span>{{ detail.faultImg }}</div>
<div
><span class="titleLabel">故障图片</span>
<div v-for="(item, index) in detail.attachments" :key="index">
<img alt="" :src="item.url" />
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="24">
<div id="orderSendDetailMap" style="width: 100%; height: 500px"></div>
</a-col>
</a-row>
<a-col :span="24">
<div><span class="titleLabel">地图信息</span>
<div id="orderSendDetailMap" style="width: 100%; height: 500px"></div>
</div>
</a-col>
</a-row>
</a-tab-pane>
<a-tab-pane key="2" tab="处理信息" force-render>
<a-row :gutter="[16, 16]">
@ -190,15 +197,50 @@
responseTime: '',
faultLocation: '',
faultDescription: '',
faultImg: '',
attachments: '',
fixPeople: '',
fixTime: '',
fixResult: '',
cost: '',
handleImg: '',
longitude:'',
latitude:''
longitude: '',
latitude: '',
});
const statusOptions = [
{
label: '待派遣',
value: 0,
},
{
label: '待接单',
value: 1,
},
{
label: '处理中',
value: 2,
},
{
label: '运维单位处理时回退至派遣',
value: 3,
},
{
label: '初审',
value: 4,
},
{
label: '终审',
value: 5,
},
{
label: '结案',
value: 6,
},
];
const statusText = (val) => {
return statusOptions.find((i) => {
return i.value == val;
})?.label;
};
const historyInfo = ref([]);
const historyColumns = [
{
@ -254,13 +296,13 @@
for (let i in detail) {
detail[i] = data[i];
}
initMap(detail.longitude,detail.latitude,detail.faultLocation)
initMap(detail.longitude, detail.latitude, detail.faultLocation);
};
//
const onClose = () => {
visible.value = false;
map.value?.destroy()
map.value?.destroy();
};
const activeKey = ref('1');
@ -302,6 +344,7 @@
delayInfo,
delayColumns,
detail,
statusText
};
},
};

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

@ -36,7 +36,7 @@
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-col :span="24">
<a-form-item label="是否事故" name="isAccident">
<a-radio-group v-model:value="form.isAccident">
<a-radio value="是"></a-radio>
@ -44,11 +44,6 @@
</a-radio-group>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="报修人员" name="repairer">
<a-input v-model:value="form.repairer" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
@ -133,9 +128,10 @@
v-model:file-list="fileLists"
:action="`${apiUrl}/resource/oss/upload`"
:headers="headers"
accept='.jpg,.jpeg,.png,.gif,.webp'
@change="handleChange"
>
<a-button type="primary"> 上传 </a-button>
<a-button type="primary"> 上传图片 </a-button>
</a-upload>
</a-form-item>
</a-col>
@ -185,13 +181,12 @@
import { useGlobSetting } from '@/hooks/setting';
import {queryPointNames} from '@/api/common/index'
export default {
setup() {
setup(props,{emit}) {
const visible = ref(false);
const form = reactive({
projectName: '',
contractName: null,
isAccident: null,
repairer: '',
responseTime: '',
responseLevel: '',
faultCategory: null,
@ -285,6 +280,7 @@
}
workOrderAdd(params).then((_) => {
message.success('操作成功');
emit('success')
closeModal();
});
}
@ -329,7 +325,6 @@
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: '请输入' }],

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

@ -11,9 +11,9 @@
</template>
</template>
</BasicTable>
<faultModal ref="faultModalRef" />
<faultModal ref="faultModalRef" @success="reload()"/>
<detailDrawer ref="detailDrawerRef" />
<sendModal ref="sendModalRef"/>
<sendModal ref="sendModalRef" @success="reload()"/>
</PageWrapper>
</template>
@ -27,7 +27,7 @@
import sendModal from './sendModal.vue';
import { ref } from 'vue';
const [registerTable] = useTable({
const [registerTable,{reload}] = useTable({
rowSelection: {
type: 'checkbox',
},

4
src/views/IO/workOrder/orderSend/sendModal.vue

@ -56,7 +56,7 @@
import { message } from 'ant-design-vue';
import { getInfo } from './api';
export default {
setup() {
setup(props,{emit}) {
const title = ref('派遣');
const visible = ref(false);
const form = reactive({
@ -108,7 +108,7 @@
const handleOk = () => {
formRef.value.validate().then((valid) => {
if (valid) {
console.log(form)
emit('success')
}
});
};

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

@ -26,7 +26,7 @@
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
<a-col :span="24">
<a-form-item label="是否事故" name="isAccident">
<a-radio-group v-model:value="form.isAccident">
<a-radio :value="1"></a-radio>
@ -34,11 +34,6 @@
</a-radio-group>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="报修人员" name="repairer">
<a-input v-model:value="form.repairer" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="[16, 16]">
<a-col :span="12">
@ -106,9 +101,10 @@
v-model:file-list="fileLists"
:action="`${apiUrl}/resource/oss/upload`"
:headers="headers"
accept='.jpg,.jpeg,.png,.gif,.webp'
@change="handleChange"
>
<a-button type="primary"> 上传 </a-button>
<a-button type="primary"> 上传图片 </a-button>
</a-upload>
</a-form-item>
</a-col>
@ -156,7 +152,6 @@
projectName: '',
contractName: null,
isAccident: null,
repairer: '',
responseTime: '',
responseLevel: '',
faultCategory: null,
@ -272,7 +267,6 @@
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: '请输入' }],

Loading…
Cancel
Save