Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
commit
117b574410
@ -12,10 +12,23 @@ import { requestClient } from '#/api/request';
|
|||||||
export function workOrdersTypeList(params?: WorkOrdersTypeQuery) {
|
export function workOrdersTypeList(params?: WorkOrdersTypeQuery) {
|
||||||
return requestClient.get<PageResult<WorkOrdersTypeVO>>('/property/workOrdersType/list', { params });
|
return requestClient.get<PageResult<WorkOrdersTypeVO>>('/property/workOrdersType/list', { params });
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 查询工单类型不分页
|
||||||
|
* @param params
|
||||||
|
* @returns 工单类型管理列表
|
||||||
|
*/
|
||||||
export function workOrdersTypeListAll(params?: WorkOrdersTypeQuery) {
|
export function workOrdersTypeListAll(params?: WorkOrdersTypeQuery) {
|
||||||
return requestClient.get<WorkOrdersTypeVO[]>('/property/workOrdersType/queryList', { params });
|
return requestClient.get<WorkOrdersTypeVO[]>('/property/workOrdersType/queryList', { params });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询工单类型树结构
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export function workOrdersTypeTree(params?: WorkOrdersTypeQuery) {
|
||||||
|
return requestClient.get<WorkOrdersTypeVO[]>('/property/workOrdersType/typeTree', { params });
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出工单类型管理列表
|
* 导出工单类型管理列表
|
||||||
* @param params
|
* @param params
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import type { FormSchemaGetter } from '#/adapter/form';
|
import type { FormSchemaGetter } from '#/adapter/form';
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
import {getDictOptions} from "#/utils/dict";
|
import {getDictOptions} from "#/utils/dict";
|
||||||
|
import {renderDict} from "#/utils/render";
|
||||||
|
|
||||||
|
|
||||||
export const querySchema: FormSchemaGetter = () => [
|
export const querySchema: FormSchemaGetter = () => [
|
||||||
@ -69,19 +70,24 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
export const columns: VxeGridProps['columns'] = [
|
export const columns: VxeGridProps['columns'] = [
|
||||||
{ type: 'checkbox', width: 60 },
|
{ type: 'checkbox', width: 60 },
|
||||||
{
|
{
|
||||||
title: '仓库id',
|
title: '仓库',
|
||||||
field: 'depotId',
|
field: 'depotName',
|
||||||
minWidth:150,
|
minWidth:150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '资产id',
|
title: '资产',
|
||||||
field: 'assetId',
|
field: 'assetName',
|
||||||
width:180,
|
width:180,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '流转类型',
|
title: '流转类型',
|
||||||
field: 'type',
|
field: 'type',
|
||||||
width:120,
|
width:120,
|
||||||
|
slots:{
|
||||||
|
default:({row})=>{
|
||||||
|
return renderDict(row.type,'wy_cklzlx')
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -95,8 +101,8 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
width:150,
|
width:150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作人id',
|
title: '操作人',
|
||||||
field: 'userId',
|
field: 'userName',
|
||||||
width:150,
|
width:150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -152,8 +152,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
{
|
{
|
||||||
label: '工单类型',
|
label: '工单类型',
|
||||||
fieldName: 'type',
|
fieldName: 'type',
|
||||||
component: 'ApiSelect',
|
component: 'TreeSelect',
|
||||||
componentProps: {},
|
|
||||||
rules: 'selectRequired',
|
rules: 'selectRequired',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,10 @@ import workOrdersDetail from './work-orders-detail.vue';
|
|||||||
import ordersModal from './orders-modal.vue';
|
import ordersModal from './orders-modal.vue';
|
||||||
import {columns, querySchema} from './data';
|
import {columns, querySchema} from './data';
|
||||||
import {onMounted, ref} from "vue";
|
import {onMounted, ref} from "vue";
|
||||||
import {workOrdersTypeList} from "#/api/property/businessManagement/workOrdersType";
|
import {
|
||||||
|
workOrdersTypeList,
|
||||||
|
workOrdersTypeListAll
|
||||||
|
} from "#/api/property/businessManagement/workOrdersType";
|
||||||
|
|
||||||
const ordersTypeList = ref<any[]>([]);
|
const ordersTypeList = ref<any[]>([]);
|
||||||
const ordersType = ref<string>('0');
|
const ordersType = ref<string>('0');
|
||||||
@ -130,11 +133,10 @@ function handleMultiDelete() {
|
|||||||
|
|
||||||
async function queryOrderType() {
|
async function queryOrderType() {
|
||||||
let params = {
|
let params = {
|
||||||
pageSize: 1000,
|
filterSubNodes:true
|
||||||
pageNum: 1
|
|
||||||
}
|
}
|
||||||
const res = await workOrdersTypeList(params)
|
const res = await workOrdersTypeListAll(params)
|
||||||
ordersTypeList.value = res.rows.map((item) => ({
|
ordersTypeList.value = res.map((item) => ({
|
||||||
label: item.orderTypeName,
|
label: item.orderTypeName,
|
||||||
value: item.id,
|
value: item.id,
|
||||||
}));
|
}));
|
||||||
|
@ -14,9 +14,7 @@ import {
|
|||||||
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
||||||
|
|
||||||
import {modalSchema} from './data';
|
import {modalSchema} from './data';
|
||||||
import {personList} from "#/api/property/resident/person";
|
import {workOrdersTypeTree} from "#/api/property/businessManagement/workOrdersType";
|
||||||
import {renderDictValue} from "#/utils/render";
|
|
||||||
import {workOrdersTypeList} from "#/api/property/businessManagement/workOrdersType";
|
|
||||||
|
|
||||||
const emit = defineEmits<{ reload: [] }>();
|
const emit = defineEmits<{ reload: [] }>();
|
||||||
|
|
||||||
@ -107,23 +105,28 @@ async function handleClosed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function queryWorkOrdersType() {
|
async function queryWorkOrdersType() {
|
||||||
let params = {
|
const options = await workOrdersTypeTree()
|
||||||
pageSize: 1000,
|
formApi.updateSchema([
|
||||||
pageNum: 1
|
{
|
||||||
}
|
componentProps: () => ({
|
||||||
const res = await tree(params)
|
class: 'w-full',
|
||||||
const options = res.rows.map((item) => ({
|
fieldNames: {
|
||||||
label: item.orderTypeName,
|
key: 'id',
|
||||||
value: item.id,
|
label: 'orderTypeName',
|
||||||
}));
|
value: 'id',
|
||||||
formApi.updateSchema([{
|
children: 'children',
|
||||||
componentProps: () => ({
|
},
|
||||||
options: options,
|
placeholder: '请选择工单类型',
|
||||||
filterOption: filterOption,
|
showSearch: true,
|
||||||
showSearch:true,
|
treeData: options,
|
||||||
}),
|
treeDefaultExpandAll: true,
|
||||||
fieldName: 'type',
|
treeLine: { showLeafIcon: false },
|
||||||
}])
|
treeNodeFilterProp: 'orderTypeName',
|
||||||
|
treeNodeLabelProp: 'orderTypeName',
|
||||||
|
}),
|
||||||
|
fieldName: 'type',
|
||||||
|
},
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const filterOption = (input: string, option: any) => {
|
const filterOption = (input: string, option: any) => {
|
||||||
|
@ -94,6 +94,7 @@ async function handleEdit(row: Required<WorkOrdersTypeForm>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleDelete(row: Required<WorkOrdersTypeForm>) {
|
async function handleDelete(row: Required<WorkOrdersTypeForm>) {
|
||||||
|
console.log(row,'======row')
|
||||||
await workOrdersTypeRemove(row.id);
|
await workOrdersTypeRemove(row.id);
|
||||||
await tableApi.query();
|
await tableApi.query();
|
||||||
}
|
}
|
||||||
@ -158,6 +159,7 @@ function handleMultiDelete() {
|
|||||||
danger
|
danger
|
||||||
v-access:code="['property:workOrdersType:remove']"
|
v-access:code="['property:workOrdersType:remove']"
|
||||||
@click.stop=""
|
@click.stop=""
|
||||||
|
:disabled="row.children?.length>0"
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.delete') }}
|
{{ $t('pages.common.delete') }}
|
||||||
</ghost-button>
|
</ghost-button>
|
||||||
|
@ -32,49 +32,26 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
|
|
||||||
export const columns: VxeGridProps['columns'] = [
|
export const columns: VxeGridProps['columns'] = [
|
||||||
{ type: 'checkbox', width: 60 },
|
{ type: 'checkbox', width: 60 },
|
||||||
// {
|
{
|
||||||
// title: '任务编号',
|
title: '巡检计划',
|
||||||
// field: 'id',
|
field: 'planId',
|
||||||
// width:'auto'
|
minWidth:200
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// title: '巡检计划',
|
title: '巡检任务',
|
||||||
// field: 'planName',
|
field: 'taskId',
|
||||||
// minWidth:200
|
width:150
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// title: '巡检时间范围',
|
title: '巡检路线',
|
||||||
// field: 'planInsTime',
|
field: 'routeId',
|
||||||
// width:'auto'
|
width:150
|
||||||
//
|
},
|
||||||
// },
|
{
|
||||||
// // {
|
title: '巡检点',
|
||||||
// // title: '实际巡检时间',
|
field: 'pointId',
|
||||||
// // field: 'endDate',
|
width:150
|
||||||
// // width:180
|
},
|
||||||
// //
|
|
||||||
// // },
|
|
||||||
// {
|
|
||||||
// title: '签到状态',
|
|
||||||
// field: 'actInsTime',
|
|
||||||
// width:150,
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '巡检人',
|
|
||||||
// field: 'planUserName',
|
|
||||||
// width:'auto'
|
|
||||||
//
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '巡检方式',
|
|
||||||
// field: 'taskType',
|
|
||||||
// width:'auto',
|
|
||||||
// slots: {
|
|
||||||
// default: ({ row }) => {
|
|
||||||
// return renderDict(row.taskType, 'wy_xjqdfs');
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
title: '签到类型',
|
title: '签到类型',
|
||||||
field: 'signType',
|
field: 'signType',
|
||||||
@ -118,7 +95,7 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
{
|
{
|
||||||
title: '备注',
|
title: '备注',
|
||||||
field: 'remark',
|
field: 'remark',
|
||||||
minWidth:120
|
width:180
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// field: 'action',
|
// field: 'action',
|
||||||
|
Loading…
Reference in New Issue
Block a user