|
|
|
@ -41,11 +41,12 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="GPS时间" prop="internationalization5">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="queryParams.internationalization5"
|
|
|
|
|
type="datetimerange"
|
|
|
|
|
range-separator="到"
|
|
|
|
|
start-placeholder="开始时间"
|
|
|
|
|
end-placeholder="结束时间"
|
|
|
|
|
v-model="dateRange"
|
|
|
|
|
value-format="YYYY-MM-DD"
|
|
|
|
|
type="daterange"
|
|
|
|
|
range-separator="-"
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label=" ">
|
|
|
|
@ -56,38 +57,6 @@
|
|
|
|
|
|
|
|
|
|
<!-- 顶部操作按钮-->
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
v-hasPermi="['test:test:add']"
|
|
|
|
|
icon="Plus"
|
|
|
|
|
plain
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="handleAdd"
|
|
|
|
|
>{{ t('option.add') }}
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
v-hasPermi="['test:test:edit']"
|
|
|
|
|
:disabled="single"
|
|
|
|
|
icon="Edit"
|
|
|
|
|
plain
|
|
|
|
|
type="success"
|
|
|
|
|
@click="handleUpdate"
|
|
|
|
|
>{{ t('option.edit') }}
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
v-hasPermi="['test:test:remove']"
|
|
|
|
|
:disabled="multiple"
|
|
|
|
|
icon="Delete"
|
|
|
|
|
plain
|
|
|
|
|
type="danger"
|
|
|
|
|
@click="handleDelete"
|
|
|
|
|
>{{ t('option.remove') }}
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
v-hasPermi="['test:test:export']"
|
|
|
|
@ -104,61 +73,42 @@
|
|
|
|
|
<!-- 表格主体-->
|
|
|
|
|
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column align="center" fixed type="selection" width="55"/>
|
|
|
|
|
<el-table-column label="序号" align="center" prop="internationalization1"
|
|
|
|
|
<el-table-column align="center" label="序号" prop="internationalization1"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="轮胎编号" align="center" prop="internationalization2"
|
|
|
|
|
<el-table-column align="center" label="轮胎编号" prop="internationalization2"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="轮胎位置" align="center" prop="internationalization3"
|
|
|
|
|
<el-table-column align="center" label="轮胎位置" prop="internationalization3"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="胎压传感器ID" align="center" prop="internationalization4"
|
|
|
|
|
<el-table-column align="center" label="胎压传感器ID" prop="internationalization4"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="GPS时间" align="center" prop="internationalization5"
|
|
|
|
|
<el-table-column align="center" label="GPS时间" prop="internationalization5"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="接收机ID" align="center" prop="internationalization6"
|
|
|
|
|
<el-table-column align="center" label="接收机ID" prop="internationalization6"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="传感器电池电压" align="center" prop="internationalization7"
|
|
|
|
|
<el-table-column align="center" label="传感器电池电压" prop="internationalization7"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="压力值" align="center" prop="internationalization8"
|
|
|
|
|
<el-table-column align="center" label="压力值" prop="internationalization8"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="温度值" align="center" prop="internationalization9"
|
|
|
|
|
<el-table-column align="center" label="温度值" prop="internationalization9"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="是否低电压" align="center" prop="internationalization10"
|
|
|
|
|
<el-table-column align="center" label="是否低电压" prop="internationalization10"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="是否60分钟未收到数据" align="center" prop="internationalization11"
|
|
|
|
|
<el-table-column align="center" label="是否60分钟未收到数据" prop="internationalization11"
|
|
|
|
|
width="180"/>
|
|
|
|
|
<el-table-column label="传感器是否运行" align="center" prop="internationalization12"
|
|
|
|
|
<el-table-column align="center" label="传感器是否运行" prop="internationalization12"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="是否气压高" align="center" prop="internationalization13"
|
|
|
|
|
<el-table-column align="center" label="是否气压高" prop="internationalization13"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="是否气压低" align="center" prop="internationalization14"
|
|
|
|
|
<el-table-column align="center" label="是否气压低" prop="internationalization14"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="是否温度高" align="center" prop="internationalization15"
|
|
|
|
|
<el-table-column align="center" label="是否温度高" prop="internationalization15"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="气压状态" align="center" prop="internationalization16"
|
|
|
|
|
<el-table-column align="center" label="气压状态" prop="internationalization16"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="纬度" align="center" prop="internationalization17"
|
|
|
|
|
<el-table-column align="center" label="纬度" prop="internationalization17"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column label="经度" align="center" prop="internationalization18"
|
|
|
|
|
<el-table-column align="center" label="经度" prop="internationalization18"
|
|
|
|
|
width="150"/>
|
|
|
|
|
<el-table-column :label="t('option.option')" align="center" class-name="small-padding fixed-width" fixed="right"
|
|
|
|
|
width="160">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
v-hasPermi="['test:test:edit']"
|
|
|
|
|
icon="Edit"
|
|
|
|
|
type="text"
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
>{{ t('option.edit') }}
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
v-hasPermi="['test:test:remove']"
|
|
|
|
|
icon="Delete"
|
|
|
|
|
type="text"
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
>{{ t('option.remove') }}
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<!-- 分页-->
|
|
|
|
@ -170,175 +120,6 @@
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改岗位对话框 -->
|
|
|
|
|
<el-dialog v-model="open" :title="title" append-to-body width="500px">
|
|
|
|
|
<el-form ref="postRef" :label-width=" locale ? '90px':'140px'" :model="form" :rules="rules">
|
|
|
|
|
<el-form-item v-if="false" prop="id">
|
|
|
|
|
<el-input v-model="form.id"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization1')" prop="internationalization1">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization1"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization1')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization2')" prop="internationalization2">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization2"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization2')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization3')" prop="internationalization3">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization3"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization3')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization4')" prop="internationalization4">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization4"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization4')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization5')" prop="internationalization5">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization5"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization5')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization6')" prop="internationalization6">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization6"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization6')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization7')" prop="internationalization7">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization7"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization7')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization8')" prop="internationalization8">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization8"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization8')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization9')" prop="internationalization9">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization9"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization9')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization10')" prop="internationalization10">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization10"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization10')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization11')" prop="internationalization11">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization11"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization11')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization12')" prop="internationalization12">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization12"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization12')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization13')" prop="internationalization13">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization13"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization13')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization14')" prop="internationalization14">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization14"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization14')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization15')" prop="internationalization15">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization15"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization15')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization16')" prop="internationalization16">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization16"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization16')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization17')" prop="internationalization17">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization17"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization17')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization18')" prop="internationalization18">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization18"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization18')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization19')" prop="internationalization19">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization19"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization19')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('test.test.internationalization20')" prop="internationalization20">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.internationalization20"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization20')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('common.isRemove')" prop="isDelete">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.isDelete"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('common.isRemove')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('common.createTime')" prop="createTime">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="form.createTime"
|
|
|
|
|
:placeholder="t('common.PleaseSelect') + t('common.createTime')"
|
|
|
|
|
clearable
|
|
|
|
|
format="YYYY/MM/DD"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="YYYY-MM-DD"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('common.creatorId')" prop="createId">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.createId"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('common.creatorId')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('common.createBy')" prop="createBy">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.createBy"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('common.createBy')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('common.creatorName')" prop="createName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.createName"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('common.creatorName')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('common.editTime')" prop="modifyTime">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="form.modifyTime"
|
|
|
|
|
:placeholder="t('common.PleaseSelect') + t('common.editTime')"
|
|
|
|
|
clearable
|
|
|
|
|
format="YYYY/MM/DD"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="YYYY-MM-DD"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('common.editID')" prop="modifyId">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.modifyId"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('common.editID')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('common.editBy')" prop="modifyBy">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.modifyBy"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('common.editBy')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('common.editName')" prop="modifyName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.modifyName"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('common.editName')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitForm">{{ t('option.ok') }}</el-button>
|
|
|
|
|
<el-button @click="cancel">{{ t('option.cancel') }}</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -353,25 +134,15 @@ const {t} = useI18n();
|
|
|
|
|
const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
|
|
|
|
|
const {proxy} = getCurrentInstance();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 表格数据
|
|
|
|
|
const postList = ref([]);
|
|
|
|
|
// 模态框开关标识
|
|
|
|
|
const open = ref(false);
|
|
|
|
|
// 表格加载状态开关标识
|
|
|
|
|
const loading = ref(true);
|
|
|
|
|
// 搜索区域开关标识
|
|
|
|
|
const showSearch = ref(true);
|
|
|
|
|
// 选择行id
|
|
|
|
|
const ids = ref([]);
|
|
|
|
|
// 修改按钮是否可用标识
|
|
|
|
|
const single = ref(true);
|
|
|
|
|
// 删除按钮是否可用标识
|
|
|
|
|
const multiple = ref(true);
|
|
|
|
|
// 总条数
|
|
|
|
|
const total = ref(0);
|
|
|
|
|
// 模态框标题
|
|
|
|
|
const title = ref("");
|
|
|
|
|
const dateRange = ref([]);
|
|
|
|
|
|
|
|
|
|
// 搜索参数
|
|
|
|
|
const queryParams = ref({
|
|
|
|
@ -382,78 +153,13 @@ const queryParams = ref({
|
|
|
|
|
internationalization3: undefined,
|
|
|
|
|
internationalization4: undefined,
|
|
|
|
|
internationalization5: undefined,
|
|
|
|
|
internationalization6: undefined,
|
|
|
|
|
internationalization7: undefined,
|
|
|
|
|
internationalization8: undefined,
|
|
|
|
|
internationalization9: undefined,
|
|
|
|
|
internationalization10: undefined,
|
|
|
|
|
internationalization11: undefined,
|
|
|
|
|
internationalization12: undefined,
|
|
|
|
|
internationalization13: undefined,
|
|
|
|
|
internationalization14: undefined,
|
|
|
|
|
internationalization15: undefined,
|
|
|
|
|
internationalization16: undefined,
|
|
|
|
|
internationalization17: undefined,
|
|
|
|
|
internationalization18: undefined,
|
|
|
|
|
internationalization19: undefined,
|
|
|
|
|
internationalization20: undefined,
|
|
|
|
|
isDelete: undefined,
|
|
|
|
|
createTime: undefined,
|
|
|
|
|
createId: undefined,
|
|
|
|
|
createBy: undefined,
|
|
|
|
|
createName: undefined,
|
|
|
|
|
modifyTime: undefined,
|
|
|
|
|
modifyId: undefined,
|
|
|
|
|
modifyBy: undefined,
|
|
|
|
|
modifyName: undefined,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 表单验证规则
|
|
|
|
|
const rules = {
|
|
|
|
|
brand: [{required: true, message: "轮胎品牌不能为空", trigger: "blur"}],
|
|
|
|
|
type: [{required: true, message: "轮胎型号不能为空", trigger: "blur"}],
|
|
|
|
|
serialNumber: [{required: true, message: "轮胎编号不能为空", trigger: "blur"}],
|
|
|
|
|
depth: [{required: true, message: "花纹深度不能为空", trigger: "blur"}],
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 表单数据
|
|
|
|
|
const form = ref({
|
|
|
|
|
id: null,
|
|
|
|
|
internationalization1: null,
|
|
|
|
|
internationalization2: null,
|
|
|
|
|
internationalization3: null,
|
|
|
|
|
internationalization4: null,
|
|
|
|
|
internationalization5: null,
|
|
|
|
|
internationalization6: null,
|
|
|
|
|
internationalization7: null,
|
|
|
|
|
internationalization8: null,
|
|
|
|
|
internationalization9: null,
|
|
|
|
|
internationalization10: null,
|
|
|
|
|
internationalization11: null,
|
|
|
|
|
internationalization12: null,
|
|
|
|
|
internationalization13: null,
|
|
|
|
|
internationalization14: null,
|
|
|
|
|
internationalization15: null,
|
|
|
|
|
internationalization16: null,
|
|
|
|
|
internationalization17: null,
|
|
|
|
|
internationalization18: null,
|
|
|
|
|
internationalization19: null,
|
|
|
|
|
internationalization20: null,
|
|
|
|
|
isDelete: null,
|
|
|
|
|
createTime: null,
|
|
|
|
|
createId: null,
|
|
|
|
|
createBy: null,
|
|
|
|
|
createName: null,
|
|
|
|
|
modifyTime: null,
|
|
|
|
|
modifyId: null,
|
|
|
|
|
modifyBy: null,
|
|
|
|
|
modifyName: null,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/** 查询岗位列表 */
|
|
|
|
|
function getList() {
|
|
|
|
|
loading.value = true;
|
|
|
|
|
listTest(queryParams.value).then(response => {
|
|
|
|
|
listTest(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
|
|
|
|
|
postList.value = response.rows;
|
|
|
|
|
total.value = response.total;
|
|
|
|
|
}).finally(() => {
|
|
|
|
@ -467,43 +173,6 @@ function cancel() {
|
|
|
|
|
reset();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 表单重置 */
|
|
|
|
|
function reset() {
|
|
|
|
|
form.value = {
|
|
|
|
|
id: null,
|
|
|
|
|
internationalization1: null,
|
|
|
|
|
internationalization2: null,
|
|
|
|
|
internationalization3: null,
|
|
|
|
|
internationalization4: null,
|
|
|
|
|
internationalization5: null,
|
|
|
|
|
internationalization6: null,
|
|
|
|
|
internationalization7: null,
|
|
|
|
|
internationalization8: null,
|
|
|
|
|
internationalization9: null,
|
|
|
|
|
internationalization10: null,
|
|
|
|
|
internationalization11: null,
|
|
|
|
|
internationalization12: null,
|
|
|
|
|
internationalization13: null,
|
|
|
|
|
internationalization14: null,
|
|
|
|
|
internationalization15: null,
|
|
|
|
|
internationalization16: null,
|
|
|
|
|
internationalization17: null,
|
|
|
|
|
internationalization18: null,
|
|
|
|
|
internationalization19: null,
|
|
|
|
|
internationalization20: null,
|
|
|
|
|
isDelete: null,
|
|
|
|
|
createTime: null,
|
|
|
|
|
createId: null,
|
|
|
|
|
createBy: null,
|
|
|
|
|
createName: null,
|
|
|
|
|
modifyTime: null,
|
|
|
|
|
modifyId: null,
|
|
|
|
|
modifyBy: null,
|
|
|
|
|
modifyName: null,
|
|
|
|
|
};
|
|
|
|
|
proxy.resetForm("postRef");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
function handleQuery() {
|
|
|
|
|
queryParams.value.pageNum = 1;
|
|
|
|
@ -516,67 +185,6 @@ const resetQuery = () => {
|
|
|
|
|
handleQuery();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 多选框选中数据 */
|
|
|
|
|
function handleSelectionChange(selection) {
|
|
|
|
|
ids.value = selection.map(item => item.id);
|
|
|
|
|
single.value = selection.length !== 1;
|
|
|
|
|
multiple.value = !selection.length;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
function handleAdd() {
|
|
|
|
|
reset();
|
|
|
|
|
open.value = true;
|
|
|
|
|
title.value = t('test.test.addTitle');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
function handleUpdate(row) {
|
|
|
|
|
reset();
|
|
|
|
|
const postId = row.id || ids.value;
|
|
|
|
|
getTest(postId).then(response => {
|
|
|
|
|
form.value = response.data;
|
|
|
|
|
open.value = true;
|
|
|
|
|
title.value = t('test.test.editTitle');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
function submitForm() {
|
|
|
|
|
proxy.$refs["postRef"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (form.value.id != undefined) {
|
|
|
|
|
updateTest(form.value).then(response => {
|
|
|
|
|
proxy.$modal.msgSuccess(t('option.modificationSuccessful'));
|
|
|
|
|
open.value = false;
|
|
|
|
|
getList();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
addTest(form.value).then(response => {
|
|
|
|
|
proxy.$modal.msgSuccess(t('option.addedSuccessfully'));
|
|
|
|
|
open.value = false;
|
|
|
|
|
getList();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
function handleDelete(row) {
|
|
|
|
|
const postIds = row.postId || ids.value;
|
|
|
|
|
proxy.$modal.confirm(t('option.confirmDeletion', {
|
|
|
|
|
key: t('test.test.internationalization1'),
|
|
|
|
|
value: postIds
|
|
|
|
|
})).then(function () {
|
|
|
|
|
return delTest(postIds);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
getList();
|
|
|
|
|
proxy.$modal.msgSuccess(t('option.successfullyDeleted'));
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
function handleExport() {
|
|
|
|
|
proxy.download("system/post/export", {
|
|
|
|
|