Commit a13bec33 by zhaopanyu

zpy 7.21

parent 8e736907
import request from "@/utils/request";
//查询科室预算填报项目明细列表
export function getksBudgetList(query) {
......@@ -15,4 +14,3 @@ export function depBudget(id) {
method: "get",
});
}
......@@ -63,14 +63,12 @@
<el-row style="margin-top: 15px;margin-left: 20px;">
<el-col :span="14">
<span class="uploadname" style="font-size: 16px;font-weight: bold;">填报人:
<!-- <img v-if="jlqztp" :src="jlqztp">
<span v-else>{{ jlmc }}</span> -->
{{ form.informant }}
</span>
</el-col>
<el-col :span="10">
<span class="uploadname" style="font-size: 16px;font-weight: bold;">分管领导:
<!-- <img v-if="sjqztp" :src="sjqztp">
<span v-else>{{ sjmc }}</span> -->
{{ form.leadershipName }}
</span>
</el-col>
</el-row>
......@@ -198,8 +196,10 @@ export default {
this.lookTable = response.data.schoolDepartmentBudgetProjectmxList;
this.form.year = response.data.year;
this.form.deptName = response.data.deptName;
this.form.informant = response.data.informant;
this.form.leadershipName = response.data.leadershipName;
console.log(this.form.year, this.form.deptName);
console.log(response.data);
console.log(11110, response.data);
this.openLook = true;
this.$modal.closeLoading();
......
......@@ -20,7 +20,7 @@
<!-- 表格信息 -->
<el-table stripe ref="applyTable" v-loading="loading" :data="infoList" :cell-style="cellStyle">
<el-table-column type="index" label="序号" width="55" align="center" fixed="left"></el-table-column>
<el-table-column label="活动名称" align="center" prop="activityName" width="100px" fixed="left"/>
<el-table-column label="活动名称" align="center" prop="activityName" width="100px" fixed="left" />
<el-table-column label="活动地点" align="center" width="120px" prop="activityArea" />
<el-table-column label="负责人" align="center" prop="specificUserName" />
<el-table-column label="活动人数" align="center" prop="activityNumber" />
......@@ -244,12 +244,12 @@
<tr>
<td rowspan="2" class="btntxt">附件</td>
<td colspan="6">
<p v-for="(item, index) in fileList" :key="index">
<!-- <p v-for="(item, index) in fileList" :key="index">
<el-link :underline="false" :href="item.fjlj" type="primary" target="_blank">
{{ item.fjmc }}
</el-link>
</p> -->
</p> -->
<p>
<el-link :underline="false" :href="postForm.fjlj" type="primary" target="_blank">
{{ postForm.fjmc }}
......@@ -577,10 +577,16 @@ export default {
getFileList(data) {
console.log('data', data);
this.fileList = data;
this.postForm.fjlj = data[0].fjlj;
this.postForm.fjmc = data[0].fjmc;
console.log('this.postForm', this.postForm);
if (this.fileList.length != 0) {
this.postForm.fjlj = data[0].fjlj;
this.postForm.fjmc = data[0].fjmc;
console.log('this.postForm', this.postForm);
} else {
this.postForm.fjlj = '';
this.postForm.fjmc = '';
}
},
/** 获取列表数据 */
......@@ -737,12 +743,13 @@ export default {
// 重置按钮
resetQuery() {
const state = this.queryForm.state;
this.dateRange = []; // 重置日期选择器
this.diffDate = ''; // 重置 diffDate 为默认值
this.queryForm = {
state: state,
pageNum: 1,
pageSize: 10,
};
this.dateRange = [];
this.week = "";
this.handleQuery(); // 重新发一次请求
},
......@@ -789,11 +796,11 @@ export default {
// 新增按钮操作
handleAdd() {
this.reset();
// const userId = this.$store.state.user.userId;
this.postForm.activityArea = "博远礼堂";
// this.postForm.specificUserName = this.$store.state.user.name;
this.postForm.fjlj = '';
this.postForm.fjmc = '';
this.isShow = true;
this.isDisabled = false;
this.open = true;
......@@ -809,14 +816,14 @@ export default {
getAuditor(id).then(response => {
this.postForm = response.data;
console.log('this.fileList', this.fileList)
if(this.postForm.fjlj == '' || this.postForm.fjlj == undefined || this.postForm.fjlj == null){
if (this.postForm.fjlj == '' || this.postForm.fjlj == undefined || this.postForm.fjlj == null) {
this.fileList = []
}else{
} else {
this.fileList = [{
fjlj: this.postForm.fjlj,
fjmc: this.postForm.fjmc,
fjlj: this.postForm.fjlj,
fjmc: this.postForm.fjmc,
}]
}
}
console.log('postForm', this.postForm);
......@@ -861,21 +868,21 @@ export default {
console.log('this.postForm', this.postForm);
// this.$modal.loading("正在上传数据,请稍等...");
if (this.postForm.id != null) {
if(this.fileList.length != 0){
// 查看表单
updateAuditor(this.postForm)
.then((response) => {
this.$modal.closeLoading();
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
})
.catch((err) => {
this.$modal.closeLoading();
});
}else{
this.$modal.msgError("流程单附件不能为空");
}
if (this.fileList.length != 0) {
// 查看表单
updateAuditor(this.postForm)
.then((response) => {
this.$modal.closeLoading();
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
})
.catch((err) => {
this.$modal.closeLoading();
});
} else {
this.$modal.msgError("流程单附件不能为空");
}
} else {
if (this.fileList.length != 0) {
......@@ -923,8 +930,8 @@ export default {
isLive: "",
isBigScreen: "",
htNumber: "",
fjmc: null, // 设置为null
fjlj: null, // 设置为null
// fjmc: null,
// fjlj: null,
leadershipId: "",
pageNum: 1,
pageSize: 10,
......
......@@ -4,9 +4,8 @@
<el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="showSearch">
<el-form-item label="日期" prop="startTime">
<el-date-picker size="small" v-model="queryParams.startTime" type="date" placeholder="开始日期"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd" @change="changeDate" :picker-options="pickerOptions"
style="margin-right:10px">
value-format="yyyy-MM-dd" format="yyyy-MM-dd" @change="changeDate" :picker-options="pickerOptions"
style="margin-right:10px">
</el-date-picker>
<el-date-picker size="small" type="date" v-model="endTime" disabled>
......@@ -16,7 +15,7 @@
<el-form-item prop="studioName" :rules="[{ required: true, message: '请选择录播室', trigger: 'change,blur' }]">
<el-select v-model="queryParams.studioId" placeholder="录播室" >
<el-select v-model="queryParams.studioId" placeholder="录播室">
<el-option v-for="item in options" :key="item.id" :label="item.studioName" :value="item.id">
</el-option>
</el-select>
......@@ -24,7 +23,7 @@
</el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="fetchData">搜索</el-button>
<!-- <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> -->
<el-button size="mini" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<!-- :disabled="isReservationDisabled" -->
<el-button size="mini" @click="reserve">预约</el-button>
</el-form>
......@@ -33,34 +32,34 @@
<!-- 录播室占用情况表格 -->
<table style="margin-left: 30px">
<thead>
<tr>
<!-- 表头首列 -->
<th style="background:none"></th>
<!-- 表格表头日期-->
<th style="background:none;font-size:16px;font-weight:normal" v-for="day in days" :key="day">{{ day }}</th>
</tr>
<tr>
<!-- 表头首列 -->
<th style="background:none"></th>
<!-- 表格表头日期-->
<th style="background:none;font-size:16px;font-weight:normal" v-for="day in days" :key="day">{{ day }}</th>
</tr>
</thead>
<tbody>
<!--tr 行 -->
<tr v-for="(timeSlot, index) in timeSlots" :key="index">
<!-- td 列 -->
<!-- 第一列,节次 -->
<td>{{ timeSlot }}</td>
<!-- <td v-for="(day, dayIndex) in days" :key="dayIndex" :class="{-->
<!-- occupied: isOccupied(day, index),-->
<!-- selected: isSelected(day, index),-->
<!-- }" @mousedown="handleMouseDown(day, index)" @mouseup="handleMouseUp(day, index)"-->
<!-- @mouseenter="handleMouseEnter(day, index)" @click="handleCellClick(day, index)">-->
<!-- {{ isOccupied(day, index) ? "占用" : "" }}-->
<!-- </td>-->
<!-- 第二列往后循环日期,拿到day日期和节次index索引值 -->
<td style="cursor: pointer" v-for="(day, dayIndex) in days" :key="dayIndex" :class="{
<tr v-for="(timeSlot, index) in timeSlots" :key="index">
<!-- td 列 -->
<!-- 第一列,节次 -->
<td>{{ timeSlot }}</td>
<!-- <td v-for="(day, dayIndex) in days" :key="dayIndex" :class="{-->
<!-- occupied: isOccupied(day, index),-->
<!-- selected: isSelected(day, index),-->
<!-- }" @mousedown="handleMouseDown(day, index)" @mouseup="handleMouseUp(day, index)"-->
<!-- @mouseenter="handleMouseEnter(day, index)" @click="handleCellClick(day, index)">-->
<!-- {{ isOccupied(day, index) ? "占用" : "" }}-->
<!-- </td>-->
<!-- 第二列往后循环日期,拿到day日期和节次index索引值 -->
<td style="cursor: pointer" v-for="(day, dayIndex) in days" :key="dayIndex" :class="{
occupied: isOccupied(day, index),
selected: isSelected(day, index),
}" @click="handleCellClick(day, index)">
{{ isOccupied(day, index) ? "占用" : "" }}
</td>
</tr>
{{ isOccupied(day, index) ? "占用" : "" }}
</td>
</tr>
</tbody>
</table>
......@@ -143,10 +142,21 @@ export default {
// this.fetchData();
},
methods: {
// 重置按钮
resetQuery() {
this.queryParams = {
studioId: "",
startTime: "",
pageNum: 1,
pageSize: 10,
};
this.fetchStudioUseData(); // 重新发一次请求
},
changeDate() {
this.endTime = moment(this.queryParams.startTime).add(9, 'days')
},
fetchStudioUseData() {
// 调用接口获取录播室占用情况数据
console.log(123654, this.queryParams);
......@@ -161,7 +171,7 @@ export default {
const occupiedData = this.studioUseData.find((item) => {
// console.log('Array.from(item.useJc)',item.useJc.split(','))
// console.log('Array.from(item.useJc)',index + 1)
return item.useDate === day && item.useJc.split(',').includes((index+1).toString());
return item.useDate === day && item.useJc.split(',').includes((index + 1).toString());
});
return occupiedData ? occupiedData.useUserId : false;
},
......@@ -170,7 +180,7 @@ export default {
if (this.isOccupied(day, index)) {
return false
} else {
console.log('this.selectedTimeSlots',this.selectedTimeSlots)
console.log('this.selectedTimeSlots', this.selectedTimeSlots)
// 检查时间段是否已选中
return this.selectedTimeSlots.some((selectedSlot) => {
// console.log('selectedSlot',selectedSlot)
......@@ -190,9 +200,9 @@ export default {
return
} else if (this.selectedTimeSlots.length == 0) {
// 处理单元格点击事件,点击第一个
this.selectedTimeSlots.push({day, index})
this.selectedTimeSlots.push({ day, index })
this.remark = true
//没有选同一天
//没有选同一天
} else if (this.selectedTimeSlots[0].day != day) {
this.remark = true
this.$modal.alertWarning("预约不可跨天");
......@@ -211,7 +221,7 @@ export default {
this.selectedTimeSlots = this.selectedTimeSlots.filter(item => item.index != index)
this.selectedTimeSlots.length == 0 ? this.remark = false : this.selectedTimeSlots
} else {
this.selectedTimeSlots.push({day, index})
this.selectedTimeSlots.push({ day, index })
}
}
},
......@@ -220,7 +230,7 @@ export default {
getRoomList() {
getAppointmentList({}).then((res) => {
this.options = res.rows;
console.log('res',res)
console.log('res', res)
});
},
......@@ -272,13 +282,13 @@ export default {
handleMouseDown(day, index) {
// 处理鼠标按下事件
this.isMouseDown = true;
this.startSelection = {day, index};
this.endSelection = {day, index};
this.startSelection = { day, index };
this.endSelection = { day, index };
},
handleMouseUp(day, index) {
// 处理鼠标松开事件
this.isMouseDown = false;
this.endSelection = {day, index};
this.endSelection = { day, index };
// 根据按下的键盘按键进行选择操作
if (event.ctrlKey) {
......@@ -296,7 +306,7 @@ export default {
handleMouseEnter(day, index) {
// 处理鼠标进入单元格事件(用于 Shift 键多选)
if (this.isMouseDown && event.shiftKey) {
this.endSelection = {day, index};
this.endSelection = { day, index };
this.selectMultipleSlots();
}
},
......@@ -321,22 +331,22 @@ export default {
dayIndex === this.days.indexOf(endDay)
) {
for (let index = startIndex; index <= endIndex; index++) {
selectedTimeSlots.push({day, index});
selectedTimeSlots.push({ day, index });
}
} else if (dayIndex === this.days.indexOf(startDay)) {
// 对于起始日期,选择从起始索引到最后一个时间段
for (let index = startIndex; index < this.timeSlots.length; index++) {
selectedTimeSlots.push({day, index});
selectedTimeSlots.push({ day, index });
}
} else if (dayIndex === this.days.indexOf(endDay)) {
// 对于结束日期,选择从第一个时间段到结束索引
for (let index = 0; index <= endIndex; index++) {
selectedTimeSlots.push({day, index});
selectedTimeSlots.push({ day, index });
}
} else {
// 其他日期完全选择
for (let index = 0; index < this.timeSlots.length; index++) {
selectedTimeSlots.push({day, index});
selectedTimeSlots.push({ day, index });
}
}
}
......@@ -367,17 +377,17 @@ export default {
},
//弹窗
reserve(day, index) {
if (this.remark) {
if(this.queryParams.studioId == ''){
this.successDialogVisible = false;
this.$modal.alertWarning("请选择录播室");
}else{
this.successDialogVisible = true;
}
} else{
console.log(this.remark)
if (this.remark) {
if (this.queryParams.studioId == '') {
this.successDialogVisible = false;
this.$modal.alertWarning("请选择录播室");
} else {
this.successDialogVisible = true;
}
} else {
console.log(this.remark)
this.successDialogVisible = false;
}
// }
......@@ -393,56 +403,56 @@ export default {
// 在这里,你可以处理预约操作,例如发送请求进行录播室预约操作
// 预约成功后,你可以根据已选时间段的数据来更新录播室的占用情况
this.successDialogVisible = false;
console.log('queryParams.studioName',this.queryParams)
console.log('this.selectedTimeSlots',this.selectedTimeSlots)
console.log('form.studioContent',this.form.studioContent)
console.log('queryParams.studioName', this.queryParams)
console.log('this.selectedTimeSlots', this.selectedTimeSlots)
console.log('form.studioContent', this.form.studioContent)
const jc = this.selectedTimeSlots.map(item => {
return item.index+1
return item.index + 1
})
const stringJC = jc.toString()
console.log('stringJC',stringJC)
console.log('stringJC', stringJC)
const params = {
//录播室id
studioId:this.queryParams.studioId,
studioId: this.queryParams.studioId,
//预约时间
appointmentTime:this.selectedTimeSlots[0].day,
appointmentTime: this.selectedTimeSlots[0].day,
//预约节次
appointmentJc:stringJC,
appointmentJc: stringJC,
//录播内容
studioContent:this.form.studioContent
studioContent: this.form.studioContent
}
addIdle(params).then(res => {
console.log('res',res)
if(res.code == 200){
console.log('res', res)
if (res.code == 200) {
this.$message({
message: "预约成功",
type: "success",
});
message: "预约成功",
type: "success",
});
this.fetchStudioUseData()
}
})
// 更新录播室占用情况
// for (const selectedSlot of this.selectedTimeSlots) {
// const day = selectedSlot.day;
// const index = selectedSlot.index;
// // 在这里,你可以根据录播室ID、日期和时间段进行更新录播室占用情况的操作
// // 调用接口或更新数据来标记录播室在指定的日期和时间段被占用
// console.log(`录播室在 ${day} 的 ${this.timeSlots[index]} 被预约成功`);
// }
//
// // 清除已选时间段
// this.selectedTimeSlots = [];
//
// this.$message({
// message: "预约成功",
// type: "success",
// });
//
// console.log("确定");
// },
// isReservationDisabled() {
// // 预约按钮是否禁用
// return this.selectedTimeSlots.length === 0;
// for (const selectedSlot of this.selectedTimeSlots) {
// const day = selectedSlot.day;
// const index = selectedSlot.index;
// // 在这里,你可以根据录播室ID、日期和时间段进行更新录播室占用情况的操作
// // 调用接口或更新数据来标记录播室在指定的日期和时间段被占用
// console.log(`录播室在 ${day} 的 ${this.timeSlots[index]} 被预约成功`);
// }
//
// // 清除已选时间段
// this.selectedTimeSlots = [];
//
// this.$message({
// message: "预约成功",
// type: "success",
// });
//
// console.log("确定");
// },
// isReservationDisabled() {
// // 预约按钮是否禁用
// return this.selectedTimeSlots.length === 0;
},
},
};
......@@ -480,5 +490,4 @@ th {
background-color: #66b3ff;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment