mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +08:00
feat:合并
This commit is contained in:
@@ -242,6 +242,10 @@ const setCookie = (name, value, perpetual) => {
|
||||
}
|
||||
//获取cookie数据
|
||||
//先写一个方法
|
||||
export function getCookieForName(name) {
|
||||
return document.cookie?.split(";").find(e => e.includes(name))?.replace(`${name}=`, '') || ''
|
||||
}
|
||||
|
||||
function getCookie(name) {
|
||||
//1.获取cookie字符串
|
||||
var cookies = document.cookie;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {reactive, ref, toRefs, watch} from "vue";
|
||||
import {getCookie} from "@/api/method";
|
||||
import {getCookieForName} from "@/api/method";
|
||||
import JSONBigInt from 'json-bigint';
|
||||
|
||||
const JSONBigIntStr = JSONBigInt({storeAsString: true});
|
||||
@@ -143,7 +143,7 @@ export async function request(_url, params) {
|
||||
return fetch(url, {
|
||||
method,
|
||||
headers: {
|
||||
token: getCookie('token'),
|
||||
token: getCookieForName('token'),
|
||||
...method !== 'get' ? {'Content-Type': 'application/json'} : {}
|
||||
},
|
||||
...method !== 'get' ? {body: JSON.stringify(body)} : {}
|
||||
|
||||
@@ -92,6 +92,8 @@ function getMemberData() {
|
||||
isOpen.value = false
|
||||
return;
|
||||
}
|
||||
console.log(1111111111111)
|
||||
console.log(props.value)
|
||||
const list = res.data.data.rows.filter(e => !(props.value + '').includes(e.id)).map(e => ({
|
||||
label: e.realName + e.userNo,
|
||||
value: e.id,
|
||||
@@ -131,7 +133,7 @@ function change(e, l) {
|
||||
Array.isArray(selectOptions.value) && emit('onChange', e, l, selectOptions.value.find(e => e.deptId)?.deptId, selectOptions.value.find(e => e.deptId)?.departName)
|
||||
if (Array.isArray(l)) {
|
||||
emit('update:name', l.map(t => t.label).join(','))
|
||||
emit('update:value', l.map(t => t.label).join(','))
|
||||
emit('update:value', l.map(t => t.value).join(','))
|
||||
} else {
|
||||
emit('update:name', l?.label)
|
||||
emit('update:value', l?.value)
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<<<<<<< HEAD
|
||||
<a-tab-pane :key="2" tab="添加组织">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div class="tab2">
|
||||
@@ -140,6 +141,46 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
=======
|
||||
<!-- <a-tab-pane :key="2" tab="添加组织">-->
|
||||
<!-- <div-->
|
||||
<!-- :style="{ height: screenHeight - 235 + 'px' }"-->
|
||||
<!-- >-->
|
||||
<!-- <div class="tab2">-->
|
||||
<!-- <a-form-item label="组织:">-->
|
||||
<!-- <a-input-->
|
||||
<!-- v-model:value="searchOrgName.keyword"-->
|
||||
<!-- style="width: 230px; height: 40px; border-radius: 8px"-->
|
||||
<!-- placeholder="请输入组织"-->
|
||||
<!-- />-->
|
||||
<!-- <a-button type="primary" @click="searchOrg" style="margin-left: 20px;border-radius: 4px">-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <SearchOutlined/>-->
|
||||
<!-- </template>-->
|
||||
<!-- 搜索-->
|
||||
<!-- </a-button>-->
|
||||
<!-- <a-button @click="resetOrg" style="margin-left: 20px;border-radius: 4px">重置</a-button>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="boeTree">-->
|
||||
<!-- <a-tree-->
|
||||
<!-- :tree-data="searchOrgName.keyword ? orgData : treeData"-->
|
||||
<!-- @select="onOrgSelectChange"-->
|
||||
<!-- :fieldNames="{-->
|
||||
<!-- children: 'treeChildList',-->
|
||||
<!-- key: 'id',-->
|
||||
<!-- title: 'name',-->
|
||||
<!-- value: 'name',-->
|
||||
<!-- }"-->
|
||||
<!-- row-key="id"-->
|
||||
<!-- :row-selection="orgRowSelection"-->
|
||||
<!-- multiple-->
|
||||
<!-- >-->
|
||||
<!-- </a-tree>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-tab-pane>-->
|
||||
>>>>>>> 0bbb4403e7650fcaf87f158833a10c02c3e51841
|
||||
<a-tab-pane :key="3" tab="受众关联">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div>
|
||||
@@ -208,6 +249,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<<<<<<< HEAD
|
||||
</div>
|
||||
<div
|
||||
v-if="!person && selectsData.studentList.length > 10"
|
||||
@@ -256,6 +298,52 @@
|
||||
<div v-if="i < 11">
|
||||
<div class="chose2">
|
||||
<div class="span">{{ item.audienceName }}</div>
|
||||
=======
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="!person && selectsData.studentList.length >10" class="ifsw"><div @click="person = !person" class=“sw”>查看更多></div></div>
|
||||
<div v-if="person && selectsData.studentList.length >10" class="ifsw" ><div @click="person = !person" class="sw"> 收起< </div></div>
|
||||
|
||||
<!--组织-->
|
||||
<!-- <div class="dept">添加组织</div>-->
|
||||
<!-- <div v-for="(item,i) in selectsData.deptList" >-->
|
||||
<!-- <div v-if="i<11">-->
|
||||
<!-- <div class="chose1">-->
|
||||
<!-- <div class="span"> {{ item.name }}</div>-->
|
||||
<!-- <div class="ch1" @click="orgDel(i)"></div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div v-else> -->
|
||||
<!-- <div v-if ="dept">-->
|
||||
<!-- <div class="chose1">-->
|
||||
<!-- <div class="span"> {{ item.name }}</div>-->
|
||||
<!-- <div class="ch1" @click="orgDel(i)"></div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- -->
|
||||
<!-- </div>-->
|
||||
<!-- -->
|
||||
<!-- </div>-->
|
||||
<!-- <div v-if="!dept && selectsData.deptList.length >10" class="ifsw"><div @click="dept = !dept" class=“sw”>查看更多></div></div>-->
|
||||
<!-- <div v-if="dept && selectsData.deptList.length >10" class="ifsw" ><div @click="dept = !dept" class="sw"> 收起< </div></div>-->
|
||||
|
||||
|
||||
<!--受众-->
|
||||
<div class="group">受众关联</div>
|
||||
<div v-for="(item,i) in selectsData.groupList" >
|
||||
<div v-if="i<11">
|
||||
<div class="chose2">
|
||||
<div class="span"> {{ item.audienceName }}</div>
|
||||
<div class="ch2" @click="AuditDel(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if ="group">
|
||||
<div class="chose2">
|
||||
<div class="span"> {{ item.audienceName }}</div>
|
||||
>>>>>>> 0bbb4403e7650fcaf87f158833a10c02c3e51841
|
||||
<div class="ch2" @click="AuditDel(i)"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -346,11 +434,19 @@
|
||||
</a-modal>
|
||||
</template>
|
||||
<script setup>
|
||||
<<<<<<< HEAD
|
||||
import { computed, defineEmits, defineProps, ref, watch } from "vue";
|
||||
import { useStore } from "vuex";
|
||||
import { useBoeApi, useBoeApiPage } from "@/api/request";
|
||||
import { AUDIENCE_LIST, ORG_LIST, USER_LIST } from "@/api/ThirdApi";
|
||||
import { saveStu } from "@/api/index1";
|
||||
=======
|
||||
import {computed, defineEmits, defineProps, ref, watch} from "vue";
|
||||
import {useStore} from "vuex";
|
||||
import {useBoeApiPage} from "@/api/request";
|
||||
import {AUDIENCE_LIST, USER_LIST} from "@/api/ThirdApi";
|
||||
import {saveStu} from "@/api/index1";
|
||||
>>>>>>> 0bbb4403e7650fcaf87f158833a10c02c3e51841
|
||||
|
||||
const store = useStore();
|
||||
const emit = defineEmits({});
|
||||
@@ -359,6 +455,7 @@ const props = defineProps({
|
||||
id: String,
|
||||
stage: {
|
||||
type: Array,
|
||||
<<<<<<< HEAD
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
@@ -368,6 +465,17 @@ const group = ref(false);
|
||||
const visiable = ref(false);
|
||||
const activeKey = ref(1);
|
||||
const stageVisible = ref(false);
|
||||
=======
|
||||
default: () => []
|
||||
}
|
||||
})
|
||||
const person =ref(false)
|
||||
// const dept =ref(false)
|
||||
const group =ref(false)
|
||||
const visiable = ref(false)
|
||||
const activeKey = ref(1)
|
||||
const stageVisible = ref(false)
|
||||
>>>>>>> 0bbb4403e7650fcaf87f158833a10c02c3e51841
|
||||
const selectsData = ref({
|
||||
stageId: "",
|
||||
studentList: [],
|
||||
@@ -383,6 +491,7 @@ const nameSearch = ref({
|
||||
const audienceName = ref({
|
||||
keyword: "",
|
||||
page: 1,
|
||||
<<<<<<< HEAD
|
||||
pageSize: 10,
|
||||
});
|
||||
const searchOrgName = ref({
|
||||
@@ -390,6 +499,15 @@ const searchOrgName = ref({
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
=======
|
||||
pageSize: 10
|
||||
})
|
||||
// const searchOrgName = ref({
|
||||
// keyword: '',
|
||||
// page: 1,
|
||||
// pageSize: 10
|
||||
// })
|
||||
>>>>>>> 0bbb4403e7650fcaf87f158833a10c02c3e51841
|
||||
|
||||
const stageIds = computed(() => props.stage);
|
||||
|
||||
@@ -407,10 +525,17 @@ const {
|
||||
total: (res) => res.result.totalElement,
|
||||
});
|
||||
|
||||
<<<<<<< HEAD
|
||||
const { data: orgData, fetch: searchOrg } = useBoeApi(
|
||||
ORG_LIST,
|
||||
searchOrgName.value
|
||||
);
|
||||
=======
|
||||
// const {
|
||||
// data: orgData,
|
||||
// fetch: searchOrg,
|
||||
// } = useBoeApi(ORG_LIST, searchOrgName.value)
|
||||
>>>>>>> 0bbb4403e7650fcaf87f158833a10c02c3e51841
|
||||
|
||||
const {
|
||||
data: audiData,
|
||||
@@ -568,12 +693,19 @@ function stuDel(i) {
|
||||
selectsData.value.studentList.splice(i, 1);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
function orgDel(i) {
|
||||
orgSelectKeys.value = orgSelectKeys.value.filter(
|
||||
(e) => e !== selectsData.value.deptList[i].id
|
||||
);
|
||||
selectsData.value.deptList.splice(i, 1);
|
||||
}
|
||||
=======
|
||||
// function orgDel(i) {
|
||||
// orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id)
|
||||
// selectsData.value.deptList.splice(i, 1)
|
||||
// }
|
||||
>>>>>>> 0bbb4403e7650fcaf87f158833a10c02c3e51841
|
||||
|
||||
function AuditDel(i) {
|
||||
auditSelectKeys.value = auditSelectKeys.value.filter(
|
||||
@@ -631,9 +763,15 @@ const deleteDepSelect = () => {
|
||||
};
|
||||
|
||||
//重置组织
|
||||
<<<<<<< HEAD
|
||||
const resetOrg = () => {
|
||||
searchOrgName.value = { keyword: "", page: 1, pageSize: 10 };
|
||||
};
|
||||
=======
|
||||
// const resetOrg = () => {
|
||||
// searchOrgName.value = {keyword: '', page: 1, pageSize: 10}
|
||||
// };
|
||||
>>>>>>> 0bbb4403e7650fcaf87f158833a10c02c3e51841
|
||||
|
||||
//重置受众
|
||||
const resetAudienceInfo = () => {
|
||||
|
||||
@@ -259,6 +259,7 @@
|
||||
<div class="btn">
|
||||
<a-button @click="backPage" class="btn2">取消</a-button>
|
||||
<a-button
|
||||
:loading="loading"
|
||||
v-on:click="createProject"
|
||||
type="primary"
|
||||
class="btn1"
|
||||
@@ -301,6 +302,7 @@ export default {
|
||||
const routers = useRoute();
|
||||
const router = useRouter();
|
||||
const state = reactive({
|
||||
loading:false,
|
||||
currentPage: 1, //当前页
|
||||
tableDataTotal: -1, //模版列表总数
|
||||
pageSize: 10, //每页10条数据
|
||||
@@ -459,6 +461,7 @@ export default {
|
||||
}
|
||||
|
||||
const createProject = async () => {
|
||||
state.loading = true
|
||||
console.log("保存", state.projectInfo);
|
||||
if (!validate(state.projectInfo, errorMsgs)) {
|
||||
return;
|
||||
@@ -483,6 +486,7 @@ export default {
|
||||
state.projectInfo.type = 3;
|
||||
state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0;
|
||||
api.createProject(state.projectInfo).then((res) => {
|
||||
state.loading = false
|
||||
state.projectInfo.projectId ||
|
||||
changeOwnership("project", res.data.data.projectId, [
|
||||
{ id: res.data.data.createId, name: res.data.data.createName },
|
||||
@@ -499,6 +503,9 @@ export default {
|
||||
};
|
||||
|
||||
function managerChange(e, l, d, t) {
|
||||
if (routers.query.parentId) {
|
||||
return;
|
||||
}
|
||||
!state.projectInfo.sourceBelongId &&
|
||||
(state.projectInfo.sourceBelongId = d);
|
||||
!state.projectInfo.sourceBelongName &&
|
||||
|
||||
@@ -1804,6 +1804,10 @@ export default {
|
||||
);
|
||||
|
||||
function managerChange(e, l, d, t) {
|
||||
if (state.projectInfo.parentId) {
|
||||
return;
|
||||
}
|
||||
|
||||
!state.projectInfo.sourceBelongId &&
|
||||
(state.projectInfo.sourceBelongId = d);
|
||||
!state.projectInfo.sourceBelongName &&
|
||||
|
||||
@@ -386,8 +386,16 @@ export default {
|
||||
});
|
||||
};
|
||||
|
||||
function managerChange(e, l, d, t) {
|
||||
!state.projectInfo.sourceBelongId &&
|
||||
(state.projectInfo.sourceBelongId = d);
|
||||
!state.projectInfo.sourceBelongName &&
|
||||
(state.projectInfo.sourceBelongName = t);
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
managerChange,
|
||||
timeChange,
|
||||
projectPic,
|
||||
createProject,
|
||||
|
||||
Reference in New Issue
Block a user