Browse Source

接单增加状态

ops-management-platform-frontend-dev
wbc 2 weeks ago
parent
commit
68d54d9d73
  1. 20
      src/views/IO/workOrder/delayAudit/detailDrawer.vue
  2. 8
      src/views/IO/workOrder/orderAudit/data.ts
  3. 72
      src/views/IO/workOrder/orderAudit/detailDrawer.vue
  4. 8
      src/views/IO/workOrder/orderHandle/data.ts
  5. 44
      src/views/IO/workOrder/orderHandle/detailDrawer.vue
  6. 2
      src/views/IO/workOrder/orderHandle/index.vue
  7. 8
      src/views/IO/workOrder/orderSearch/data.ts
  8. 30
      src/views/IO/workOrder/orderSearch/detailDrawer.vue
  9. 8
      src/views/IO/workOrder/orderSend/data.ts
  10. 72
      src/views/IO/workOrder/orderSend/detailDrawer.vue
  11. 3
      src/views/auth/login/useLogin.ts

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

@ -80,11 +80,7 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">故障图片</span> ><span class="titleLabel">故障图片</span>
<a-upload <a-upload v-model:file-list="fileLists" disabled> </a-upload>
v-model:file-list="fileLists"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -174,6 +170,14 @@
label: '作废', label: '作废',
value: 8, value: 8,
}, },
{
label: '待接单(派遣)',
value: 9,
},
{
label: '待接单(转派)',
value: 10,
},
{ {
label: '运维单位处理时回退至派遣', label: '运维单位处理时回退至派遣',
value: 3, value: 3,
@ -191,7 +195,7 @@
value: 6, value: 6,
}, },
]; ];
const fileLists = ref([]) const fileLists = ref([]);
const progress = ref([]); const progress = ref([]);
const statusText = (val) => { const statusText = (val) => {
return statusOptions.find((i) => { return statusOptions.find((i) => {
@ -202,7 +206,7 @@
const visible = ref(false); const visible = ref(false);
const showDrawer = async (id) => { const showDrawer = async (id) => {
visible.value = true; visible.value = true;
fileLists.value= [] fileLists.value = [];
const data = await getInfo(id); const data = await getInfo(id);
for (let i in detail) { for (let i in detail) {
detail[i] = data[i]; detail[i] = data[i];
@ -267,7 +271,7 @@
detail, detail,
statusText, statusText,
progress, progress,
fileLists fileLists,
}; };
}, },
}); });

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

@ -20,6 +20,14 @@ const statusOptions = [
{ {
label: '作废', label: '作废',
value: 8, value: 8,
},
{
label: '待接单(派遣)',
value: 9,
},
{
label: '待接单(转派)',
value: 10,
}, },
{ {
label:'运维单位处理时回退至派遣', label:'运维单位处理时回退至派遣',

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

@ -80,11 +80,7 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">故障图片</span> ><span class="titleLabel">故障图片</span>
<a-upload <a-upload v-model:file-list="fileLists" disabled> </a-upload>
v-model:file-list="fileLists"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -122,11 +118,7 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">处理图片</span> ><span class="titleLabel">处理图片</span>
<a-upload <a-upload v-model:file-list="fileLists1" disabled> </a-upload>
v-model:file-list="fileLists1"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -134,24 +126,26 @@
<a-tab-pane key="3" tab="流程信息"> <a-tab-pane key="3" tab="流程信息">
<div style="margin-left: 20px"> <div style="margin-left: 20px">
<a-timeline> <a-timeline>
<a-timeline-item v-for="(item, index) in progress" :key="index" > <a-timeline-item v-for="(item, index) in progress" :key="index">
<template #dot><span class="stage">{{ item.stage }}</span></template> <template #dot
><span class="stage">{{ item.stage }}</span></template
>
<div class="timeText" <div class="timeText"
><span class="person">{{ item.operator }}</span ><span class="person">{{ item.operator }}</span
>{{item.description}}</div >{{ item.description }}</div
> >
<div class="timeText">{{ item.feedback }}</div> <div class="timeText">{{ item.feedback }}</div>
<div class="operationTime">{{ item.operationTime }}</div> <div class="operationTime">{{ item.operationTime }}</div>
<div class="duration" v-if="item.duration"> <Icon icon="ant-design:dashboard-outlined" />用时{{item.duration}}</div> <div class="duration" v-if="item.duration">
<Icon icon="ant-design:dashboard-outlined" />用时{{ item.duration }}</div
>
<a-divider></a-divider> <a-divider></a-divider>
</a-timeline-item> </a-timeline-item>
</a-timeline> </a-timeline>
</div> </div>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="4" tab="历史信息"> <a-tab-pane key="4" tab="历史信息">
<a-table :dataSource="progress" :columns="historyColumns" bordered> <a-table :dataSource="progress" :columns="historyColumns" bordered> </a-table>
</a-table>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="5" tab="延期信息"> <a-tab-pane key="5" tab="延期信息">
<a-table :dataSource="delayInfo" :columns="delayColumns" bordered> <a-table :dataSource="delayInfo" :columns="delayColumns" bordered>
@ -168,12 +162,12 @@
</template> </template>
<script> <script>
import { reactive, ref,defineComponent } from 'vue'; import { reactive, ref, defineComponent } from 'vue';
import { getInfo,dealInfo, queryProcess,getOrderDelayHistory } from './api'; import { getInfo, dealInfo, queryProcess, getOrderDelayHistory } from './api';
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
export default defineComponent({ export default defineComponent({
components:{Icon}, components: { Icon },
setup(props, { emit }) { setup(props, { emit }) {
// //
let detail = reactive({ let detail = reactive({
@ -203,8 +197,8 @@
cost: '', cost: '',
attachments: '', attachments: '',
}); });
const fileLists = ref([]) const fileLists = ref([]);
const fileLists1 = ref([]) const fileLists1 = ref([]);
const progress = ref([]); const progress = ref([]);
const statusOptions = [ const statusOptions = [
{ {
@ -227,6 +221,14 @@
label: '作废', label: '作废',
value: 8, value: 8,
}, },
{
label: '待接单(派遣)',
value: 9,
},
{
label: '待接单(转派)',
value: 10,
},
{ {
label: '运维单位处理时回退至派遣', label: '运维单位处理时回退至派遣',
value: 3, value: 3,
@ -250,7 +252,7 @@
})?.label; })?.label;
}; };
const historyColumns = [ const historyColumns = [
{ {
title: '环节', title: '环节',
dataIndex: 'stage', dataIndex: 'stage',
key: 'stage', key: 'stage',
@ -273,7 +275,7 @@
]; ];
const delayInfo = ref([]); const delayInfo = ref([]);
const delayColumns = [ const delayColumns = [
{ {
title: '申请时间', title: '申请时间',
dataIndex: 'createTime', dataIndex: 'createTime',
key: 'createTime', key: 'createTime',
@ -299,8 +301,8 @@
const visible = ref(false); const visible = ref(false);
const showDrawer = async (id) => { const showDrawer = async (id) => {
visible.value = true; visible.value = true;
fileLists.value= [] fileLists.value = [];
fileLists1.value= [] fileLists1.value = [];
const data = await getInfo(id); const data = await getInfo(id);
for (let i in detail) { for (let i in detail) {
detail[i] = data[i]; detail[i] = data[i];
@ -309,10 +311,10 @@
progress.value = progressLine; progress.value = progressLine;
console.log(progress.value); console.log(progress.value);
const data1 = await dealInfo(id); const data1 = await dealInfo(id);
if(data1){ if (data1) {
for (let i in dealDetail) { for (let i in dealDetail) {
dealDetail[i] = data1[i]; dealDetail[i] = data1[i];
} }
} }
if (detail.attachments && detail.attachments.length > 0) { if (detail.attachments && detail.attachments.length > 0) {
detail.attachments.forEach((i) => { detail.attachments.forEach((i) => {
@ -342,8 +344,8 @@
// //
const onClose = () => { const onClose = () => {
visible.value = false; visible.value = false;
for(let i in dealDetail){ for (let i in dealDetail) {
dealDetail[i] = '' dealDetail[i] = '';
} }
map.value?.destroy(); map.value?.destroy();
}; };
@ -389,7 +391,7 @@
statusText, statusText,
progress, progress,
fileLists, fileLists,
fileLists1 fileLists1,
}; };
}, },
}); });
@ -407,7 +409,7 @@
div { div {
margin-bottom: 1%; margin-bottom: 1%;
} }
.stage{ .stage {
font-weight: 600; font-weight: 600;
} }
.timeText { .timeText {
@ -420,13 +422,13 @@
.operationTime { .operationTime {
color: gray; color: gray;
font-weight: 550; font-weight: 550;
margin-left:80% margin-left: 80%;
} }
.duration { .duration {
color: #00bbff; color: #00bbff;
position: absolute; position: absolute;
font-weight: 550; font-weight: 550;
margin-left:80%; margin-left: 80%;
top: 0.1%; top: 0.1%;
} }
.titleLabel { .titleLabel {

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

@ -21,6 +21,14 @@ const statusOptions = [
{ {
label: '作废', label: '作废',
value: 8, value: 8,
},
{
label: '待接单(派遣)',
value: 9,
},
{
label: '待接单(转派)',
value: 10,
}, },
{ {
label: '运维单位处理时回退至派遣', label: '运维单位处理时回退至派遣',

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

@ -80,11 +80,7 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">故障图片</span> ><span class="titleLabel">故障图片</span>
<a-upload <a-upload v-model:file-list="fileLists" disabled> </a-upload>
v-model:file-list="fileLists"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -122,11 +118,7 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">处理图片</span> ><span class="titleLabel">处理图片</span>
<a-upload <a-upload v-model:file-list="fileLists1" disabled> </a-upload>
v-model:file-list="fileLists1"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -171,7 +163,7 @@
<script> <script>
import { reactive, ref, defineComponent } from 'vue'; import { reactive, ref, defineComponent } from 'vue';
import { getInfo, getDealInfo, queryProcess,getOrderDelayHistory } from './handleApi'; import { getInfo, getDealInfo, queryProcess, getOrderDelayHistory } from './handleApi';
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
export default defineComponent({ export default defineComponent({
@ -205,8 +197,8 @@
cost: '', cost: '',
attachments: '', attachments: '',
}); });
const fileLists = ref([]) const fileLists = ref([]);
const fileLists1 = ref([]) const fileLists1 = ref([]);
const progress = ref([]); const progress = ref([]);
const statusOptions = [ const statusOptions = [
{ {
@ -229,6 +221,14 @@
label: '作废', label: '作废',
value: 8, value: 8,
}, },
{
label: '待接单(派遣)',
value: 9,
},
{
label: '待接单(转派)',
value: 10,
},
{ {
label: '运维单位处理时回退至派遣', label: '运维单位处理时回退至派遣',
value: 3, value: 3,
@ -275,7 +275,7 @@
]; ];
const delayInfo = ref([]); const delayInfo = ref([]);
const delayColumns = [ const delayColumns = [
{ {
title: '申请时间', title: '申请时间',
dataIndex: 'createTime', dataIndex: 'createTime',
key: 'createTime', key: 'createTime',
@ -301,8 +301,8 @@
const visible = ref(false); const visible = ref(false);
const showDrawer = async (id) => { const showDrawer = async (id) => {
visible.value = true; visible.value = true;
fileLists.value= [] fileLists.value = [];
fileLists1.value= [] fileLists1.value = [];
const data = await getInfo(id); const data = await getInfo(id);
for (let i in detail) { for (let i in detail) {
detail[i] = data[i]; detail[i] = data[i];
@ -320,10 +320,10 @@
progress.value = progressLine; progress.value = progressLine;
console.log(progress.value); console.log(progress.value);
const data1 = await getDealInfo(id); const data1 = await getDealInfo(id);
if(data1){ if (data1) {
for (let i in dealDetail) { for (let i in dealDetail) {
dealDetail[i] = data1[i]; dealDetail[i] = data1[i];
} }
} }
if (dealDetail.attachments && dealDetail.attachments.length > 0) { if (dealDetail.attachments && dealDetail.attachments.length > 0) {
dealDetail.attachments.forEach((i) => { dealDetail.attachments.forEach((i) => {
@ -344,8 +344,8 @@
// //
const onClose = () => { const onClose = () => {
visible.value = false; visible.value = false;
for(let i in dealDetail){ for (let i in dealDetail) {
dealDetail[i] = '' dealDetail[i] = '';
} }
map.value?.destroy(); map.value?.destroy();
}; };
@ -392,7 +392,7 @@
statusText, statusText,
progress, progress,
fileLists, fileLists,
fileLists1 fileLists1,
}; };
}, },
}); });

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

@ -10,7 +10,7 @@
cancel-text="否" cancel-text="否"
@confirm="receive(record.id)" @confirm="receive(record.id)"
> >
<a-button type="link" v-if="record.status == 1">接单</a-button> <a-button type="link" v-if="record.status == 1|| record.status == 9|| record.status == 10">接单</a-button>
</a-popconfirm> </a-popconfirm>
<a-button <a-button
type="link" type="link"

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

@ -33,6 +33,14 @@ const statusOptions = [
label: '作废', label: '作废',
value: 8, value: 8,
}, },
{
label: '待接单(派遣)',
value: 9,
},
{
label: '待接单(转派)',
value: 10,
},
{ {
label: '运维单位处理时回退至派遣', label: '运维单位处理时回退至派遣',
value: 3, value: 3,

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

@ -80,11 +80,7 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">故障图片</span> ><span class="titleLabel">故障图片</span>
<a-upload <a-upload v-model:file-list="fileLists" disabled> </a-upload>
v-model:file-list="fileLists"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -122,11 +118,7 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">处理图片</span> ><span class="titleLabel">处理图片</span>
<a-upload <a-upload v-model:file-list="fileLists1" disabled> </a-upload>
v-model:file-list="fileLists1"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -205,8 +197,8 @@
cost: '', cost: '',
attachments: '', attachments: '',
}); });
const fileLists = ref([]) const fileLists = ref([]);
const fileLists1 = ref([]) const fileLists1 = ref([]);
const progress = ref([]); const progress = ref([]);
const statusOptions = [ const statusOptions = [
{ {
@ -229,6 +221,14 @@
label: '作废', label: '作废',
value: 8, value: 8,
}, },
{
label: '待接单(派遣)',
value: 9,
},
{
label: '待接单(转派)',
value: 10,
},
{ {
label: '运维单位处理时回退至派遣', label: '运维单位处理时回退至派遣',
value: 3, value: 3,
@ -301,8 +301,8 @@
const visible = ref(false); const visible = ref(false);
const showDrawer = async (id) => { const showDrawer = async (id) => {
visible.value = true; visible.value = true;
fileLists.value= [] fileLists.value = [];
fileLists1.value= [] fileLists1.value = [];
const data = await getInfo(id); const data = await getInfo(id);
for (let i in detail) { for (let i in detail) {
detail[i] = data[i]; detail[i] = data[i];
@ -392,7 +392,7 @@
statusText, statusText,
progress, progress,
fileLists, fileLists,
fileLists1 fileLists1,
}; };
}, },
}); });

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

@ -20,6 +20,14 @@ const statusOptions = [
{ {
label: '作废', label: '作废',
value: 8, value: 8,
},
{
label: '待接单(派遣)',
value: 9,
},
{
label: '待接单(转派)',
value: 10,
}, },
{ {
label: '运维单位处理时回退至派遣', label: '运维单位处理时回退至派遣',

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

@ -80,11 +80,7 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">故障图片</span> ><span class="titleLabel">故障图片</span>
<a-upload <a-upload v-model:file-list="fileLists" disabled> </a-upload>
v-model:file-list="fileLists"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -122,11 +118,7 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">处理图片</span> ><span class="titleLabel">处理图片</span>
<a-upload <a-upload v-model:file-list="fileLists1" disabled> </a-upload>
v-model:file-list="fileLists1"
disabled
>
</a-upload>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -134,24 +126,26 @@
<a-tab-pane key="3" tab="流程信息"> <a-tab-pane key="3" tab="流程信息">
<div style="margin-left: 20px"> <div style="margin-left: 20px">
<a-timeline> <a-timeline>
<a-timeline-item v-for="(item, index) in progress" :key="index" > <a-timeline-item v-for="(item, index) in progress" :key="index">
<template #dot><span class="stage">{{ item.stage }}</span></template> <template #dot
><span class="stage">{{ item.stage }}</span></template
>
<div class="timeText" <div class="timeText"
><span class="person">{{ item.operator }}</span ><span class="person">{{ item.operator }}</span
>{{item.description}}</div >{{ item.description }}</div
> >
<div class="timeText">{{ item.feedback }}</div> <div class="timeText">{{ item.feedback }}</div>
<div class="operationTime">{{ item.operationTime }}</div> <div class="operationTime">{{ item.operationTime }}</div>
<div class="duration" v-if="item.duration"> <Icon icon="ant-design:dashboard-outlined" />用时{{item.duration}}</div> <div class="duration" v-if="item.duration">
<Icon icon="ant-design:dashboard-outlined" />用时{{ item.duration }}</div
>
<a-divider></a-divider> <a-divider></a-divider>
</a-timeline-item> </a-timeline-item>
</a-timeline> </a-timeline>
</div> </div>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="4" tab="历史信息"> <a-tab-pane key="4" tab="历史信息">
<a-table :dataSource="progress" :columns="historyColumns" bordered> <a-table :dataSource="progress" :columns="historyColumns" bordered> </a-table>
</a-table>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="5" tab="延期信息"> <a-tab-pane key="5" tab="延期信息">
<a-table :dataSource="delayInfo" :columns="delayColumns" bordered> <a-table :dataSource="delayInfo" :columns="delayColumns" bordered>
@ -168,12 +162,12 @@
</template> </template>
<script> <script>
import { reactive, ref,defineComponent } from 'vue'; import { reactive, ref, defineComponent } from 'vue';
import { getInfo, dealInfo,queryProcess,getOrderDelayHistory } from './api'; import { getInfo, dealInfo, queryProcess, getOrderDelayHistory } from './api';
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
export default defineComponent({ export default defineComponent({
components:{Icon}, components: { Icon },
setup(props, { emit }) { setup(props, { emit }) {
// //
let detail = reactive({ let detail = reactive({
@ -203,8 +197,8 @@
cost: '', cost: '',
attachments: '', attachments: '',
}); });
const fileLists = ref([]) const fileLists = ref([]);
const fileLists1 = ref([]) const fileLists1 = ref([]);
const progress = ref([]); const progress = ref([]);
const statusOptions = [ const statusOptions = [
{ {
@ -227,6 +221,14 @@
label: '作废', label: '作废',
value: 8, value: 8,
}, },
{
label: '待接单(派遣)',
value: 9,
},
{
label: '待接单(转派)',
value: 10,
},
{ {
label: '运维单位处理时回退至派遣', label: '运维单位处理时回退至派遣',
value: 3, value: 3,
@ -250,7 +252,7 @@
})?.label; })?.label;
}; };
const historyColumns = [ const historyColumns = [
{ {
title: '环节', title: '环节',
dataIndex: 'stage', dataIndex: 'stage',
key: 'stage', key: 'stage',
@ -273,7 +275,7 @@
]; ];
const delayInfo = ref([]); const delayInfo = ref([]);
const delayColumns = [ const delayColumns = [
{ {
title: '申请时间', title: '申请时间',
dataIndex: 'createTime', dataIndex: 'createTime',
key: 'createTime', key: 'createTime',
@ -299,8 +301,8 @@
const visible = ref(false); const visible = ref(false);
const showDrawer = async (id) => { const showDrawer = async (id) => {
visible.value = true; visible.value = true;
fileLists.value= [] fileLists.value = [];
fileLists1.value= [] fileLists1.value = [];
const data = await getInfo(id); const data = await getInfo(id);
for (let i in detail) { for (let i in detail) {
detail[i] = data[i]; detail[i] = data[i];
@ -309,10 +311,10 @@
progress.value = progressLine; progress.value = progressLine;
console.log(progress.value); console.log(progress.value);
const data1 = await dealInfo(id); const data1 = await dealInfo(id);
if(data1){ if (data1) {
for (let i in dealDetail) { for (let i in dealDetail) {
dealDetail[i] = data1[i]; dealDetail[i] = data1[i];
} }
} }
if (detail.attachments && detail.attachments.length > 0) { if (detail.attachments && detail.attachments.length > 0) {
detail.attachments.forEach((i) => { detail.attachments.forEach((i) => {
@ -342,8 +344,8 @@
// //
const onClose = () => { const onClose = () => {
visible.value = false; visible.value = false;
for(let i in dealDetail){ for (let i in dealDetail) {
dealDetail[i] = '' dealDetail[i] = '';
} }
map.value?.destroy(); map.value?.destroy();
}; };
@ -390,7 +392,7 @@
statusText, statusText,
progress, progress,
fileLists, fileLists,
fileLists1 fileLists1,
}; };
}, },
}); });
@ -408,7 +410,7 @@
div { div {
margin-bottom: 1%; margin-bottom: 1%;
} }
.stage{ .stage {
font-weight: 600; font-weight: 600;
} }
.timeText { .timeText {
@ -421,13 +423,13 @@
.operationTime { .operationTime {
color: gray; color: gray;
font-weight: 550; font-weight: 550;
margin-left:80% margin-left: 80%;
} }
.duration { .duration {
color: #00bbff; color: #00bbff;
position: absolute; position: absolute;
font-weight: 550; font-weight: 550;
margin-left:80%; margin-left: 80%;
top: 0.1%; top: 0.1%;
} }
.titleLabel { .titleLabel {

3
src/views/auth/login/useLogin.ts

@ -55,7 +55,7 @@ export function useFormRules(formData?: Recordable) {
const { t } = useI18n(); const { t } = useI18n();
const getAccountFormRule = computed(() => createRule(t('sys.login.accountPlaceholder'))); const getAccountFormRule = computed(() => createRule(t('sys.login.accountPlaceholder')));
const getPasswordFormRule = computed(() => createRule(t('sys.login.passwordPlaceholder'))); const getPasswordFormRule = computed(() => createRule('密码必须是大于等于6位,且包含数字大小写字母和特殊字符'));
const getCaptchaCodeFormRule = computed(() => createRule(t('sys.login.smsPlaceholder'))); const getCaptchaCodeFormRule = computed(() => createRule(t('sys.login.smsPlaceholder')));
const getSmsFormRule = computed(() => createRule(t('sys.login.smsPlaceholder'))); const getSmsFormRule = computed(() => createRule(t('sys.login.smsPlaceholder')));
/** 包括验证必填和合法性两项 */ /** 包括验证必填和合法性两项 */
@ -80,6 +80,7 @@ export function useFormRules(formData?: Recordable) {
const getFormRules = computed((): { [k: string]: ValidationRule | ValidationRule[] } => { const getFormRules = computed((): { [k: string]: ValidationRule | ValidationRule[] } => {
const accountFormRule = unref(getAccountFormRule); const accountFormRule = unref(getAccountFormRule);
const passwordFormRule = unref(getPasswordFormRule); const passwordFormRule = unref(getPasswordFormRule);
// passwordFormRule[0].pattern = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()\-_=+[{\]}\\|;:'",.<>/?]).{7,}$/
const smsFormRule = unref(getSmsFormRule); const smsFormRule = unref(getSmsFormRule);
const mobileFormRule = unref(getMobileFormRule); const mobileFormRule = unref(getMobileFormRule);
const captchaCodeFormRule = unref(getCaptchaCodeFormRule); const captchaCodeFormRule = unref(getCaptchaCodeFormRule);

Loading…
Cancel
Save