更新
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export const URL = "https://vespa.qxyushen.top";
|
||||
export const URL = "https://test.vespa.qxyushen.top";
|
||||
// https://vespa.qxyushen.top 正式
|
||||
// http://1.13.101.98
|
||||
// https://test.vespa.xscmmidi.site
|
||||
// https://test.vespa.qxyushen.top
|
||||
// 声网appId 在这里换
|
||||
export const appIdBySw = '02f7339ec98947deaeab173599891932';
|
||||
@@ -40,6 +40,9 @@ const getTypeList = async () => {
|
||||
function handlePlayFile(list) {
|
||||
newFormInline.value.play_image = list.join(',')
|
||||
}
|
||||
function handlePlayFileSuccess(list) {
|
||||
newFormInline.value.play_image = list.join(',')
|
||||
}
|
||||
onMounted(() => {
|
||||
getTypeList()
|
||||
})
|
||||
@@ -88,6 +91,11 @@ defineExpose({ getRef });
|
||||
:limit="1" :echoUrl="newFormInline.play_image" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<template v-if="[10, 11].includes(newFormInline.type)">
|
||||
<el-form-item label="播放图像" prop="play_image">
|
||||
<uploadImage @handleSuccess="handlePlayFileSuccess" :acceptType="'.mp4'" :limit="1"
|
||||
:echoUrl="newFormInline.play_image" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
@@ -55,13 +55,28 @@ const getAdornmentList = async () => {
|
||||
}
|
||||
const AvatarList = ref([])
|
||||
const getAvatarList = async () => {
|
||||
// 坐骑是2 头像框是3
|
||||
// 坐骑是2 头像框是3 特效10 装扮11
|
||||
const { data, code } = await queryAdornmentList({ type: 1 })
|
||||
AvatarList.value = code ? data : []
|
||||
}
|
||||
const SpecialList = ref([])
|
||||
const getSpecialList = async () => {
|
||||
// 坐骑是2 头像框是3 特效10 装扮11
|
||||
const { data, code } = await queryAdornmentList({ type: 10 })
|
||||
SpecialList.value = code ? data : []
|
||||
}
|
||||
const dressList = ref([])
|
||||
const getDressList = async () => {
|
||||
// 坐骑是2 头像框是3 特效10 装扮11
|
||||
const { data, code } = await queryAdornmentList({ type: 11 })
|
||||
dressList.value = code ? data : []
|
||||
}
|
||||
// 特效
|
||||
onBeforeMount(() => {
|
||||
getAdornmentList()
|
||||
getAvatarList()
|
||||
getSpecialList()
|
||||
getDressList()
|
||||
})
|
||||
defineExpose({ getRef });
|
||||
</script>
|
||||
@@ -81,12 +96,20 @@ defineExpose({ getRef });
|
||||
<el-form-item label="升级所需经验值" prop="change_value">
|
||||
<el-input-number v-model="newFormInline.change_value"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="CP特效" prop="rights_icon">
|
||||
<uploadImage @handleSuccess="handleIconSuccess" :acceptType="'.mp4'" :limit="1"
|
||||
:echoUrl="newFormInline.rights_icon" />
|
||||
<el-form-item label="CP特效" prop="rights_icon_id">
|
||||
<el-select v-model="newFormInline.rights_icon_id" placeholder="请选择CP特效">
|
||||
<el-option v-for="item in SpecialList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <uploadImage @handleSuccess="handleIconSuccess" :acceptType="'.mp4'" :limit="1"
|
||||
:echoUrl="newFormInline.rights_icon" /> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="CP装扮" prop="pendant">
|
||||
<uploadImage @handleSuccess="handleBgSuccess" :acceptType="'.mp4'" :limit="1" :echoUrl="newFormInline.pendant" />
|
||||
<el-form-item label="CP装扮" prop="pendant_id">
|
||||
<el-select v-model="newFormInline.pendant_id" placeholder="请选择CP装扮">
|
||||
<el-option v-for="item in dressList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <uploadImage @handleSuccess="handleBgSuccess" :acceptType="'.mp4'" :limit="1" :echoUrl="newFormInline.pendant" /> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="头像框" prop="dress_id">
|
||||
<el-select v-model="newFormInline.dress_id" placeholder="请选择头像框">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, h, onMounted } from "vue";
|
||||
import selectUser from './selectUser.vue';
|
||||
import selectUniconView from './selectUnicon.vue';
|
||||
import { getRoomList } from '@/api/modules/message';
|
||||
import { addDialog } from "@/components/ReDialog";
|
||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||
@@ -22,6 +23,7 @@ const formRules = ref({
|
||||
});
|
||||
const formRef = ref(null)
|
||||
const selectUserData = ref([])
|
||||
const selectUnicon = ref([])
|
||||
const props = defineProps(["formInline"]);
|
||||
const newFormInline = ref(
|
||||
props.formInline
|
||||
@@ -66,6 +68,22 @@ function addUser() {
|
||||
}
|
||||
});
|
||||
}
|
||||
function addUnicon() {
|
||||
addDialog({
|
||||
title: `关联工会`,
|
||||
width: "40%",
|
||||
props: {
|
||||
uniconList: selectUnicon.value
|
||||
},
|
||||
closeOnClickModal: false,
|
||||
contentRenderer: () => h(selectUniconView, { ref: formRef, formInline: null }),
|
||||
beforeSure: (done, { options }) => {
|
||||
selectUnicon.value = formRef.value.getRef();
|
||||
newFormInline.value.receiving_id = selectUnicon.value.length ? selectUnicon.value.map(ele => { return ele.id }).join(',') : []
|
||||
done()
|
||||
}
|
||||
});
|
||||
}
|
||||
onMounted(() => {
|
||||
if (newFormInline.value.receiving_id) selectUserData.value = newFormInline.value.receiving_id.split(',')
|
||||
getAllRoomList()
|
||||
@@ -77,20 +95,25 @@ defineExpose({ getRef });
|
||||
<el-form ref="ruleFormRef" :model="newFormInline" :rules="formRules" label-width="120px">
|
||||
<el-form-item label="消息栏目" prop="messageType">
|
||||
<el-select v-model="newFormInline.messageType" placeholder="请选择">
|
||||
<el-option v-for="item in [{ value: 1, label: '系统消息' }, { value: 2, label: '官方公告' }]" :key="item.value"
|
||||
:label="item.label" :value="item.value">
|
||||
<el-option
|
||||
v-for="item in [{ value: 1, label: '系统消息' }, { value: 2, label: '官方公告' }, { value: 5, label: '工会通知' }]"
|
||||
:key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 系统消息 -->
|
||||
<template v-if="newFormInline.messageType === 1">
|
||||
<template v-if="[1, 5].includes(newFormInline.messageType)">
|
||||
<el-form-item label="消息标题" prop="title">
|
||||
<el-input v-model="newFormInline.title" clearable placeholder="请输入消息标题" />
|
||||
</el-form-item>
|
||||
<el-form-item label="接收对象" prop="receiving_id">
|
||||
<el-form-item label="接收对象" prop="receiving_id" v-if="newFormInline.messageType !== 5">
|
||||
<span class="mr-5" v-if="selectUserData.length">已选择关联{{ selectUserData.length }}个用户</span>
|
||||
<el-button :icon="useRenderIcon(AddFill)" @click="addUser">关联用户</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收对象" prop="receiving_id" v-else>
|
||||
<span class="mr-5" v-if="selectUnicon.length">已选择关联{{ selectUnicon.length }}个工会</span>
|
||||
<el-button :icon="useRenderIcon(AddFill)" @click="addUnicon">关联工会</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="消息内容" prop="content">
|
||||
<RichText style="border: 1px solid #ccc;" :echoValue="newFormInline.content" @changeValue="chanageEditorValue">
|
||||
</RichText>
|
||||
|
||||
57
src/views/message/selectUnicon.vue
Normal file
57
src/views/message/selectUnicon.vue
Normal file
@@ -0,0 +1,57 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import SearchForm from "@/components/SearchForm/index.vue";
|
||||
import { queryUnionList } from '@/api/modules/union'
|
||||
const selectUserList = ref([]);
|
||||
const userList = ref([])
|
||||
function getRef() {
|
||||
return selectUserList.value;
|
||||
}
|
||||
const loading = ref(true)
|
||||
const searchLabel = ref([
|
||||
{ label: "工会ID", prop: "search_id", type: "input" }
|
||||
]);
|
||||
const searchForm = ref({})
|
||||
const multipleTable = ref(null)
|
||||
const onSearch = (formData) => {
|
||||
userList.value = []
|
||||
selectUserList.value = []
|
||||
getAllUserList(formData)
|
||||
}
|
||||
const props = defineProps(["uniconList"]);
|
||||
const getAllUserList = async (form) => {
|
||||
const { code, data } = await queryUnionList({ ...form, page_limit: 10000 })
|
||||
userList.value = code ? data.list.filter(ele => { return ele.status === 1 }) : []
|
||||
setTimeout(() => {
|
||||
console.log(props.uniconList)
|
||||
if (userList.value.length) {
|
||||
userList.value.forEach(ele => {
|
||||
const listData = props.uniconList.map(e => { return Number(e.id) })
|
||||
if (listData.includes(ele.id)) {
|
||||
multipleTable.value.toggleRowSelection(ele, true)
|
||||
}
|
||||
})
|
||||
}
|
||||
loading.value = false
|
||||
}, 500)
|
||||
}
|
||||
function handleSelectionChange(val) {
|
||||
selectUserList.value = val
|
||||
}
|
||||
onMounted(() => {
|
||||
getAllUserList(searchForm.value)
|
||||
})
|
||||
defineExpose({ getRef });
|
||||
</script>
|
||||
<template>
|
||||
<div style="margin-bottom: 20px;">
|
||||
<SearchForm class="pb-2" :LabelList="searchLabel" :formData="searchForm" @handleSearch="onSearch"></SearchForm>
|
||||
<el-table v-loading="loading" ref="multipleTable" :data="userList" row-key="id" border style="width: 100%"
|
||||
max-height="550" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55">
|
||||
</el-table-column>
|
||||
<el-table-column prop="guild_name" label="用户名">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
@@ -38,7 +38,7 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
|
||||
// 设置CORS头 https://admin.qxyushen.top
|
||||
// https://test.vespa.qxyushen.top
|
||||
// 'http://admin.vespa.xscmmidi.site'
|
||||
res.setHeader('Access-Control-Allow-Origin', 'http://admin.vespa.xscmmidi.site');
|
||||
res.setHeader('Access-Control-Allow-Origin', 'http://test.admin.qxyushen.top');
|
||||
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
|
||||
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization');
|
||||
res.end();
|
||||
|
||||
Reference in New Issue
Block a user