Commit b32e66f7 by zhaopanyu

zpy 7.20

parent baa91c5d
......@@ -47,3 +47,10 @@ export function submitApply(id) {
method: "post",
});
}
// 获取登录人信息
export function departUser() {
return request({
url: "/departmentBudget/getUserXx",
method: "get",
});
}
\ No newline at end of file
......@@ -58,3 +58,10 @@ export function getLeaderList(data) {
params: data,
});
}
// 附件上传
export function uploadList() {
return request({
url: "/common/upload",
method: "post",
});
}
\ No newline at end of file
import request from "@/utils/request";
// 查询全部礼堂预约列表
export function listAuditor(query) {
export function listAuditorqb(query) {
return request({
url: "/auditorium/list",
method: "get",
......
<template>
<div class="upload-file">
<el-upload multiple :action="uploadFileUrl" :before-upload="handleBeforeUpload" :file-list="fileList" :limit="limit"
:on-error="handleUploadError" :on-exceed="handleExceed" :on-success="handleUploadSuccess" :show-file-list="false"
:headers="headers" class="upload-file-uploader" ref="fileUpload">
<!-- 上传按钮 -->
<el-button size="mini" type="primary">选取文件</el-button>
<!-- 上传提示 -->
<!-- <div class="el-upload__tip" slot="tip" v-if="showTip">
请上传
<template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
<template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
的文件
</div> -->
</el-upload>
<!-- 文件列表 -->
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
<li :key="file.fjlj" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
<el-link :href="`${baseUrl}${file.fjlj}`" :underline="false" target="_blank">
<!-- <span class="el-icon-document"> {{ getFileName(file.name) }} </span> -->
<span class="el-icon-document"> {{ file.fjmc }} </span>
</el-link>
<div class="ele-upload-list__item-content-action">
<el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
</div>
</li>
</transition-group>
</div>
</template>
<script>
import { getToken } from "@/utils/auth";
export default {
name: "FileUploadNew",
props: {
// 值
value: [String, Object, Array],
// 数量限制
limit: {
type: Number,
default: 5,
},
// 大小限制(MB)
fileSize: {
type: Number,
default: 5,
},
// 文件类型, 例如['png', 'jpg', 'jpeg']
fileType: {
type: Array,
default: () => ["doc", "xls", "ppt", "txt", "pdf"],
},
// 是否显示提示
isShowTip: {
type: Boolean,
default: true
}
},
data() {
return {
number: 0,
uploadList: [],
baseUrl: process.env.VUE_APP_BASE_API,
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
headers: {
Authorization: "Bearer " + getToken(),
},
fileList: [],
};
},
watch: {
value: {
handler(val) {
if (val) {
let temp = 1;
// 首先将值转为数组
const list = Array.isArray(val) ? val : this.value.split(',');
// 然后将数组转为对象数组
this.fileList = list.map(item => {
if (typeof item === "string") {
item = { fjmc: item, fjlj: item };
}
item.uid = item.uid || new Date().getTime() + temp++;
return item;
});
} else {
this.fileList = [];
return [];
}
},
deep: true,
immediate: true
}
},
computed: {
// 是否显示提示
showTip() {
return this.isShowTip && (this.fileType || this.fileSize);
},
},
methods: {
// 上传前校检格式和大小
handleBeforeUpload(file) {
// 校检文件类型
if (this.fileType) {
let fileExtension = "";
if (file.name.lastIndexOf(".") > -1) {
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
}
const isTypeOk = this.fileType.some((type) => {
if (file.type.indexOf(type) > -1) return true;
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
return false;
});
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
return false;
}
}
// 校检文件大小
if (this.fileSize) {
const isLt = file.size / 1024 / 1024 < this.fileSize;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`);
return false;
}
}
this.$modal.loading("正在上传文件,请稍候...");
this.number++;
return true;
},
// 文件个数超出
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
// 上传失败
handleUploadError(err) {
this.$modal.msgError("上传图片失败,请重试");
this.$modal.closeLoading()
},
// 上传成功回调
handleUploadSuccess(res, file) {
console.log('res', res);
console.log('file', file);
if (res.code === 200) {
this.uploadList.push({ fjmc: file.response.originalFilename, fjlj: file.response.url });
this.uploadedSuccessfully();
} else {
this.number--;
this.$modal.closeLoading();
this.$modal.msgError(res.msg);
this.$refs.fileUpload.handleRemove(file);
this.uploadedSuccessfully();
}
},
// 删除文件
handleDelete(index) {
console.log('this.fileList', this.fileList);
this.fileList.splice(index, 1);
// this.$emit("input", this.listToString(this.fileList));
this.$emit("input", this.fileList);
},
// 上传结束处理
uploadedSuccessfully() {
if (this.number > 0 && this.uploadList.length === this.number) {
this.fileList = this.fileList.concat(this.uploadList);
this.uploadList = [];
this.number = 0;
// this.$emit("input", this.listToString(this.fileList));
this.$emit("input", this.fileList);
this.$modal.closeLoading();
}
},
// 获取文件名称
getFileName(name) {
if (name.lastIndexOf("/") > -1) {
return name.slice(name.lastIndexOf("/") + 1);
} else {
return "";
}
},
// 对象转成指定字符串分隔
listToString(list, separator) {
let strs = "";
separator = separator || ",";
for (let i in list) {
strs += list[i].url + separator;
}
return strs != '' ? strs.substr(0, strs.length - 1) : '';
}
}
};
</script>
<style scoped lang="scss">
.upload-file-uploader {
margin-bottom: 5px;
}
.upload-file-list .el-upload-list__item {
border: 1px solid #e4e7ed;
line-height: 2;
margin-bottom: 10px;
position: relative;
}
.upload-file-list .ele-upload-list__item-content {
display: flex;
justify-content: space-between;
align-items: center;
color: inherit;
}
.ele-upload-list__item-content-action .el-link {
margin-right: 10px;
}
</style>
......@@ -15,7 +15,7 @@
<el-form :model="queryParams" :inline="true" style="padding:0 0 0 0" size="small">
</el-form>
<el-table :data="tableData" v-loading="loading">
<el-table-column prop="year" label="年度" width="60" type="index" align="center" style="height: 20px;" />
<el-table-column prop="year" label="年度" width="60" align="center" style="height: 20px;" />
<el-table-column prop="deptName" label="科室" align="center" />
<el-table-column label="填报人" align="center" prop="informant" />
<el-table-column label="分管领导" align="center" prop="leadershipName" />
......@@ -109,6 +109,7 @@ export default {
this.loading = true;
taskDoneList().then((response) => {
this.tableData = response.rows
console.log('this.tableData', this.tableData);
this.total = response.total
this.loading = false
});
......
......@@ -13,8 +13,8 @@
<el-form-item prop="deptName">
<el-input v-model="queryForm.deptName" placeholder="科室" clearable> </el-input>
</el-form-item>
<el-form-item prop="isGov">
<el-select v-model="queryForm.isGov" placeholder="是否政府采购" style="width: 100%">
<el-form-item prop="isGovernmentPurchase">
<el-select v-model="queryForm.isGovernmentPurchase" placeholder="是否政府采购" style="width: 100%">
<el-option label="是" value="1"></el-option>
<el-option label="否" value="0"></el-option>
</el-select>
......
......@@ -12,6 +12,7 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增 </el-button>
</el-form-item>
</el-form>
<!-- 表格数据 -->
<el-table v-loading="loading" :row-style="{ height: '35px' }" :cell-style="{ padding: '0' }" :data="budgetList"
style="font-size: 14px" stripe>
<el-table-column label="年度" prop="year" align="center" />
......@@ -181,6 +182,7 @@ import {
getdeBudgetList,//查看本单位预算填报列表;
deleteDepart,// 删除预算填报
submitApply,//提交
departUser,//获取当前登录人
} from '@/api/smartSchool/officialWork/budgetFilling'
import {
getLeaderList,//获取校领导下拉框
......@@ -191,6 +193,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { getToken } from "@/utils/auth";
import { MessageBox } from "element-ui";
import SelectUser from "./components/SelectUser";
import moment from 'moment';
export default {
name: "budgetFilling",
......@@ -467,16 +470,21 @@ export default {
// 编辑按钮
handleUpdate(row) {
this.open = true;
console.log('row.id', row.id);
queryDepart(row.id).then(response => {
console.log(11122, response.data);
this.postForm.id = response.data.id
this.xzTable = response.data.schoolDepartmentBudgetProjectmxList;
this.postForm.informant = this.$store.state.user.name;
this.postForm.informant = response.data.informant;
this.postForm.year = response.data.year;
this.postForm.deptName = response.data.deptName;
this.postForm.projectName = this.xzTable[0].projectName;
this.postForm.content = this.xzTable[0].content;
this.postForm.projectExpenditures = this.xzTable[0].projectExpenditures;
this.postForm.isGovernmentPurchase = this.xzTable[0].isGovernmentPurchas;
this.open = true;
this.postForm.handUserName2 = response.data.leadershipName;
this.postForm.handUserName2 = response.data.leadershipName;
// this.postForm.projectName = tresponse.data.schoolDepartmentBudgetProjectmxList.projectName;
// this.postForm.content = response.data.schoolDepartmentBudgetProjectmxList.content;
// this.postForm.projectExpenditures = response.data.schoolDepartmentBudgetProjectmxList.projectExpenditures;
// this.postForm.isGovernmentPurchase = response.data.schoolDepartmentBudgetProjectmxList.isGovernmentPurchas;
this.$modal.closeLoading();
}).catch(err => {
......@@ -513,6 +521,7 @@ export default {
this.lookTable = response.data.schoolDepartmentBudgetProjectmxList;
console.log(111, this.lookTable);
this.postForm.informant = this.$store.state.user.name;
console.log(222, this.$store.state.user);
this.postForm.leadershipName = response.data.leadershipName;
this.postForm.year = response.data.year;
this.postForm.deptName = response.data.deptName;
......@@ -534,6 +543,20 @@ export default {
applyMoney: "",
remark: "",
}];
departUser().then(response => {
this.postForm.informant = response.data.userName;
this.postForm.deptName = response.data.deptName;
console.log(111, response.data);
this.postForm.year = moment().add(1, 'years').format('YYYY');
if (response.hasOwnProperty('total') && typeof response.total === 'number' && !isNaN(response.total)) {
this.total = response.total;
} else {
this.total = 0;
}
})
this.open = true;
this.postForm.informant = this.$store.state.user.name;
this.title = '新增预算批复信息'
......@@ -563,18 +586,12 @@ export default {
if (valid) {
this.$modal.loading('正在上传数据,请稍等...');
if (this.xzTable[0].id != null) {
const newObj = {};
newObj.leadershipName = this.postForm.handUserName2;
newObj.leadershipId = this.postForm.leadershipId;
newObj.xzTable = this.schoolDepartmentBudgetProjectmxList;
newObj.year = this.postForm.year;
newObj.deptName = this.postForm.deptName;
newObj.projectName = this.xzTable[0].projectName;
newObj.content = this.xzTable[0].content;
newObj.projectExpenditures = this.xzTable[0].projectExpenditures;
newObj.isGovernmentPurchase = this.xzTable[0].isGovernmentPurchas;
newObj.applyMoney = this.xzTable[0].applyMoney;
newObj.remark = this.xzTable[0].remark;
const newObj = {
id: this.postForm.id,
year: this.postForm.year,
leadershipId: this.postForm.leadershipId,
schoolDepartmentBudgetProjectmxList: this.xzTable
};
console.log('newObj', newObj)
// 编辑
editdeBudget(newObj).then(response => {
......@@ -586,20 +603,58 @@ export default {
this.$modal.closeLoading();
});
} else {
// let fromData = {
// year: "",
// leadershipId: "",
// };
// fromData.schoolDepartmentBudgetProjectmxList = [];
// this.bzjData.forEach((element) => {
// fromData.schoolDepartmentBudgetProjectmxList.push(element.obj);
// });
// fromData.earthTaskXIdList = this.earthTaskXIdList;
// fromData.rwrq = self.form.rwrq;
// fromData.rwlx = self.form.rwlx;
// fromData.xmid = self.form.xmid;
// fromData.jfjg = self.form.jfjg;
// 新增
const newObj = {};
newObj.leadershipName = this.postForm.handUserName2;
newObj.leadershipId = this.postForm.leadershipId;
newObj.xzTable = this.schoolDepartmentBudgetProjectmxList;
newObj.year = this.postForm.year;
newObj.deptName = this.postForm.deptName;
newObj.projectName = this.xzTable[0].projectName;
newObj.content = this.xzTable[0].content;
newObj.projectExpenditures = this.xzTable[0].projectExpenditures;
newObj.isGovernmentPurchase = this.xzTable[0].isGovernmentPurchas;
newObj.applyMoney = this.xzTable[0].applyMoney;
newObj.remark = this.xzTable[0].remark;
console.log('newObj', newObj)
// const newObj = {};
// newObj.leadershipName = this.postForm.handUserName2;
// newObj.leadershipId = this.postForm.leadershipId;
// newObj.xzTable = this.schoolDepartmentBudgetProjectmxList;
// newObj.year = this.postForm.year;
// newObj.deptName = this.postForm.deptName;
// console.log('newObj.deptName', newObj.deptName);
// newObj.projectName = this.xzTable[0].projectName;
// newObj.content = this.xzTable[0].content;
// newObj.projectExpenditures = this.xzTable[0].projectExpenditures;
// newObj.isGovernmentPurchase = this.xzTable[0].isGovernmentPurchas;
// newObj.applyMoney = this.xzTable[0].applyMoney;
// newObj.remark = this.xzTable[0].remark;
// console.log('newObj', newObj)
const newObj = {
year: this.postForm.year,
leadershipId: this.postForm.leadershipId,
schoolDepartmentBudgetProjectmxList: this.xzTable
};
console.log('xzTable', this.xzTable);
console.log('newObj', newObj);
// if (Array.isArray(this.schoolDepartmentBudgetProjectmxList) && this.schoolDepartmentBudgetProjectmxList.length > 0) {
// for (let i = 0; i < this.schoolDepartmentBudgetProjectmxList.length; i++) {
// let project = {};
// project.projectName = this.schoolDepartmentBudgetProjectmxList[i].projectName;
// project.content = this.schoolDepartmentBudgetProjectmxList[i].content;
// project.projectExpenditures = this.schoolDepartmentBudgetProjectmxList[i].projectExpenditures;
// project.isGovernmentPurchase = this.schoolDepartmentBudgetProjectmxList[i].isGovernmentPurchase;
// project.applyMoney = this.schoolDepartmentBudgetProjectmxList[i].applyMoney;
// project.remark = this.schoolDepartmentBudgetProjectmxList[i].remark;
// newObj.xzTable.push(project);
// }
// }
console.log('newObj', newObj);
adddeBudget(newObj).then(response => {
this.$modal.closeLoading();
console.log(this);
......@@ -609,6 +664,8 @@ export default {
}).catch(err => {
this.$modal.closeLoading();
});
}
}
});
......
......@@ -5,9 +5,10 @@
<el-input v-model="queryForm.activityName" @keyup.enter.native="handleQuery" placeholder="活动名称"></el-input>
</el-form-item>
<el-form-item>
<el-date-picker v-model="queryForm.sj" type="daterange" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeData(queryForm.sj)">
<el-date-picker v-model="dateRange" type="daterange" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeData(dateRange)">
</el-date-picker>
<!-- @change="changeData(queryForm.sj) -->
<span v-if="diffDate !== ''" style="font-size: 14px">({{ diffDate }})天</span>
</el-form-item>
<el-form-item>
......@@ -157,20 +158,29 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="分管领导" prop="handUserName2">
<el-input :value="postForm.handUserName2" placeholder="请选择分管领导"
<el-form-item label="分管领导" prop="leadershipName">
<el-input :value="postForm.leadershipName" placeholder="请选择分管领导"
@focus="openSelect('选择分管领导', 'leaderList', 2)"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="流程单附件" prop="fjmc">
<el-input v-model="postForm.fjmc" placeholder="请输入">
<!-- <template slot-scope="scope">
<p v-for="item in scope.row.dzbFjList" :key="item.id">{{ item.fjmc }}</p>
</template> -->
<el-form-item label="文件上传" prop="url">
<!-- <el-upload class="upload-demo" ref="upload" action="#" :auto-upload="true"
:before-upload="beforeUpload" :on-change="fileChange" :http-request="uploadFile"
:on-remove="handleRemoveFile" :file-list="fileList">
<el-input slot="trigger" size="small" type="primary">选取文件
</el-input>
</el-upload> -->
<FileUploadNew @input="getFileList" :limit="1" :value="fileList"></FileUploadNew>
<!--
limit:number 附件最大数量
fileSize:number 附件大小限制(mb)
fileType:array 附件类型
:value="附件List" 编辑、查看时向子组件传递的附件list(value在子组件props中定义)
@input="接收方法" 子组件向父组件传参的方法(input在子组件中引用用于数据回传)
-->
</el-form-item>
</el-col>
</el-row>
......@@ -217,31 +227,33 @@
</tr>
<tr>
<td>是否彩排</td>
<td class="btntext">{{ isRehearsal }}</td>
<td class="btntext"> {{
isRehearsal === '1' ? '是' : '否' }} </td>
<td>是否录像</td>
<td class="btntext">{{ isVideo }}</td>
<td class="btntext">{{ isVideo === '1' ? '是' : '否' }}</td>
<td style="width: 100px">是否直播</td>
<td class="btntext">{{ isLive }}</td>
<td class="btntext">{{ isLive === '1' ? '是' : '否' }}</td>
</tr>
<tr>
<td>话筒数量</td>
<td>{{ htNumber }}</td>
<td>是否需要大屏</td>
<td class="btntext" colspan="5">{{ isBigScreen }}</td>
<td class="btntext" colspan="5">{{ isBigScreen === '1' ? '是' : '否' }}</td>
</tr>
<tr>
<td rowspan="2" class="btntxt">附件
<template slot-scope="scope">
<p v-for="item in scope.row.dzbFjList" :key="item.id">
<el-link type="primary" :href="item.fjlj" :underline="false" target="_blank">{{
item.fjmc
}}</el-link>
<td rowspan="2" class="btntxt">附件</td>
<td colspan="3">
<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>
</template>
</td>
<td colspan="7">{{ fjmc }}</td>
</tr>
</table>
<el-row style="margin-top: 15px; margin-left: 20px">
<el-col :span="8">
......@@ -287,27 +299,37 @@ import {
delAuditor, // 删除礼堂预约
submitAuditor,//提交礼堂预约申请
getLeaderList,//获取校领导下拉框
uploadList,//文件上传
} from "@/api/smartSchool/personWork/auditoriumReservation";
import { CustomCellStyle } from "@/enums/customStyle";
import { commonUpload } from "@/api/common";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { SubmitState } from "@/enums/apply";
import SelectUser from "./components/SelectUser";
import moment from 'moment'
import FileUploadNew from '@/components/FileUploadNew';
export default {
name: "auditoriumReservation",
components: {
SelectUser
SelectUser,
FileUploadNew
},
data() {
return {
// 上传
upload: {
isUploading: false,
progress: 0,
hasFile: false,
},
// 天数
diffDate: "",
title: '', // 初始化 "title" 属性
week: "", // 选择的天数
dateRange: [], // 用于存储选定的时间段
// 日期范围
dateRange: [],
// 提交状态
state: "",
// 自定义列表单元格样式
......@@ -351,7 +373,7 @@ export default {
// 查询表单
queryForm: {
activityName: "",
dateRange: [null, null], // 选择的开始日期和结束日期
dateRange: [], // 选择的开始日期和结束日期
pageNum: 1,
pageSize: 10,
sj: ''
......@@ -396,6 +418,7 @@ export default {
isBigScreen: "",
htNumber: "",
fjmc: "",
fjlj: "",
leadershipId: "",
},
......@@ -406,6 +429,8 @@ export default {
open: false,
title: '选择审批人'
},
// 文件回显
fileList: [],
// 选择对应处理人
selectHandles: {
id: null,
......@@ -424,7 +449,58 @@ export default {
// 是否禁用输入框
isDisabled: false,
// // 表单校验
rules: {},
rules: {
activityName: [
{ required: true, message: "活动名称不能为空", trigger: "blur" }
],
activityArea: [
{ required: true, message: "活动场地不能为空", trigger: "blur" }
],
activityTime: [
{ required: true, message: "活动不能为空", trigger: "blur" }
],
specificUserName: [
{ required: true, message: "具体负责人不能为空", trigger: "blur" }
],
activityNumber: [
{ required: true, message: "活动人数不能为空", trigger: "blur" }
],
activityTime: [
{ required: true, message: "活动不能为空", trigger: "blur" }
],
duration: [
{ required: true, message: "预计时长不能为空", trigger: "blur" }
],
isRehearsal: [
{ required: true, message: "是否彩排不能为空", trigger: "blur" }
],
isVideo: [
{ required: true, message: "是否录像不能为空", trigger: "blur" }
],
isLive: [
{ required: true, message: "是否直播为空", trigger: "blur" }
],
isBigScreen: [
{ required: true, message: "是否需要大屏不能为空", trigger: "blur" }
],
// leadershipName: [
// { required: true, message: "分管领导不能为空", trigger: "change" }
// ],
fjmc: [
{ required: true, message: "流程单附件不能为空", trigger: "blur" }
],
},
// 列表信息
columns: [],
......@@ -432,13 +508,48 @@ export default {
},
created() {
this.getList();
},
methods: {
// changeData(dateRange) {
// if (Array.isArray(dateRange) && dateRange.length === 2) {
// this.queryForm.sj = dateRange; // 更新日期范围选择器的值
// this.queryForm.startTime = dateRange[0]; // 更新开始日期
// this.queryForm.endTime = dateRange[1]; // 更新结束日期
// // 调用后端接口或其他相关处理
// // this.getList();
// }
// },
handleUploadClick() {
// 触发文件上传的点击事件
this.$refs.upload.$el.querySelector('.el-upload__input').click();
},
//上传按钮
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);
},
/** 获取列表数据 */
getList() {
listAuditor(this.queryForm).then(response => {
const params = {
activityName: this.queryForm.activityName,
pageNum: this.queryForm.pageNum,
pageSize: this.queryForm.pageSize,
startTime: this.dateRange[0],
endTime: this.dateRange[1]
};
console.log('params', params);
listAuditor(params).then(response => {
this.loading = false;
this.infoList = response.rows;
console.log(111, response.rows);
......@@ -496,9 +607,9 @@ export default {
}))
},
handleDeputyLeader(data) {
const { handUserName2, handUserId2 } = data;
this.form.handUserName2 = handUserName2;
this.form.handUserId2 = handUserId2;
const { leadershipName, leadershipId } = data;
this.form.leadershipName = leadershipName;
this.form.leadershipId = leadershipId;
},
/** 查看 */
......@@ -537,9 +648,13 @@ export default {
const endDate = value[1];
const diffDate = moment(endDate).diff(startDate, 'day');
this.diffDate = diffDate; // 更新diffDate属性的值
console.log('value', value);
console.log('this.diffDate', this.diffDate);
},
// 提交按钮
submitApply(row) {
console.log('row', row);
this.$confirm('确认要提交申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -587,13 +702,13 @@ export default {
},
getFormatDate(timeDate) {
let date = new Date(timeDate);
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
return [year, '-', month, '-', day].join('');
},
// getFormatDate(timeDate) {
// let date = new Date(timeDate);
// let year = date.getFullYear();
// let month = date.getMonth() + 1;
// let day = date.getDate();
// return [year, '-', month, '-', day].join('');
// },
......@@ -619,7 +734,7 @@ export default {
// 这种写法存在一定危险,后续最好是可以有更好的字段名对应
this.$set(this.form, `handUserName${this.selectHandles.type}`, select.name);
this.$set(this.form, `handUserId${this.selectHandles.type}`, select.id);
this.postForm.handUserName2 = select.name;
this.postForm.leadershipName = select.name;
this.postForm.leadershipId = select.id;
},
......@@ -644,12 +759,26 @@ export default {
this.reset();
const id = row.id || this.ids;
this.postForm = row;
console.log('this.fileList', this.fileList);
getAuditor(id).then(response => {
this.postForm = response.data;
this.postForm.handUserName2 = response.data.leadershipName
console.log('this.fileList', this.fileList);
// if (this.fileList.length == 0) {
// this.fileList = []
// } else {
this.fileList = [{
fjlj: this.postForm.fjlj,
fjmc: this.postForm.fjmc,
}]
// }
console.log('postForm', this.postForm);
this.postForm.leadershipName = response.data.leadershipName
console.log(1111, response.data);
this.open = true;
this.isDisabled = false;
});
},
// 删除按钮操作
......@@ -682,7 +811,8 @@ export default {
this.throttle(() => {
this.$refs["postForm"].validate((valid) => {
if (valid) {
this.$modal.loading("正在上传数据,请稍等...");
console.log('this.postForm', this.postForm);
// this.$modal.loading("正在上传数据,请稍等...");
if (this.postForm.id != null) {
// 查看表单
updateAuditor(this.postForm)
......@@ -696,7 +826,7 @@ export default {
this.$modal.closeLoading();
});
} else {
// 新增
if (this.fileList.length != 0) {
console.log('this.postForm', this.postForm);
addAuditor(this.postForm)
.then((response) => {
......@@ -708,6 +838,12 @@ export default {
.catch((err) => {
this.$modal.closeLoading();
});
} else {
this.$modal.msgError("流程单附件不能为空");
}
// 新增
}
}
});
......@@ -720,7 +856,7 @@ export default {
// this.resetQuery();
this.reset();
},
// 重置
reset() {
// 这里需要重置对话框表单
this.postForm = {
......@@ -742,6 +878,76 @@ export default {
};
this.resetForm("postForm");
},
/** 下载 */
handleDownLoad({ url, name, id }) {
if (isString(url) && url.lastIndexOf("/") > -1) {
// this.$download.name(url.slice(url.lastIndexOf("/") + 1), false);
// this.download(url, {});
// downLoadFile(url, name);
updateDownload(id).then(response => {
this.$download.resource(url);
this.getList();
}).catch(error => {
})
} else {
return "";
}
},
/** 上传文件前的钩子 */
beforeUpload() {
this.upload.isUploading = false;
this.upload.progress = 0;
},
/** 添加的文件时触发该钩子 */
fileChange(file, fileList) {
fileList.length > 0 && (this.upload.hasFile = true);
this.$refs.upload.uploadFiles = [file];
},
/** 上传文件到服务器 */
submitFile() {
this.$refs.upload.submit();
},
/** 删除文件 */
handleRemoveFile(file, fileList) {
fileList.length === 0 && (this.upload.hasFile = false);
},
/** 文件上传 */
// uploadFile(file, fileList) {
// const fileData = file.file;
// const fileName = fileData.name;
// const formData = new FormData();
// formData.append("file", fileData);
// this.upload.isUploading = true;
// uploadList(formData).then(response => {
// this.$message.success("上传成功");
// this.form.url = response.url;
// this.form.name = fileName;
// this.upload.isUploading = false;
// }).catch(error => {
// // 处理上传失败的情况
// });
// },
// 附件上传回调函数
uploadFile(data) {
console.log('getFileList', data)
// this.form.files = data
uploadList().then(response => {
return {
"fjlj": item.url,
"fjmc": item.name
}
})
console.log('dzbFjList', this.dzbFjList)
},
/** 文件下载 */
// downloadFile(fileUrl) {
// },
},
};
......
......@@ -74,7 +74,7 @@
<td>申请时间</td>
<td>{{ applyTime }}</td>
<td>状态</td>
<td class="btntext" colspan="5">{{ statu }}</td>
<td class="btntext" colspan="5">{{ statu === '1' ? '预约成功' : '取消' }}</td>
</tr>
</table>
</div>
......
......@@ -4,13 +4,11 @@
<el-form-item prop="activityName">
<el-input v-model="queryForm.activityName" @keyup.enter.native="handleQuery" placeholder="活动名称"></el-input>
</el-form-item>
<el-form-item>
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="至" start-placeholder="开始日期"
value-format="yyyy-MM-dd HH:mm" end-placeholder="结束日期"
@change="changeData(queryForm.sj)"></el-date-picker>
<span v-if="week !== ''" style="font-size: 14px">({{ week }})</span>
<el-form-item prop="dateRange">
<el-date-picker v-model="dateRange" type="daterange" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
......@@ -49,8 +47,8 @@
</el-table-column>
<el-table-column label="申请人" align="center" prop="applyName" />
<el-table-column label="申请时间" align="center" prop="applyTime" />
<el-table-column :width="queryForm.submitState ? 100 : 250" label="操作" align="center" v-if="columns[12].visible"
fixed="right" class-name="small-padding fixed-width">
<el-table-column :width="queryForm.submitState ? 100 : 250" label="操作" align="center" fixed="right"
class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- v-if="queryForm.submitState" -->
<div>
......@@ -162,7 +160,7 @@
<script>
import {
listAuditor,
listAuditorqb,
getAuditor,
} from "@/api/smartSchool/personWork/venueReservation/audreservationStatus";
......@@ -199,7 +197,8 @@ export default {
};
return {
week: "", // 选择的天数
dateRange: [], // 用于存储选定的时间段
// 日期范围
dateRange: [],
// 单选框
radio1: 3,
radio2: 3,
......@@ -213,35 +212,12 @@ export default {
activeName: SubmitState.WILL_SUBMIT,
// 查询表单
queryForm: {
submitState: 0,
activityName: "",
dateRange: [], // 选择的开始日期和结束日期
pageNum: 1,
pageSize: 10,
title: '',//标题
type: '',//类型
vehicleId: '',//车辆id
applicantId: '',//申请人id
applicantName: '',//用车人姓名
departmentId: undefined,//用车部门id
reason: '',//用车原因
peopleNumber: '',//人数
departurePlace: '',//出发地点
destination: '',//目的地
startTime: '',//用车开始时间
endTime: '',//用车结束时间
driver: '',//司机
vehicleType: '',//用车类型
remarks: '',//备注
kilometers: '',//公里数
state: '',//状态
instanceId: '',//流程实例id
// applyUser: '',//创建人
applyTime: '',//申请时间
taskName: '',//任务名称
comment: '',//批注
assignee: '',//
assigneeName: '',//办理人
realityStartTime: '',//实际开始时间
realityEndTime: '',//实际结束时间
sj: '',
state: "",
},
// 审批历史表单
historyForm: {
......@@ -305,30 +281,7 @@ export default {
title: '',
// 列表信息
columns: [
{ key: 0, label: `流程实例ID`, visible: true },
{ key: 1, label: `申请人`, visible: true },
{ key: 2, label: `人数`, visible: true },
{ key: 3, label: `出发地点`, visible: true },
{ key: 4, label: `目的地`, visible: true },
{ key: 5, label: `用车开始时间`, visible: true },
{ key: 6, label: `用车结束时间`, visible: true },
{ key: 7, label: `司机`, visible: true },
{ key: 8, label: `用车类型`, visible: true },
{ key: 9, label: `用车原因`, visible: true },
{ key: 10, label: `申请时间`, visible: true },
{ key: 11, label: `备注`, visible: true },
{ key: 12, label: `公里数`, visible: true },
{ key: 13, label: `操作`, visible: true },
{ key: 14, label: `车牌号`, visible: true },
{ key: 15, label: `车辆类型`, visible: true },
{ key: 16, label: `车辆状态`, visible: true },
{ key: 17, label: `任务名称`, visible: true },
{ key: 18, label: `处理人ID`, visible: true },
{ key: 19, label: `处理人`, visible: true },
{ key: 20, label: `审批意见`, visible: true },
{ key: 21, label: `开始时间`, visible: true },
{ key: 22, label: `结束时间`, visible: true },
{ key: 23, label: `耗时`, visible: true },
],
// 活动名称
......@@ -396,12 +349,21 @@ export default {
},
methods: {
/** 获取列表数据 */
getList() {
listAuditor(this.addDateRange(this.queryForm, this.dateRange)).then(response => {
const params = {
activityName: this.queryForm.activityName,
pageNum: this.queryForm.pageNum,
pageSize: this.queryForm.pageSize,
startTime: this.dateRange[0],
endTime: this.dateRange[1],
};
console.log(123, params);
listAuditorqb(params).then(response => {
this.loading = false;
this.infoList = response.rows;
console.log(111);
console.log(111, response.rows);
this.total = response.total;
}).catch(err => {
this.loading = false;
......
......@@ -93,15 +93,10 @@ export default {
id: "",
studioName: "",
studioStatu: "",
studioArea: "",
studioArea: '',
pageNum: 1,
pageSize: 10,
},
queryForm: {
studioName: "",
studioStatu: "",
studioArea: "",
},
title: "",
rules: {
......@@ -130,8 +125,7 @@ export default {
methods: {
/** 查询 */
getList() {
this.loading = true;
getStudio(this.queryParams).then((response) => {
getStudio(this.queryParams.studioArea).then((response) => {
this.tableData = response.rows;
this.loading = false;
console.log(111, response.rows);
......
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