Commit 6a506788 by yancanhua

fix:检测师功能开发

1 parent 076f27b1
......@@ -2,7 +2,7 @@ import { RouteRecordRaw } from "vue-router";
export const DetectionRouter: Array<RouteRecordRaw> = [
{
path: '/detection/detectionOrder',
path: '/detection/order',
component: () => import('@/views/detection/order/DetectionOrderPage.vue'),
meta: {
breadcrumbs: [{ name: '检测管理' }, { name: '检测订单管理' }]
......@@ -16,7 +16,7 @@ export const DetectionRouter: Array<RouteRecordRaw> = [
}
},
{
path: '/detection/detectionReport',
path: '/detection/report',
component: () => import('@/views/detection/report/DetectionReportPage.vue'),
meta: {
breadcrumbs: [{ name: '检测管理' }, { name: '检测报告管理' }]
......@@ -30,7 +30,7 @@ export const DetectionRouter: Array<RouteRecordRaw> = [
}
},
{
path: '/detection/detectionInspector',
path: '/detection/inspector',
component: () => import('@/views/detection/inspector/DetectionInspectorPage.vue'),
meta: {
breadcrumbs: [{ name: '检测管理' }, { name: '检测师管理' }]
......
<template>
<a-card class="tabs-card" :bordered="false">
<!--查询栏-->
<m-pagination-query-render :fields="pagination.filterFields" :form="pagination.queryForm" @onSearch="pageReload"
@onReset="pageReset" :simpleFieldNum="4" />
<!--查询栏end-->
<!--库存车辆列表start-->
<div class="table-operations" style="margin-bottom: 16px;width: 100%;float: left;">
<div class="flex justify-end" style="float: left;">
已选 3 项
<a-button>批量绑定</a-button>
<a-button>批量解绑</a-button>
检测师列表
</div>
<div class="flex justify-end" style="float: right;">
<a-button type="primary" @click="downloadExcel" :disabled="exporting">导出</a-button>
<a-button type="primary" @click="handleAdd()" >新增检测师</a-button>
<a-button @click="downloadExcel" :disabled="exporting">导出</a-button>
</div>
</div>
......@@ -28,6 +25,8 @@
</template>
</a-table>
<InspectorAddForm ref="inspectorAddFormRef" />
</a-card>
</template>
<script lang="ts">
......@@ -41,10 +40,13 @@ import { Vehicle } from "lib/src/entity/vehicle/entity/Vehicle";
import { Security } from "@/store";
import { ExportUtil } from "@/common/ExportUtil";
import InspectorAddForm from "@/views/detection/inspector/components/InspectorAddForm.vue";
@Component({
components: { VehicleStateTag }
components: { InspectorAddForm }
})
export default class AppraiseVehiclePricePage extends PaginationComponent<Vehicle> {
export default class detectionInspectorPage extends PaginationComponent<Vehicle> {
vehicleStateIndex = "0";
exporting = false;
......@@ -98,6 +100,9 @@ export default class AppraiseVehiclePricePage extends PaginationComponent<Vehicl
this.pagination.setDefaultSort('createTime', Order.desc);
}
handleAdd(): void {
this.$refs.inspectorAddFormRef.init({});
}
downloadExcel(): void {
// this.exporting = true;
......
<template>
<div>
<a-modal v-model:open="open" title="Basic Modal" @ok="handleOk">
<a-spin :spinning="submitted">
<a-form :model="postData" :label-col="labelCol" :wrapper-col="wrapperCol" ref="formRef">
<a-modal v-model:open="dialogVisible" :title="titleVisible" @ok="handleOk">
<a-spin :spinning="submitted" style="margin-top: 16px;">
<a-form layout="vertical" :model="postData" :label-col="labelCol" :wrapper-col="wrapperCol"
ref="formRef">
<a-form-item name="realName" label="姓名"
:rules="[{ required: true, message: '请输入姓名' }, { pattern: /^(?:[\u4e00-\u9fa5]{1,10}|[a-zA-Z]{2,20})$/, message: '请输入1-10个中文字符或2-20个英文字符' }]">
<a-input v-model:value="postData.realName" placeholder="请输入姓名" :maxlength="20" />
:rules="[{ required: true, message: '请输入检测室真实姓名' }, { pattern: /^(?:[\u4e00-\u9fa5]{1,10}|[a-zA-Z]{2,20})$/, message: '请输入1-10个中文字符或2-20个英文字符' }]">
<a-input v-model:value="postData.realName" placeholder="请输入检测室真实姓名" :maxlength="20"
style="width: 376px;" />
</a-form-item>
<a-form-item name="mobile" label="手机号码"
:rules="[{ required: true, message: '请输入手机号码' }, { pattern: /^1(3|4|5|6|7|8|9)\d{9}$/, message: '请输入正确的11位手机号码' }]">
<a-input v-model:value="postData.mobile" placeholder="请输入手机号码" :maxlength="11" />
:rules="[{ required: true, message: '请输入11位手机号' }, { pattern: /^1(3|4|5|6|7|8|9)\d{9}$/, message: '请输入正确的11位手机号码' }]">
<a-input v-model:value="postData.mobile" placeholder="请输入11位手机号" :maxlength="11"
style="width: 376px;" />
</a-form-item>
<a-form-item label="所在城市" name="registrationCity"
:rules="[{ required: true, message: '请选择所在城市!' }]">
<a-cascader style="width: 100%;" v-model:value="postData.registrationCity" :options="areaData"
placeholder="请选择所在城市" />
<a-cascader v-model:value="postData.registrationCity" :options="areaData" placeholder="请选择所在城市"
style="width: 376px;" />
</a-form-item>
<a-form-item name="enabled" label="账号状态" :rules="[{ required: true, message: '请选择账号状态' }]">
<a-switch v-model:checked="postData.enabled" />
<span style="padding-left: 8px;">{{ postData.enabled ? '启用' : '禁用' }}</span>
</a-form-item>
</a-form>
</a-spin>
......@@ -38,32 +42,33 @@ import { DefaultOptionType } from "ant-design-vue/es/vc-cascader/Cascader";
import { convertToTree } from "@/common/chinaarea";
@Component({
components: {}
})
export default class InspectorAddForm extends EnhanceFormComponent<User> {
areaData: DefaultOptionType[] = [];
dialogVisible = false;
titleVisible = "新增检测师";
postData={
postData = {
realName: "",
mobile: "",
registrationCity: "",
enabled: true,
}
formState = {
realName: "",
mobile: "",
}
areaData: DefaultOptionType[] = [];
created(): void {
this.areaData = convertToTree(false);
}
init(data): void {
console.log('1111111111111111111111111111111111', data);
this.dialogVisible = true;
this.titleVisible = data.id ? "编辑检测师" : "新增检测师";
}
handleOk() {
this.$refs.formRef.validate().then((valid) => {
if (valid) {
......@@ -80,7 +85,6 @@ export default class InspectorAddForm extends EnhanceFormComponent<User> {
}
});
}
}
</script>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!