|
@@ -4,13 +4,13 @@
|
|
<s-header :name="$t('taskMessage.taskMessage')" :noback="false"></s-header>
|
|
<s-header :name="$t('taskMessage.taskMessage')" :noback="false"></s-header>
|
|
<div class="taskMessageBox flex-col">
|
|
<div class="taskMessageBox flex-col">
|
|
<van-list v-model:loading="loading" v-model:error="error" :error-text="$t('common.reqFailClkReload')"
|
|
<van-list v-model:loading="loading" v-model:error="error" :error-text="$t('common.reqFailClkReload')"
|
|
- :finished="finished" :finished-text="$t('common.noMoreTxt')" offset="300" :immediate-check="false" @load="onLoad">
|
|
|
|
|
|
+ :finished="finished" :finished-text="$t('common.noMoreTxt')" offset="300" :immediate-check="false" @load="onLoad">
|
|
<div class="searchRow flex-row justify-between">
|
|
<div class="searchRow flex-row justify-between">
|
|
<div class="flex-col">
|
|
<div class="flex-col">
|
|
<div class="flex-row justify-between bd3">
|
|
<div class="flex-row justify-between bd3">
|
|
<div class="flex-col outer4 equipmentIcon"></div>
|
|
<div class="flex-col outer4 equipmentIcon"></div>
|
|
<span class="flex-col txt2">{{ $t("taskMessage.total")
|
|
<span class="flex-col txt2">{{ $t("taskMessage.total")
|
|
- }}<span class="discountNumber">{{ alarmHistoryTotal }}</span>{{ $t("taskMessage.recordsInTotal") }}</span>
|
|
|
|
|
|
+ }}<span class="discountNumber">{{ alarmHistoryTotal }}</span>{{ $t("taskMessage.recordsInTotal") }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="l-flex-RC">
|
|
<div class="l-flex-RC">
|
|
@@ -49,7 +49,7 @@
|
|
}}
|
|
}}
|
|
</div>
|
|
</div>
|
|
<div v-if="item.statusType === 1 && isOper" class="itemRow"
|
|
<div v-if="item.statusType === 1 && isOper" class="itemRow"
|
|
- style="display: flex; justify-content: flex-end">
|
|
|
|
|
|
+ style="display: flex; justify-content: flex-end">
|
|
<van-button span="5" round type="primary" style="
|
|
<van-button span="5" round type="primary" style="
|
|
height: 2em;
|
|
height: 2em;
|
|
padding: 0 2em;
|
|
padding: 0 2em;
|
|
@@ -72,11 +72,11 @@
|
|
</div>
|
|
</div>
|
|
<div class="itemRow" style="display: flex; justify-content: flex-end">
|
|
<div class="itemRow" style="display: flex; justify-content: flex-end">
|
|
<span v-if="item.statusType === 2" style="color: #ff0000">{{
|
|
<span v-if="item.statusType === 2" style="color: #ff0000">{{
|
|
- showItemType(item.statusType)
|
|
|
|
- }}</span>
|
|
|
|
|
|
+ showItemType(item.statusType)
|
|
|
|
+ }}</span>
|
|
<span v-if="item.statusType === 3" style="color: #4fc08d">{{
|
|
<span v-if="item.statusType === 3" style="color: #4fc08d">{{
|
|
- showItemType(item.statusType)
|
|
|
|
- }}</span>
|
|
|
|
|
|
+ showItemType(item.statusType)
|
|
|
|
+ }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -85,29 +85,25 @@
|
|
</div>
|
|
</div>
|
|
<!-- 筛选弹窗 -->
|
|
<!-- 筛选弹窗 -->
|
|
<kDialog :dialogTitle="$t('taskMessage.equipmentInit.searchPop.title')"
|
|
<kDialog :dialogTitle="$t('taskMessage.equipmentInit.searchPop.title')"
|
|
- :confirmBtnTxt="$t('taskMessage.equipmentInit.searchPop.filterBtn')" ref="kDialogRef" @confirmclk="confirmClk">
|
|
|
|
|
|
+ :confirmBtnTxt="$t('taskMessage.equipmentInit.searchPop.filterBtn')" ref="kDialogRef" @confirmclk="confirmClk">
|
|
<template #content>
|
|
<template #content>
|
|
<div class="cust_vantBorder">
|
|
<div class="cust_vantBorder">
|
|
- <van-field clearable v-model="searchForm.equipmentNo" :placeholder="
|
|
|
|
- $t('taskMessage.equipmentInit.searchPop.equipmentNoPlace')
|
|
|
|
- " :label="$t('taskMessage.equipmentInit.searchPop.equipmentNo')" />
|
|
|
|
- <van-field clearable v-model="searchForm.managementSystemID" :placeholder="
|
|
|
|
- $t('taskMessage.equipmentInit.searchPop.managementSystemIDPlace')
|
|
|
|
- " :label="
|
|
|
|
- $t('taskMessage.equipmentInit.searchPop.managementSystemID')
|
|
|
|
-" />
|
|
|
|
- <van-field clearable v-model="searchForm.merchantName" :placeholder="
|
|
|
|
- $t('taskMessage.equipmentInit.searchPop.merchantNamePlace')
|
|
|
|
- " :label="$t('taskMessage.equipmentInit.searchPop.merchantName')" />
|
|
|
|
|
|
+ <van-field clearable v-model="searchForm.equipmentNo" :placeholder="$t('taskMessage.equipmentInit.searchPop.equipmentNoPlace')
|
|
|
|
+ " :label="$t('taskMessage.equipmentInit.searchPop.equipmentNo')" />
|
|
|
|
+ <van-field clearable v-model="searchForm.managementSystemID" :placeholder="$t('taskMessage.equipmentInit.searchPop.managementSystemIDPlace')
|
|
|
|
+ " :label="$t('taskMessage.equipmentInit.searchPop.managementSystemID')
|
|
|
|
+ " />
|
|
|
|
+ <van-field clearable v-model="searchForm.merchantName" :placeholder="$t('taskMessage.equipmentInit.searchPop.merchantNamePlace')
|
|
|
|
+ " :label="$t('taskMessage.equipmentInit.searchPop.merchantName')" />
|
|
<van-field @click-input="busiInpClk" readonly clearable v-model="searchForm.stateName"
|
|
<van-field @click-input="busiInpClk" readonly clearable v-model="searchForm.stateName"
|
|
- :placeholder="$t('taskMessage.equipmentInit.searchPop.statePlace')"
|
|
|
|
- :label="$t('taskMessage.equipmentInit.searchPop.state')">
|
|
|
|
|
|
+ :placeholder="$t('taskMessage.equipmentInit.searchPop.statePlace')"
|
|
|
|
+ :label="$t('taskMessage.equipmentInit.searchPop.state')">
|
|
<template #right-icon>
|
|
<template #right-icon>
|
|
<div class="l-flex-RC">
|
|
<div class="l-flex-RC">
|
|
<van-icon v-if="searchForm.stateName" @click="
|
|
<van-icon v-if="searchForm.stateName" @click="
|
|
searchForm.stateName = '';
|
|
searchForm.stateName = '';
|
|
searchForm.state = '';
|
|
searchForm.state = '';
|
|
- " class="o-mr-6" name="clear" />
|
|
|
|
|
|
+ " class="o-mr-6" name="clear" />
|
|
<van-icon @click="busiInpClk" name="arrow-down" />
|
|
<van-icon @click="busiInpClk" name="arrow-down" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -118,7 +114,7 @@
|
|
<!-- 状态选择框 -->
|
|
<!-- 状态选择框 -->
|
|
<van-popup v-model:show="busiPopShow" position="bottom">
|
|
<van-popup v-model:show="busiPopShow" position="bottom">
|
|
<van-picker :title="$t('taskMessage.equipmentInit.searchPop.statePlace')" :columns="busiPopList"
|
|
<van-picker :title="$t('taskMessage.equipmentInit.searchPop.statePlace')" :columns="busiPopList"
|
|
- :columns-field-names="busiPopFieldName" @confirm="busiPopConfirm" @cancel="busiPopShow = false" />
|
|
|
|
|
|
+ :columns-field-names="busiPopFieldName" @confirm="busiPopConfirm" @cancel="busiPopShow = false" />
|
|
</van-popup>
|
|
</van-popup>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -132,10 +128,13 @@ import { getLoginUser, styleUrl } from "@/common/js/utils";
|
|
import dateUtil from "@/utils/dateUtil";
|
|
import dateUtil from "@/utils/dateUtil";
|
|
import kDialog from "@/components/commom/kDialog/index.vue";
|
|
import kDialog from "@/components/commom/kDialog/index.vue";
|
|
import { useI18n } from "vue-i18n";
|
|
import { useI18n } from "vue-i18n";
|
|
|
|
+import { useRouter } from 'vue-router'
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
components: { sHeader, kDialog },
|
|
components: { sHeader, kDialog },
|
|
setup() {
|
|
setup() {
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
|
|
+ const router = useRouter()
|
|
// 筛选弹窗
|
|
// 筛选弹窗
|
|
const busiPopList = reactive([
|
|
const busiPopList = reactive([
|
|
{
|
|
{
|
|
@@ -231,12 +230,12 @@ export default {
|
|
searchParams.userName = searchForm.merchantName;
|
|
searchParams.userName = searchForm.merchantName;
|
|
searchParams.managerId = searchForm.managementSystemID;
|
|
searchParams.managerId = searchForm.managementSystemID;
|
|
const { data } = await getTaskEquipmentList(
|
|
const { data } = await getTaskEquipmentList(
|
|
- Object.assign({}, searchParams)
|
|
|
|
|
|
+ Object.assign({}, searchParams)
|
|
);
|
|
);
|
|
if (data.code === "00000") {
|
|
if (data.code === "00000") {
|
|
// 列表值叠加
|
|
// 列表值叠加
|
|
alarmHistoryList.value = alarmHistoryList.value.concat(
|
|
alarmHistoryList.value = alarmHistoryList.value.concat(
|
|
- data.data.records
|
|
|
|
|
|
+ data.data.records
|
|
);
|
|
);
|
|
alarmHistoryTotal.value = data.data.total;
|
|
alarmHistoryTotal.value = data.data.total;
|
|
if (alarmHistoryList.value.length === data.data.total) {
|
|
if (alarmHistoryList.value.length === data.data.total) {
|
|
@@ -249,8 +248,8 @@ export default {
|
|
};
|
|
};
|
|
const showDateTime = (date) => {
|
|
const showDateTime = (date) => {
|
|
return date
|
|
return date
|
|
- ? dateUtil.formateDate(new Date(date), "yyyy-MM-dd hh:mm:ss")
|
|
|
|
- : "";
|
|
|
|
|
|
+ ? dateUtil.formateDate(new Date(date), "yyyy-MM-dd hh:mm:ss")
|
|
|
|
+ : "";
|
|
};
|
|
};
|
|
const showItemType = (type) => {
|
|
const showItemType = (type) => {
|
|
if (type === 1) {
|
|
if (type === 1) {
|
|
@@ -264,11 +263,24 @@ export default {
|
|
}
|
|
}
|
|
return "";
|
|
return "";
|
|
};
|
|
};
|
|
- const changeStatusFun = (item, status) => {
|
|
|
|
- changeStatus({ id: item.id, status: status }).then((res) => {
|
|
|
|
- Toast(res.data.message);
|
|
|
|
- getList();
|
|
|
|
- });
|
|
|
|
|
|
+ const changeStatusFun = async (item, status) => {
|
|
|
|
+ try {
|
|
|
|
+ const res = await changeStatus({ id: item.id, status: status });
|
|
|
|
+ Toast.success({
|
|
|
|
+ message: res.data.message,
|
|
|
|
+ forbidClick: true,
|
|
|
|
+ duration: 1500,
|
|
|
|
+ });
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ router.go(0); // 刷新当前页面
|
|
|
|
+ }, 1500); // 延迟1.5秒后执行刷新操作
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.error(error);
|
|
|
|
+ // 处理错误情况
|
|
|
|
+ }
|
|
|
|
+ // changeStatus({ id: item.id, status: status }).then((res) => {
|
|
|
|
+ // getList();
|
|
|
|
+ // });
|
|
};
|
|
};
|
|
// 是否有操作的权限
|
|
// 是否有操作的权限
|
|
const isOper = ref(true);
|
|
const isOper = ref(true);
|