update
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
import DOWNICON from "../static/icons/down.png";
|
import DOWNICON from "../static/icons/down.png";
|
||||||
import {onMounted, reactive} from "vue";
|
import {onMounted, reactive} from "vue";
|
||||||
|
|
||||||
|
const emits = defineEmits(['change']);
|
||||||
const {placeholder, api} = defineProps({
|
const {placeholder, api} = defineProps({
|
||||||
placeholder: {
|
placeholder: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -19,6 +20,7 @@ const modelValue = defineModel();
|
|||||||
|
|
||||||
const change = ({detail: {value}}) => {
|
const change = ({detail: {value}}) => {
|
||||||
modelValue.value = list.filter(v => !v.hidden)[value].id;
|
modelValue.value = list.filter(v => !v.hidden)[value].id;
|
||||||
|
emits('change', modelValue.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -31,7 +33,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<picker :range="list.filter(v => !v.hidden).map(v => v.name)" @change="change">
|
<picker :range="list.filter(v => !v.hidden).map(v => v.name)" @change="change">
|
||||||
<view class="x-select">
|
<view class="x-select" v-if="!$slots.default">
|
||||||
<view v-if="modelValue === null" class="text-[#86909C] test-28r">
|
<view v-if="modelValue === null" class="text-[#86909C] test-28r">
|
||||||
{{ placeholder }}
|
{{ placeholder }}
|
||||||
</view>
|
</view>
|
||||||
@@ -41,6 +43,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
<image :src="DOWNICON" class="!size-[24rpx]" mode="aspectFill"></image>
|
<image :src="DOWNICON" class="!size-[24rpx]" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<slot v-else></slot>
|
||||||
</picker>
|
</picker>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import Api from "../../api/index.js";
|
|||||||
import {onShow} from "@dcloudio/uni-app";
|
import {onShow} from "@dcloudio/uni-app";
|
||||||
import {useSystemStore} from "../../pinia/SystemStore/index.js";
|
import {useSystemStore} from "../../pinia/SystemStore/index.js";
|
||||||
import XPrompt from "../../components/XPrompt.vue";
|
import XPrompt from "../../components/XPrompt.vue";
|
||||||
|
import XSelect from "../../components/XSelect.vue";
|
||||||
|
|
||||||
const SystemStore = useSystemStore();
|
const SystemStore = useSystemStore();
|
||||||
const BASE = [
|
const BASE = [
|
||||||
@@ -84,6 +85,14 @@ const deleteItem = async (id) => {
|
|||||||
showToast(msg);
|
showToast(msg);
|
||||||
await getData();
|
await getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const changeStatus = async (value, item) => {
|
||||||
|
const {msg} = await Api.system.editAccount({
|
||||||
|
...item,
|
||||||
|
status: value,
|
||||||
|
});
|
||||||
|
showToast(msg);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -122,27 +131,41 @@ const deleteItem = async (id) => {
|
|||||||
<view class="test-28r">{{ v.nickname }}</view>
|
<view class="test-28r">{{ v.nickname }}</view>
|
||||||
<view class="text-[#86909C] test-24r">{{ v.account }}</view>
|
<view class="text-[#86909C] test-24r">{{ v.account }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="px-[12rpx] py-[7rpx] test-24r success" v-if="v.status === 1">
|
<view class="px-[12rpx] py-[7rpx] test-24r success !flex items-center gap-0.5" v-if="v.status === 1">
|
||||||
|
{{ v.status_text }}
|
||||||
|
<x-select v-model:model-value="v.status" :api="Api.system.getAccountStatus"
|
||||||
|
@change="changeStatus($event, v)">
|
||||||
|
<tui-icon size="14" name="arrowdown"></tui-icon>
|
||||||
|
</x-select>
|
||||||
|
</view>
|
||||||
|
<view class="px-[12rpx] py-[7rpx] test-24r warn !flex items-center gap-0.5"
|
||||||
|
v-else-if="v.status === 0 || v.status === 3">
|
||||||
{{ v.status_text }}
|
{{ v.status_text }}
|
||||||
</view>
|
</view>
|
||||||
<view class="px-[12rpx] py-[7rpx] test-24r warn" v-else-if="v.status === 0 || v.status === 3">
|
<view class="px-[12rpx] py-[7rpx] test-24r error !flex items-center gap-0.5"
|
||||||
{{ v.status_text }}
|
v-else-if="v.status === -2">
|
||||||
</view>
|
|
||||||
<view class="px-[12rpx] py-[7rpx] test-24r error" v-else-if="v.status === -2">
|
|
||||||
{{ v.status_text }}
|
|
||||||
<x-prompt title="封禁原因" :info="v.check_text">
|
<x-prompt title="封禁原因" :info="v.check_text">
|
||||||
<template v-slot:button>
|
<template v-slot:button>
|
||||||
<tui-icon name="about" :size="15" color="#F53F3F"></tui-icon>
|
<tui-icon name="about" :size="15" color="#F53F3F"></tui-icon>
|
||||||
</template>
|
</template>
|
||||||
</x-prompt>
|
</x-prompt>
|
||||||
</view>
|
|
||||||
<view class="px-[12rpx] py-[7rpx] test-24r error" v-else>
|
|
||||||
{{ v.status_text }}
|
{{ v.status_text }}
|
||||||
|
<x-select v-model:model-value="v.status" :api="Api.system.getAccountStatus"
|
||||||
|
@change="changeStatus($event, v)">
|
||||||
|
<tui-icon size="14" name="arrowdown"></tui-icon>
|
||||||
|
</x-select>
|
||||||
|
</view>
|
||||||
|
<view class="px-[12rpx] py-[7rpx] test-24r error !flex items-center gap-0.5" v-else>
|
||||||
<x-prompt :title="v.status_text+'原因'" :info="v.check_text">
|
<x-prompt :title="v.status_text+'原因'" :info="v.check_text">
|
||||||
<template v-slot:button>
|
<template v-slot:button>
|
||||||
<tui-icon name="about" :size="15" color="#F53F3F"></tui-icon>
|
<tui-icon name="about" :size="15" color="#F53F3F"></tui-icon>
|
||||||
</template>
|
</template>
|
||||||
</x-prompt>
|
</x-prompt>
|
||||||
|
{{ v.status_text }}
|
||||||
|
<x-select v-model:model-value="v.status" :api="Api.system.getAccountStatus"
|
||||||
|
@change="changeStatus($event, v)">
|
||||||
|
<tui-icon size="14" name="arrowdown"></tui-icon>
|
||||||
|
</x-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="!w-full !h-[2rpx] bg-[#E5E6EB] !my-[20rpx]"></view>
|
<view class="!w-full !h-[2rpx] bg-[#E5E6EB] !my-[20rpx]"></view>
|
||||||
|
|||||||
@@ -77,9 +77,6 @@ const getSelect = async () => {
|
|||||||
<x-form-item label="昵称">
|
<x-form-item label="昵称">
|
||||||
<x-input v-model:model-value="form.nickname" height="80rpx" placeholder="请输入昵称"></x-input>
|
<x-input v-model:model-value="form.nickname" height="80rpx" placeholder="请输入昵称"></x-input>
|
||||||
</x-form-item>
|
</x-form-item>
|
||||||
<x-form-item label="账号状态">
|
|
||||||
<x-select v-model:model-value="form.status" :api="Api.system.getAccountStatus"></x-select>
|
|
||||||
</x-form-item>
|
|
||||||
<x-form-item label="恢复时间" v-if="form.status === 2">
|
<x-form-item label="恢复时间" v-if="form.status === 2">
|
||||||
<x-date-time :type="1" v-model:model-value="form.abnormaltime"></x-date-time>
|
<x-date-time :type="1" v-model:model-value="form.abnormaltime"></x-date-time>
|
||||||
</x-form-item>
|
</x-form-item>
|
||||||
|
|||||||
@@ -50,7 +50,8 @@ const changeTab = ({index}) => {
|
|||||||
|
|
||||||
<view class="!pt-[24rpx] !pb-[28rpx] !px-[32rpx] !flex gap-[32rpx] items-center">
|
<view class="!pt-[24rpx] !pb-[28rpx] !px-[32rpx] !flex gap-[32rpx] items-center">
|
||||||
<view class="flex-grow">
|
<view class="flex-grow">
|
||||||
<x-input v-model:model-value="po.keyword" height="72rpx" placeholder="请输入要查询的内容">
|
<x-input v-model:model-value="po.keyword" height="72rpx"
|
||||||
|
:placeholder="`请输入要查询的${po.type===0?'任务编号':'标题'}`">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<tui-icon name="search" size="18" class="!mr-[12rpx]"></tui-icon>
|
<tui-icon name="search" size="18" class="!mr-[12rpx]"></tui-icon>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user