Commit b32e66f7 by zhaopanyu

zpy 7.20

parent baa91c5d
...@@ -47,3 +47,10 @@ export function submitApply(id) { ...@@ -47,3 +47,10 @@ export function submitApply(id) {
method: "post", 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) { ...@@ -58,3 +58,10 @@ export function getLeaderList(data) {
params: data, params: data,
}); });
} }
// 附件上传
export function uploadList() {
return request({
url: "/common/upload",
method: "post",
});
}
\ No newline at end of file
import request from "@/utils/request"; import request from "@/utils/request";
// 查询全部礼堂预约列表 // 查询全部礼堂预约列表
export function listAuditor(query) { export function listAuditorqb(query) {
return request({ return request({
url: "/auditorium/list", url: "/auditorium/list",
method: "get", 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 @@ ...@@ -15,7 +15,7 @@
<el-form :model="queryParams" :inline="true" style="padding:0 0 0 0" size="small"> <el-form :model="queryParams" :inline="true" style="padding:0 0 0 0" size="small">
</el-form> </el-form>
<el-table :data="tableData" v-loading="loading"> <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 prop="deptName" label="科室" align="center" />
<el-table-column label="填报人" align="center" prop="informant" /> <el-table-column label="填报人" align="center" prop="informant" />
<el-table-column label="分管领导" align="center" prop="leadershipName" /> <el-table-column label="分管领导" align="center" prop="leadershipName" />
...@@ -109,6 +109,7 @@ export default { ...@@ -109,6 +109,7 @@ export default {
this.loading = true; this.loading = true;
taskDoneList().then((response) => { taskDoneList().then((response) => {
this.tableData = response.rows this.tableData = response.rows
console.log('this.tableData', this.tableData);
this.total = response.total this.total = response.total
this.loading = false this.loading = false
}); });
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
<el-form-item prop="deptName"> <el-form-item prop="deptName">
<el-input v-model="queryForm.deptName" placeholder="科室" clearable> </el-input> <el-input v-model="queryForm.deptName" placeholder="科室" clearable> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="isGov"> <el-form-item prop="isGovernmentPurchase">
<el-select v-model="queryForm.isGov" placeholder="是否政府采购" style="width: 100%"> <el-select v-model="queryForm.isGovernmentPurchase" placeholder="是否政府采购" style="width: 100%">
<el-option label="是" value="1"></el-option> <el-option label="是" value="1"></el-option>
<el-option label="否" value="0"></el-option> <el-option label="否" value="0"></el-option>
</el-select> </el-select>
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<td>申请时间</td> <td>申请时间</td>
<td>{{ applyTime }}</td> <td>{{ applyTime }}</td>
<td>状态</td> <td>状态</td>
<td class="btntext" colspan="5">{{ statu }}</td> <td class="btntext" colspan="5">{{ statu === '1' ? '预约成功' : '取消' }}</td>
</tr> </tr>
</table> </table>
</div> </div>
......
...@@ -4,13 +4,11 @@ ...@@ -4,13 +4,11 @@
<el-form-item prop="activityName"> <el-form-item prop="activityName">
<el-input v-model="queryForm.activityName" @keyup.enter.native="handleQuery" placeholder="活动名称"></el-input> <el-input v-model="queryForm.activityName" @keyup.enter.native="handleQuery" placeholder="活动名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item prop="dateRange">
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="至" start-placeholder="开始日期" <el-date-picker v-model="dateRange" type="daterange" range-separator="至" start-placeholder="开始日期"
value-format="yyyy-MM-dd HH:mm" end-placeholder="结束日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
@change="changeData(queryForm.sj)"></el-date-picker> </el-date-picker>
<span v-if="week !== ''" style="font-size: 14px">({{ week }})</span>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <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> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
...@@ -49,8 +47,8 @@ ...@@ -49,8 +47,8 @@
</el-table-column> </el-table-column>
<el-table-column label="申请人" align="center" prop="applyName" /> <el-table-column label="申请人" align="center" prop="applyName" />
<el-table-column label="申请时间" align="center" prop="applyTime" /> <el-table-column label="申请时间" align="center" prop="applyTime" />
<el-table-column :width="queryForm.submitState ? 100 : 250" label="操作" align="center" v-if="columns[12].visible" <el-table-column :width="queryForm.submitState ? 100 : 250" label="操作" align="center" fixed="right"
fixed="right" class-name="small-padding fixed-width"> class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- v-if="queryForm.submitState" --> <!-- v-if="queryForm.submitState" -->
<div> <div>
...@@ -162,7 +160,7 @@ ...@@ -162,7 +160,7 @@
<script> <script>
import { import {
listAuditor, listAuditorqb,
getAuditor, getAuditor,
} from "@/api/smartSchool/personWork/venueReservation/audreservationStatus"; } from "@/api/smartSchool/personWork/venueReservation/audreservationStatus";
...@@ -199,7 +197,8 @@ export default { ...@@ -199,7 +197,8 @@ export default {
}; };
return { return {
week: "", // 选择的天数 week: "", // 选择的天数
dateRange: [], // 用于存储选定的时间段 // 日期范围
dateRange: [],
// 单选框 // 单选框
radio1: 3, radio1: 3,
radio2: 3, radio2: 3,
...@@ -213,35 +212,12 @@ export default { ...@@ -213,35 +212,12 @@ export default {
activeName: SubmitState.WILL_SUBMIT, activeName: SubmitState.WILL_SUBMIT,
// 查询表单 // 查询表单
queryForm: { queryForm: {
submitState: 0, activityName: "",
dateRange: [], // 选择的开始日期和结束日期
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
title: '',//标题 sj: '',
type: '',//类型 state: "",
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: '',//实际结束时间
}, },
// 审批历史表单 // 审批历史表单
historyForm: { historyForm: {
...@@ -305,30 +281,7 @@ export default { ...@@ -305,30 +281,7 @@ export default {
title: '', title: '',
// 列表信息 // 列表信息
columns: [ 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 { ...@@ -396,12 +349,21 @@ export default {
}, },
methods: { methods: {
/** 获取列表数据 */ /** 获取列表数据 */
getList() { 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.loading = false;
this.infoList = response.rows; this.infoList = response.rows;
console.log(111); console.log(111, response.rows);
this.total = response.total; this.total = response.total;
}).catch(err => { }).catch(err => {
this.loading = false; this.loading = false;
......
...@@ -93,15 +93,10 @@ export default { ...@@ -93,15 +93,10 @@ export default {
id: "", id: "",
studioName: "", studioName: "",
studioStatu: "", studioStatu: "",
studioArea: "", studioArea: '',
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}, },
queryForm: {
studioName: "",
studioStatu: "",
studioArea: "",
},
title: "", title: "",
rules: { rules: {
...@@ -130,8 +125,7 @@ export default { ...@@ -130,8 +125,7 @@ export default {
methods: { methods: {
/** 查询 */ /** 查询 */
getList() { getList() {
this.loading = true; getStudio(this.queryParams.studioArea).then((response) => {
getStudio(this.queryParams).then((response) => {
this.tableData = response.rows; this.tableData = response.rows;
this.loading = false; this.loading = false;
console.log(111, response.rows); 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