Commit e2080128 authored by shuiluo's avatar shuiluo

feat: 任务中心国际化完成

parent 5004a108
......@@ -6,6 +6,7 @@ import InputLang from './input';
import OtherLang from './other';
import acronLang from './acron';
import basicLang from './basic';
import taskCenterLang from './task_center';
const zh_CN = {};
const en_US = {};
......@@ -29,5 +30,6 @@ formatLang(InputLang);
formatLang(OtherLang);
formatLang(acronLang);
formatLang(basicLang);
formatLang(taskCenterLang);
export { en_US, zh_CN };
......@@ -35,7 +35,7 @@ export default {
'table.view': ['查看', 'View'],
'table.export': ['导出', 'export'],
'table.placeName': ['地点名称', 'Place Name'],
'table.place': ['地点', 'place'],
'table.place': ['地点', 'Place'],
'table.QrCode': ['二维码', 'Qr Code'],
'table.ElectronicTags': ['电子标签', 'Electronic tags'],
'table.exemption': ['免检', 'Exemption'],
......@@ -70,4 +70,11 @@ export default {
'table.distributionModeError': ['请选择分配方式', 'Please Select Distribution Mode'],
'table.yes': ['', 'YES'],
'table.no': ['', 'NO'],
'table.patrolResults': ['巡查结果', 'Patrol Results'],
'table.patrolTime': ['巡查时间', 'Patrol Time'],
'table.collectData': ['采集数据', 'Collect Data'],
'table.referenceValue': ['参考值', 'Reference Value'],
'table.inspectionItems': ['巡检项目', 'Patrol Inspection Items'],
'table.errors': ['异常', 'Errors'],
'table.completionRate': ['完成率', 'Completion Rate'],
};
export default {
'task.remarksAndAttachments': ['备注 & 附件', 'Remarks & Attachments'],
'task.images': ['图片', 'Images'],
'task.videos': ['视频', 'Videos'],
};
......@@ -10,42 +10,28 @@
ref="table"
>
<template #search="{ query }">
<MoreItem label="开始时间">
<MoreItem :label="$t('select.startTime')">
<a-date-picker
class="tw-w-full"
show-time
v-model="query.startTime"
valueFormat="YYYY-MM-DD HH:mm:ss"
:placeholder="$t('select.placeholder')"
/>
</MoreItem>
<MoreItem label="结束时间">
<MoreItem :label="$t('select.endTime')">
<a-date-picker
class="tw-w-full"
show-time
v-model="query.endTime"
valueFormat="YYYY-MM-DD HH:mm:ss"
:placeholder="$t('select.placeholder')"
/>
</MoreItem>
</template>
<template #moreSearch="{ query }">
<MoreItem label="开始时间">
<a-date-picker
class="tw-w-full"
show-time
v-model="query.startTime"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</MoreItem>
<MoreItem label="结束时间">
<a-date-picker
class="tw-w-full"
show-time
v-model="query.endTime"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</MoreItem>
<MoreItem label="地点">
<MoreItem :label="$t('table.place')">
<UrlSelect
v-model="query.placeId"
:url="`/ranger/inspection/api/v1/place/regions/${row.regionId}/list`"
......@@ -54,7 +40,7 @@
/>
</MoreItem>
<MoreItem label="单元">
<MoreItem :label="$t('table.unit')">
<UrlSelect
v-model="query.unitId"
:url="
......@@ -67,7 +53,7 @@
/>
</MoreItem>
<MoreItem label="项目">
<MoreItem :label="$t('table.item')">
<UrlSelect
v-model="query.itemId"
:url="
......@@ -78,7 +64,7 @@
/>
</MoreItem>
<MoreItem label="巡检状态">
<MoreItem :label="$t('select.examine')">
<UrlSelect
v-model="query.inspectionState"
:url="zhuangTaiUrl"
......@@ -87,7 +73,7 @@
/>
</MoreItem>
<MoreItem label="巡查结果">
<MoreItem :label="$t('table.patrolResults')">
<UrlSelect
:url="xunChaJieGuoUrl"
v-model="query.inspectionResultName"
......@@ -96,7 +82,7 @@
/>
</MoreItem>
<MoreItem label="巡检人">
<MoreItem :label="$t('select.examiner')">
<SearchSelect
url="/api/v1/users/searching"
searchField="userName"
......@@ -111,13 +97,17 @@
<ViewDetailCom v-bind="drawer" />
</template>
<a-table-column title="巡检项目" data-index="taskName" />
<a-table-column title="参考值" data-index="referenceValue" width="150px" />
<a-table-column title="采集数据" data-index="value" width="150px" />
<a-table-column title="巡查结果" data-index="inspectionResultName" width="100px" />
<a-table-column title="巡查时间" data-index="inspectionTime" width="200px" />
<a-table-column title="巡检人" data-index="inspectionStaffName" width="100px" />
<a-table-column title="状态" data-index="inspectionStateName" width="100px" />
<a-table-column :title="$t('table.inspectionItems')" data-index="taskName" />
<a-table-column :title="$t('table.referenceValue')" data-index="referenceValue" width="150px" />
<a-table-column :title="$t('table.collectData')" data-index="value" width="150px" />
<a-table-column
:title="$t('table.patrolResults')"
data-index="inspectionResultName"
width="100px"
/>
<a-table-column :title="$t('table.patrolTime')" data-index="inspectionTime" width="200px" />
<a-table-column :title="$t('select.examiner')" data-index="inspectionStaffName" width="100px" />
<a-table-column :title="$t('table.state')" data-index="inspectionStateName" width="100px" />
</Table>
</Wraper>
</template>
......@@ -139,14 +129,14 @@ export default {
return {
scroll: { x: 1200, y: 500 },
buttons: {
title: '备注 & 附件',
title: this.$t('task.remarksAndAttachments'),
options: {
fixed: 'right',
width: 100,
},
data: [
{
label: '查看',
label: this.$t('table.view'),
click: this.viewDetail,
},
],
......@@ -166,7 +156,7 @@ export default {
},
methods: {
viewDetail(row) {
this.$refs.table.show({ row, title: '备注 & 附件' });
this.$refs.table.show({ row, title: this.$t('task.remarksAndAttachments') });
},
},
};
......
<template>
<Wraper :hidden="hidden" :onOk="submit" :refresh="refresh">
<a-form-model layout="vertical" :model="form" :rules="rules" ref="form">
<a-form-model-item label="地区" prop="regionId">
<a-form-model-item :label="$t('select.region')" prop="regionId">
<UrlSelect
url="/ranger/inspection/api/v1/region/list"
v-model="form.regionId"
......@@ -10,7 +10,7 @@
/>
</a-form-model-item>
<a-form-model-item label="线路" prop="routeId">
<a-form-model-item :label="$t('select.routes')" prop="routeId">
<UrlSelect
:url="xianLuUrl"
labelFiled="routeName"
......@@ -19,7 +19,7 @@
/>
</a-form-model-item>
<a-form-model-item label="班组" prop="shiftType">
<a-form-model-item :label="$t('select.shiftTypeName')" prop="shiftType">
<RequestSelect
:request="getBanZuListApi"
v-model="form.shiftType"
......@@ -28,7 +28,7 @@
/>
</a-form-model-item>
<a-form-model-item label="任务时间" prop="jobTime">
<a-form-model-item :label="$t('table.jobTime')" prop="jobTime">
<a-date-picker
showTime
class="tw-w-full"
......@@ -37,7 +37,7 @@
/>
</a-form-model-item>
<a-form-model-item label="巡检人" prop="inspectionIdList">
<a-form-model-item :label="$t('select.examiner')" prop="inspectionIdList">
<SearchSelect
url="/api/v1/users/searching"
searchField="userName"
......@@ -69,11 +69,11 @@ export default {
getBanZuListApi: getStaticDataByTwoParamsApi('rpis_route_schedule', 'shift_type'),
form: {},
rules: {
inspectionIdList: [{ required: true }],
jobTime: [{ required: true }],
shiftType: [{ required: true }],
routeId: [{ required: true }],
regionId: [{ required: true }],
inspectionIdList: [{ required: true, message: this.$t('select.placeholder') }],
jobTime: [{ required: true, message: this.$t('select.placeholder') }],
shiftType: [{ required: true, message: this.$t('select.placeholder') }],
routeId: [{ required: true, message: this.$t('select.placeholder') }],
regionId: [{ required: true, message: this.$t('select.regionError') }],
},
};
},
......
......@@ -2,37 +2,33 @@
<Wraper noFooter :hidden="hidden">
<a-space class="tw-mb-6" size="large">
<span>
地点
{{ $t('table.place') }}
<span class="tw-text-blue-500 tw-mx-1">{{ row.placeNum }}</span>
</span>
<span>
单元
{{ $t('table.unit') }}
<span class="tw-text-blue-500 tw-mx-1">{{ row.unitNum }}</span>
</span>
<span>
项目
{{ $t('table.item') }}
<span class="tw-text-blue-500 tw-mx-1">{{ row.itemNum }}</span>
</span>
<span>
异常
{{ $t('table.errors') }}
<span class="tw-text-red-500 tw-mx-1">{{ row.abnormalNum }}</span>
</span>
<span>
完成率
{{ $t('table.completionRate') }}
<span class="tw-text-blue-500 tw-mx-1">
{{ row.unitNum ? (row.finishedNum / row.unitNum).toFixed(2) : 0 }}
</span>
</span>
</a-space>
<Table :url="tableUrl" rowKey="progressId" noPadding>
<a-table-column title="地点名称" data-index="placeName" />
<a-table-column title="开始时间" data-index="inspectionStartTime" />
<a-table-column title="结束时间" data-index="inspectionEndTime" />
<a-table-column title="状态" data-index="inspectionStateName" />
<a-table-column :title="$t('table.placeName')" data-index="placeName" />
<a-table-column :title="$t('select.startTime')" data-index="inspectionStartTime" />
<a-table-column :title="$t('select.endTime')" data-index="inspectionEndTime" />
<a-table-column :title="$t('table.state')" data-index="inspectionStateName" />
</Table>
</Wraper>
</template>
......@@ -44,9 +40,6 @@ import Table from '@/components/table/table.vue';
export default {
props: { hidden: Function, row: Object },
components: { Wraper, Table },
mounted() {
console.log(this.row);
},
computed: {
tableUrl() {
return `/ranger/inspection/api/v1/jobs/progress?jobId=${this.row.jobId}`;
......
<template>
<Wraper noFooter :hidden="hidden">
<span>备注</span>
<span>{{ $t('table.remark') }}</span>
<div style="min-height: 100px" class="tw-font-medium tw-mt-2">{{ detailData.inspectionRemark }}</div>
<a-tabs>
<!-- Todo -->
<a-tab-pane key="1" tab="图片"></a-tab-pane>
<a-tab-pane key="2" tab="视频"></a-tab-pane>
<a-tab-pane key="1" :tab="$t('task.images')"></a-tab-pane>
<a-tab-pane key="2" :tab="$t('task.videos')"></a-tab-pane>
</a-tabs>
</Wraper>
</template>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment