Commit 5e738d8e by 刘玉帅

Merge branch 'xq_rymp' of http://47.92.108.28/changchao/founder_vue into xq_rymp

parents aa75349a d1301f52
......@@ -12,6 +12,7 @@
"driver.js": "^0.9.8",
"echarts": "^4.9.0",
"element-ui": "^2.4.5",
"file-saver": "^2.0.5",
"js-cookie": "^2.2.1",
"qs": "^6.9.4",
"sass-resources-loader": "^2.1.1",
......@@ -20,7 +21,9 @@
"vue-router": "^3.2.0",
"vue-wechat-title": "^2.0.7",
"vuex": "^3.4.0",
"vuex-persistedstate": "^4.0.0-beta.1"
"vuex-persistedstate": "^4.0.0-beta.1",
"xlsx": "^0.17.1",
"xlsx-style": "^0.8.13"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.5.0",
......
<?xml version="1.0" encoding="UTF-8"?>
<svg width="72px" height="72px" viewBox="0 0 72 72" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 64 (93537) - https://sketch.com -->
<title>编组 12</title>
<title>摸排总数</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="0%" y1="23.1970835%" x2="50%" y2="100%" id="linearGradient-1">
......
<?xml version="1.0" encoding="UTF-8"?>
<svg width="72px" height="72px" viewBox="0 0 72 72" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 64 (93537) - https://sketch.com -->
<title>编组 17</title>
<title>退回总数</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="0%" y1="12.5009432%" x2="50%" y2="100%" id="linearGradient-1">
......
<?xml version="1.0" encoding="UTF-8"?>
<svg width="72px" height="72px" viewBox="0 0 72 72" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 64 (93537) - https://sketch.com -->
<title>编组 18</title>
<title>完成率</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="0%" y1="7.85313098%" x2="50%" y2="100%" id="linearGradient-1">
......
<?xml version="1.0" encoding="UTF-8"?>
<svg width="72px" height="72px" viewBox="0 0 72 72" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 64 (93537) - https://sketch.com -->
<title>编组 16</title>
<title>未反馈数</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="0%" y1="11.1245778%" x2="50%" y2="100%" id="linearGradient-1">
......
<?xml version="1.0" encoding="UTF-8"?>
<svg width="72px" height="72px" viewBox="0 0 72 72" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 64 (93537) - https://sketch.com -->
<title>编组 14</title>
<title>未匹配数</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="0%" y1="8.38135342%" x2="50%" y2="100%" id="linearGradient-1">
......
<?xml version="1.0" encoding="UTF-8"?>
<svg width="72px" height="72px" viewBox="0 0 72 72" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 64 (93537) - https://sketch.com -->
<title>编组 15</title>
<title>已反馈数</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="0%" y1="11.1245778%" x2="50%" y2="100%" id="linearGradient-1">
......
<?xml version="1.0" encoding="UTF-8"?>
<svg width="72px" height="72px" viewBox="0 0 72 72" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 64 (93537) - https://sketch.com -->
<title>编组 13</title>
<title>已匹配数</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="0%" y1="8.38135342%" x2="50%" y2="100%" id="linearGradient-1">
......
/*
* @Author: your name
* @Date: 2021-08-27 14:14:36
* @LastEditTime: 2021-09-02 17:19:28
* @LastEditTime: 2021-09-02 18:17:16
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\router\modules\index.js
......@@ -23,6 +23,7 @@ export default [
{
path: "/Home",
name: "Home",
redirect: '/Home/rwgl',
meta: {
title: "工作桌面",
auth: "5"
......@@ -82,11 +83,21 @@ export default [
component: () => import("@/views/rwgl/rympfk.vue"),
},
{
path: "rythfk",
name: "rythfk",
hidden: true,
meta: {
title: "人员退回反馈",
auth: "5"
},
component: () => import("@/views/rwgl/rythfk.vue"),
},
{
path: "sdxfrw",
name: "sdxfrw",
hidden: false,
meta: {
title: "手动下发任务",
title: "任务下发",
auth: "5"
},
component: () => import("@/views/rwgl/sdxfrw.vue"),
......@@ -94,9 +105,9 @@ export default [
{
path: "mptj",
name: "mptj",
hidden: false,
hidden: true,
meta: {
title: "摸排统计",
title: "人员摸排列表",
auth: "5"
},
component: () => import("@/views/rwgl/mptj.vue"),
......
<!--
* @Author: your name
* @Date: 2021-08-28 19:36:38
* @LastEditTime: 2021-09-01 20:44:10
* @LastEditTime: 2021-09-02 15:49:52
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\rwgl\rwthcl.vue
......@@ -27,21 +27,10 @@
</span>
</el-dialog>
</div>
<div class="fkDialog">
<el-dialog title="反馈" :visible.sync="fkdialogVisible" width="30%">
反馈:<el-input type="textarea" :rows="2" placeholder="请输入反馈信息" v-model="fk">
</el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="fkdialogVisible = false">取 消</el-button>
<el-button type="primary" @click="fkBtn">确 定</el-button>
</span>
</el-dialog>
</div>
<div class="thDialog">
<el-dialog title="退回" :visible.sync="thdialogVisible" width="30%">
<div>
是否要退回原地址天津市西湖区
</div>
请输入真实地址:<el-input placeholder="请输入" v-model="thdz">
</el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="thdialogVisible = false">取 消</el-button>
<el-button type="primary" @click="thBtn">确 定</el-button>
......@@ -59,9 +48,8 @@ export default {
},
data () {
return {
thdz: '',
thdialogVisible: false,
fkdialogVisible: false,
fk: '',
xqID: '',
xqZSDZ: '',
xqBZ: '',
......@@ -122,10 +110,6 @@ export default {
})
.catch(_ => { });
},
fkBtn () {
this.fkdialogVisible = false
this.$message.success('反馈已发送!')
},
resetForm (formName) {
this.$refs[formName].resetFields();
console.log("重置按钮");
......@@ -144,9 +128,13 @@ export default {
this.xqBZ = msg[0].BZ
this.xqdialogVisible = true
} else if (msg[1] == 'fk') {
this.fk = ''
this.fkdialogVisible = true
// 反馈跳转
this.$router.push({
name: 'rythfk',
params: { info: msg[0] }
})
} else if(msg[1] == 'th') {
this.thdz = ''
this.thdialogVisible = true
}
console.log("父组件", msg[0], msg[1]);
......
<!--
* @Author: your name
* @Date: 2021-09-01 09:45:29
* @LastEditTime: 2021-09-02 17:38:56
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\rwgl\rympfk.vue
-->
<template>
<div>
<div class="dinfo">
<div class="info">人员退回详情</div>
</div>
<div class="settable">
<el-table id="ajzbQuery" v-loading="tableLoading" element-loading-text="拼命加载中" :key="key" ref="itsmDataTable" :data="tableData" tooltip-effect="dark" max-height="600" width="100%" size="small">
<el-table-column v-for="columnTitle in cxDefaultFormThead" :prop="columnTitle.prop" :key="columnTitle.label" :label="columnTitle.label" :width="columnTitle.width">
</el-table-column>
<el-table-column label="操作" width="auto" v-if="btnShow">
<template slot-scope="scope">
<el-button type="text" size="small" v-if="btnShow == 'rymplb'" @click="handleClick(scope.row, 'xq')">详情</el-button>
<el-button type="text" size="small" v-if="btnShow == 'rymplb'" @click="handleClick(scope.row, 'fk')">反馈</el-button>
<el-button type="text" size="small" v-if="btnShow == 'rymplb'" @click="handleClick(scope.row, 'th')">退回</el-button>
<div class="clearimg" v-if="btnShow == 'rwgl'" @click="handleImg(scope.row)">
<img :src="clraeImg" alt="" />
</div>
</template>
<!-- <template slot-scope="scope">
</template> -->
</el-table-column>
</el-table>
</div>
<div class="dinfo ryfk">
<div class="info">人员退回反馈</div>
</div>
<div class="rympform">
<el-form ref="form" :model="sizeForm" label-width="80px" :inline="true" label-position="top" size="mini" class="ryform">
<div>
<el-form-item label="人员来源:" class="col">
<el-select v-model="sizeForm.region" placeholder="请选择人员来源">
<el-option v-for="(item1, index) in perList" :label="item1.label" :value="item1.value" :key="index"></el-option>
</el-select>
</el-form-item>
<el-form-item label="核酸检测结果:" class="col">
<el-input v-model="sizeForm.name" placeholder="请输入核算检测结果"></el-input>
</el-form-item>
<el-form-item label="管理方式:" class="col">
<el-select v-model="sizeForm.glff" placeholder="请选择管理方式">
<el-option v-for="(item1, index) in glList" :label="item1.label" :value="item1.value" :key="index"></el-option>
</el-select>
</el-form-item>
</div>
<div class="twoform">
<el-form-item label="大数据协查人员类别:" class="col">
<el-select v-model="sizeForm.dsj" placeholder="请选择管理方式">
<el-option v-for="(item1, index) in dsjList" :label="item1.label" :value="item1.value" :key="index"></el-option>
</el-select>
</el-form-item>
<div class="data">
<el-form-item label="活动时间" class="col">
<el-date-picker type="datetime" placeholder="选择日期" v-model="sizeForm.date1" style="width: 100%" ref="data" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</div>
<div class="textarea">
<el-form-item label="备注" prop="desc">
<el-input type="textarea" v-model="sizeForm.textarea" placeholder="请填写备注"></el-input>
</el-form-item>
</div>
</div>
</el-form>
</div>
<div class="btn">
<el-button size="mini" @click="handClick('clear')">取消</el-button>
<el-button size="mini" type="primary" @click="handClick('ok')">提交</el-button>
</div>
</div>
</template>
<script>
export default {
data () {
return {
sizeForm: {
name: "",
region: "",
date1: "",
date2: "",
delivery: false,
type: [],
resource: "",
desc: "",
glff: "",
dsj: "",
textarea: "",
},
tableLoading: false, //loading
key: "1",
cxDefaultFormThead: [
{
label: "ID",
prop: "ID",
width: "auto",
},
{
label: "真实地址",
prop: "ZSDZ",
width: "auto",
},
{
label: "备注",
prop: "BZ",
width: "auto",
},
],
info: {},
tableData: [
],
form: {
name: "",
userId: "",
},
btnShow: "",
isShowpagin: "rympfk",
perList: [
{ label: "北京", value: "1" },
{ label: "哈尔滨", value: "2" },
],
glList: [
{ label: "法律方法", value: "1" },
{ label: "教育方法", value: "2" },
],
dsjList: [
{ label: "学生", value: "1" },
{ label: "打工人", value: "2" },
],
};
},
methods: {
handClick (type) {
console.log(this.sizeForm);
},
/**
* @description: 取消
* @param {*}
* @return {*}
*/
handCancel () {
console.log("取消");
},
/**
* @description: 提交
* @param {*}
* @return {*}
*/
handSubmit () {
console.log("提交");
},
},
mounted () {
console.log(this.$route.params);
if(this.$route.params.info) {
localStorage.setItem('info', JSON.stringify(this.$route.params.info))
}
console.log(localStorage);
this.tableData[0] = JSON.parse(localStorage.getItem('info'))
// document.getElementsByClassName('el-input__icon')[0].className += ' el-icon-date'; //在原来的后面加这个
},
updated () {
if (this.$refs.data.value) {
var data = document.getElementsByClassName("el-input__inner")[4].value;
if (data) {
} else {
console.log("001");
document.getElementsByClassName("el-input__icon")[4].className =
"el-icon-time";
}
}
// console.log(this.$refs.data.value);
},
};
</script>
<style lang="scss" scoped>
.settable {
position: absolute;
width: 98%;
padding: 0 24px 0 24px;
}
.rympform /deep/ {
padding-left: 25px;
padding-top: 6px;
padding-right: 23px;
position: relative;
.ryform {
border-bottom: 1px solid #eeeeee;
}
top: 77px;
.el-input__inner {
width: 280px;
height: 32px;
}
.textarea {
.el-textarea__inner {
width: 677px;
height: 64px;
}
}
}
.twoform /deep/ {
.el-input__prefix {
display: none;
}
.el-input--prefix .el-input__inner {
padding-left: 15px;
}
.data {
display: inline-block;
.el-input__icon::after {
position: absolute;
right: 20px;
content: "";
height: 100%;
width: 0;
display: inline-block;
vertical-align: middle;
background: olivedrab;
}
.el-input__icon::after:hover {
display: none;
}
.el-input__prefix,
.el-input__suffix {
position: absolute;
top: 2px;
// right: 2px;
}
.el-icon-time {
width: 25px;
}
}
}
.col {
margin-right: 7.472%;
}
.ryfk {
position: relative;
top: 77px;
}
.dinfo {
height: 62px;
// background: chocolate;
padding: 23px 25px 15px 24px;
box-sizing: border-box;
margin-bottom: 16px;
.info {
border-bottom: 1px solid #999999;
width: 100%;
// height: 24px;
font-size: 16px;
font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
font-weight: bold;
color: #333333;
line-height: 24px;
padding-bottom: 15px;
}
}
.btn {
margin-top: 20px;
padding-right: 24px;
position: relative;
top: 77px;
display: flex;
justify-content: flex-end;
.el-button+.el-button{
margin-left: 24px;
}
.el-button{
width: 72px;
}
.el-button--mini, .el-button--mini.is-round {
padding: 9px 15px;
}
}
</style>
<!--
* @Author: your name
* @Date: 2021-08-31 15:25:02
* @LastEditTime: 2021-09-01 19:23:26
* @LastEditTime: 2021-09-03 17:17:27
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\tjbb\bb.vue
......@@ -19,12 +19,12 @@
<el-radio :label="3">当季</el-radio>
</el-radio-group>
</div>
<div class="export">导出</div>
<div class="export" @click="exportExcel('XXX重点地区来津人员排查统计表')">导出</div>
</div>
<div class="content">
<div class="title">XXX重点地区来津人员排查统计表</div>
<div class="table">
<el-table :data="tableData" max-height="400" style="width: 100%" :span-method="arraySpanMethod" :cell-class-name="addClass" :header-cell-style="headClass">
<el-table ref="report-table" id="tableData" :data="tableData" max-height="400" style="width: 100%" :span-method="arraySpanMethod" :cell-class-name="addClass" :header-cell-style="headClass">
<el-table-column prop="date" label="街镇" width="150" align="center">
</el-table-column>
<el-table-column label="人员" align="center">
......@@ -73,6 +73,8 @@
</template>
<script>
import FileSaver from 'file-saver';
import XLSX from 'xlsx';
export default {
data () {
return {
......@@ -201,7 +203,7 @@ export default {
document.querySelector('.el-input__icon.el-range__icon.el-icon-date').style.right = '5px';
},
updated () {
if(document.querySelector('.el-range-input').value != '') {
if (document.querySelector('.el-range-input').value != '') {
document.querySelector('.el-input__icon.el-range__icon.el-icon-date').style.display = 'none'
} else {
document.querySelector('.el-input__icon.el-range__icon.el-icon-date').style.display = 'block'
......@@ -209,6 +211,32 @@ export default {
},
methods: {
/**
* @description: 导出excel表格
* @param {*}
* @return {*}
*/
exportExcel (excelName) {
//excelName --设置导出的excel名称
//report-table --对应的要导出的el-table的ref名称
try {
const $e = this.$refs['report-table'].$el;
// 如果表格加了fixed属性,则导出的文件会生产两份一样的数据,所以可在这里判断一下
let $table = $e.querySelector('.el-table__fixed');
if (!$table) {
$table = $e;
}
// 为了返回单元格原始字符串,设置{ raw: true }
const wb = XLSX.utils.table_to_book($table, { raw: true });
const wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' });
FileSaver.saveAs(
new Blob([wbout], { type: 'application/octet-stream' }),
`${excelName}.xlsx`,
);
} catch (e) {
if (typeof console !== 'undefined') console.error(e);
}
},
/**
* @description: 找到表头设置样式
* @param {*} row
* @param {*} column
......
<!--
* @Author: your name
* @Date: 2021-08-31 15:25:02
* @LastEditTime: 2021-09-01 19:39:23
* @LastEditTime: 2021-09-03 16:56:43
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\tjbb\bb.vue
......@@ -19,15 +19,15 @@
<el-radio :label="3">当季</el-radio>
</el-radio-group>
</div>
<div class="export">导出</div>
<div class="export" @click="exportExcel('杨柳青镇街镇江苏重点区域驻留和时空伴随统计表')">导出</div>
</div>
<div class="content">
<div class="title">杨柳青镇街镇江苏重点区域驻留和时空伴随统计表</div>
<div class="table">
<el-table :data="tableData" max-height="400" style="width: 100%" :span-method="arraySpanMethod" :cell-class-name="addClass" :header-cell-style="headClass">
<el-table-column prop="pc" label="批次" width="150" align="center" fixed>
<el-table id="tableData2" ref="report-table" :data="tableData" max-height="400" style="width: 100%" :span-method="arraySpanMethod" :cell-class-name="addClass" :header-cell-style="headClass">
<el-table-column prop="pc" label="批次" width="150" align="center">
</el-table-column>
<el-table-column label="推送数" prop="tss" align="center">
<el-table-column label="推送数" prop="tss" align="center" fixed>
</el-table-column>
<el-table-column label="已排查人数" prop="ypcrs" align="center">
</el-table-column>
......@@ -79,6 +79,8 @@
</template>
<script>
import FileSaver from 'file-saver';
import XLSX from 'xlsx';
export default {
data () {
return {
......@@ -230,7 +232,7 @@ export default {
document.querySelector('.el-input__icon.el-range__icon.el-icon-date').style.right = '5px';
},
updated () {
if(document.querySelector('.el-range-input').value != '') {
if (document.querySelector('.el-range-input').value != '') {
document.querySelector('.el-input__icon.el-range__icon.el-icon-date').style.display = 'none'
} else {
document.querySelector('.el-input__icon.el-range__icon.el-icon-date').style.display = 'block'
......@@ -238,6 +240,32 @@ export default {
},
methods: {
/**
* @description: 导出excel表格
* @param {*}
* @return {*}
*/
exportExcel (excelName) {
//excelName --设置导出的excel名称
//report-table --对应的要导出的el-table的ref名称
try {
const $e = this.$refs['report-table'].$el;
// 如果表格加了fixed属性,则导出的文件会生产两份一样的数据,所以可在这里判断一下
let $table = $e.querySelector('.el-table__fixed');
if (!$table) {
$table = $e;
}
// 为了返回单元格原始字符串,设置{ raw: true }
const wb = XLSX.utils.table_to_book($table, { raw: true });
const wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' });
FileSaver.saveAs(
new Blob([wbout], { type: 'application/octet-stream' }),
`${excelName}.xlsx`,
);
} catch (e) {
if (typeof console !== 'undefined') console.error(e);
}
},
/**
* @description: 找到表头设置样式
* @param {*} row
* @param {*} column
......
<!--
* @Author: your name
* @Date: 2021-08-31 15:24:48
* @LastEditTime: 2021-09-02 10:22:41
* @LastEditTime: 2021-09-03 15:22:05
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\tjbb\tb.vue
......@@ -417,7 +417,7 @@ export default {
}
}
.content {
height: 500px;
height: 480px;
}
}
.right {
......@@ -428,7 +428,7 @@ export default {
justify-content: space-between;
.pie {
width: 48%;
height: 243px;
height: 240px;
margin-bottom: 25px;
border-radius: 6px;
border: 1px solid #999999;
......
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