bugfix and performance improvements
This commit is contained in:
@ -3,7 +3,9 @@
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<router-link to="./releaseService">
|
||||
<el-button type="primary" size="small">发布需求</el-button>
|
||||
<el-button type="primary" size="small"
|
||||
>{{ t("admin.table.publishDemand") }}
|
||||
</el-button>
|
||||
</router-link>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
@ -19,7 +21,9 @@
|
||||
>
|
||||
<el-radio-button :label="0">待受理</el-radio-button>
|
||||
<el-radio-button :label="1">已受理</el-radio-button>
|
||||
<el-radio-button :label="2">已驳回</el-radio-button>
|
||||
<el-radio-button :label="2"
|
||||
>{{ t("admin.table.rejected") }}
|
||||
</el-radio-button>
|
||||
<el-radio-button :label="4">已结束</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
@ -60,31 +64,31 @@
|
||||
icon="Delete"
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
{{ t("admin.common.delete") }}</el-button
|
||||
>
|
||||
{{ t("admin.common.delete") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="queryParams.type == 0"
|
||||
size="small"
|
||||
type="text"
|
||||
icon="Close"
|
||||
@click="handleDelete(row.id)"
|
||||
>{{ t("admin.common.cancel") }}发布</el-button
|
||||
>
|
||||
>{{ t("admin.common.cancel") }}发布
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="queryParams.type != 2"
|
||||
size="small"
|
||||
type="text"
|
||||
icon="View"
|
||||
@click="handleEdit(row.id)"
|
||||
>查看</el-button
|
||||
>
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="text"
|
||||
icon="View"
|
||||
@click="complete(row.id)"
|
||||
>完成</el-button
|
||||
>
|
||||
>完成
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -107,6 +111,7 @@ import modal from "@/plugins/modal";
|
||||
import { getCurrentInstance, onActivated } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const router = useRouter();
|
||||
@ -159,21 +164,30 @@ const getList = async () => {
|
||||
total.value = resp.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
dateRange.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(id) {
|
||||
modal
|
||||
.confirm('是否确认删除订单号为"' + id + '"的数据项?')
|
||||
.confirm(
|
||||
t("admin.common.confirmAction", {
|
||||
action: t("admin.common.delete"),
|
||||
type: t("admin.form.order"),
|
||||
number: id,
|
||||
})
|
||||
)
|
||||
.then(function () {
|
||||
return demandDelete(postIds);
|
||||
})
|
||||
@ -183,6 +197,7 @@ function handleDelete(id) {
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
function handleEdit(id) {
|
||||
router.push({ path: "./releaseService", query: { id } });
|
||||
}
|
||||
|
Reference in New Issue
Block a user