测试提交浅水湾项目
This commit is contained in:
parent
3894a61f4d
commit
9e35bf418b
|
@ -3,7 +3,6 @@
|
|||
"version": "1.0.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "sell",
|
||||
|
|
|
@ -76,3 +76,11 @@ export const UploadPerson = (json) => axios({
|
|||
method: 'post',
|
||||
data: json
|
||||
})
|
||||
|
||||
|
||||
// 编辑用户
|
||||
export const UpdatePerosn = (id,json) => axios({
|
||||
url: '/Person/UpdatePerosn/'+id,
|
||||
method: 'put',
|
||||
data: json
|
||||
})
|
|
@ -1,7 +1,6 @@
|
|||
<template lang="html">
|
||||
<div class="product">
|
||||
<div
|
||||
style="
|
||||
<div style="
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin: auto;
|
||||
|
@ -9,39 +8,22 @@
|
|||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
|
||||
"
|
||||
>
|
||||
">
|
||||
<div style="display: flex; width: 60%; flex-wrap: wrap">
|
||||
<el-select v-model="roles" multiple placeholder="请选择" style="width: 30%;">
|
||||
<el-option
|
||||
v-for="item in roleList"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item">
|
||||
<el-option v-for="item in roleList" :key="item" :label="item" :value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button style="margin-left: 10px;" type="primary" @click="search">查询</el-button>
|
||||
</div>
|
||||
|
||||
<div style="flex: 1">
|
||||
<el-button
|
||||
style="float: right;"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="add"
|
||||
>添加人员</el-button
|
||||
>
|
||||
<el-button style="float: right;" type="primary" icon="el-icon-plus" @click="add">添加人员</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<div class="stu-table">
|
||||
<el-table
|
||||
:data="list"
|
||||
v-loading="loading"
|
||||
stripe
|
||||
:header-cell-style="getRowClass"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table :data="list" v-loading="loading" stripe :header-cell-style="getRowClass" style="width: 100%">
|
||||
|
||||
<el-table-column prop="fj_Num" align="center" label="户号" :min-width="flexWidth('fj_Num', list, '户号')">
|
||||
</el-table-column>
|
||||
|
@ -51,20 +33,36 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="role" align="center" label="角色" :min-width="flexWidth('role', list, '角色')">
|
||||
</el-table-column>
|
||||
<el-table-column prop="isRegister" align="center" label="是否已注册"
|
||||
:min-width="flexWidth('isRegister', list, '是否已注册')">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<el-tag type="success" size="medium" v-if="scope.row.isRegister">已注册</el-tag>
|
||||
<el-tag type="warning" size="medium" v-if="!scope.row.isRegister">未注册</el-tag>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="370" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" plain icon="el-icon-s-tools"
|
||||
@click.native.stop="edit(scope.row)">编辑</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<el-dialog title="添加人员" :visible.sync="dialogFormVisible" width="30%" :close-on-click-modal="false">
|
||||
<el-dialog title="添加/编辑人员" :visible.sync="dialogFormVisible" width="30%" :close-on-click-modal="false">
|
||||
<el-form :model="form" :rules="rules" ref="ruleForm">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phoneNum">
|
||||
<el-input type="text" v-model="form.phoneNum" placeholder="请输入手机号" ></el-input>
|
||||
<el-input type="text" v-model="form.phoneNum" :disabled="form.isRegister" placeholder="请输入手机号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="房号" prop="fjNum">
|
||||
<el-select v-model="form.fjNum" placeholder="请选择房号" style="width: 100%;">
|
||||
|
@ -85,12 +83,13 @@
|
|||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import { AddPerson,GetPersons } from "../../../api/index.js";
|
||||
import { AddPerson, GetPersons, UpdatePerosn } from "../../../api/index.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -108,6 +107,8 @@
|
|||
phoneNum: "",
|
||||
fjNum: "",
|
||||
role: "",
|
||||
personId: "",
|
||||
isRegister: false,
|
||||
},
|
||||
rules: {
|
||||
name: [
|
||||
|
@ -140,12 +141,18 @@
|
|||
this.getFj();
|
||||
},
|
||||
methods: {
|
||||
edit(row) {
|
||||
this.form = { name: row.name, phoneNum: row.phone, fjNum: row.fj_Num, role: row.role, personId: row.id, isRegister: row.isRegister };
|
||||
this.dialogFormVisible = true;
|
||||
},
|
||||
add() {
|
||||
this.form = {
|
||||
name: "",
|
||||
phoneNum: "",
|
||||
fjNum: "",
|
||||
role: "",
|
||||
personId: "",
|
||||
isRegister: false,
|
||||
};
|
||||
this.dialogFormVisible = true;
|
||||
},
|
||||
|
@ -177,7 +184,9 @@
|
|||
str += "&roles=" + e
|
||||
}
|
||||
});
|
||||
GetPersons(str).then((res) => {
|
||||
axios
|
||||
.get(this.url + "/Person/GetPersons" + str,)
|
||||
.then((res) => {
|
||||
let result = res.data;
|
||||
if (result.code == 0) {
|
||||
this.list = result.data;
|
||||
|
@ -185,6 +194,8 @@
|
|||
this.$message.error(result.msg);
|
||||
}
|
||||
})
|
||||
.catch((error) => { });
|
||||
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.personIdList = val.map(e => e.id);
|
||||
|
@ -200,7 +211,22 @@
|
|||
submit() {
|
||||
this.$refs['ruleForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
const reg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
|
||||
|
||||
if (this.form.personId) {
|
||||
console.log(this.form)
|
||||
UpdatePerosn(this.form.personId, this.form).then((res) => {
|
||||
let result = res.data;
|
||||
if (result.code == 0) {
|
||||
this.getPerons();
|
||||
this.dialogFormVisible = false;
|
||||
this.$message.success('更新成功');
|
||||
} else {
|
||||
this.$message.error(result.msg);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log(this.form)
|
||||
const reg = /^1[3|4|5|6|7|8|9][0-9]git pull\d{8}$/;
|
||||
if (!reg.test(this.form.phoneNum)) {
|
||||
this.$toast.fail("请输入正确的手机号码");
|
||||
return;
|
||||
|
@ -215,6 +241,8 @@
|
|||
this.$message.error(result.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
|
@ -230,43 +258,51 @@ input::-webkit-inner-spin-button{
|
|||
-webkit-appearance: none !important;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.product {
|
||||
width: 96%;
|
||||
height: auto;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.el-form-item__content {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.search {
|
||||
line-height: 60px;
|
||||
text-align: left;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.select-class {
|
||||
line-height: 40px;
|
||||
text-align: left;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.stu-table .btn {
|
||||
width: 65px;
|
||||
height: 25px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.el-table tr {
|
||||
background: #081832;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
|
||||
background: rgb(36, 148, 215);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.el-table__body tr.current-row>td.el-table__cell {
|
||||
background: rgb(4, 75, 137);
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
</el-table>
|
||||
</div>
|
||||
<el-dialog title="已注册公众号人员" :visible.sync="dialogTableVisible">
|
||||
<el-dialog title="已注册且未提交问卷的公众号人员" :visible.sync="dialogTableVisible">
|
||||
<div style="width:100%;height:60px;display: flex;align-items: center;">
|
||||
<el-select v-model="roles" multiple placeholder="请选择" style="width: 30%;" @change="roleChange">
|
||||
<el-option v-for="item in roleList" :key="item" :label="item" :value="item">
|
||||
|
@ -66,7 +66,7 @@
|
|||
<el-table :data="gridData" ref="multipleTable" tooltip-effect="dark" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column prop="name" label="姓名"></el-table-column>
|
||||
<el-table-column prop="telphone" label="联系方式"></el-table-column>
|
||||
<el-table-column prop="phone" label="联系方式"></el-table-column>
|
||||
<el-table-column prop="role" label="角色"></el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
@ -123,7 +123,7 @@
|
|||
</el-dialog>
|
||||
<el-dialog title="投票明细" :visible.sync="dialogTpTableVisible" width="80%" :close-on-click-modal="false">
|
||||
<table-view ref="table" :datalist="tpmxList" :page="{}" :key="loadTable" width="100%"
|
||||
:propList="[{label:'房号',prop:'fj_Num'},{label:'姓名',prop:'name'},{label:'角色',prop:'role'},{label:'读取/提交时间',prop:'time'}]" :slots="[]"
|
||||
:propList="propList" :slots="[]"
|
||||
:isPage="false">
|
||||
|
||||
|
||||
|
@ -140,6 +140,7 @@
|
|||
data() {
|
||||
return {
|
||||
loadTable: 0,
|
||||
propList:[],
|
||||
option: {
|
||||
title: {
|
||||
text: 'Referer of a Website',
|
||||
|
@ -250,7 +251,14 @@
|
|||
methods: {
|
||||
getTpMx(type) {
|
||||
this.submitState = true;
|
||||
console.log(111)
|
||||
if(type=='已读'){
|
||||
this.propList = [{label:'房号',prop:'fj_Num'},{label:'姓名',prop:'name'},{label:'角色',prop:'role'},{label:'读取时间',prop:'readTime'}];
|
||||
}
|
||||
else if(type=='已提交'){
|
||||
this.propList = [{label:'房号',prop:'fj_Num'},{label:'姓名',prop:'name'},{label:'角色',prop:'role'},{label:'提交时间',prop:'fillInTime'}];
|
||||
} else{
|
||||
this.propList = [{label:'房号',prop:'fj_Num'},{label:'姓名',prop:'name'},{label:'角色',prop:'role'}];
|
||||
}
|
||||
axios
|
||||
.get(this.url + "/Questionnaire/GetQuestionnaireSendTotalDetail/" + this.templateId, {params:{type:type}})
|
||||
.then((res) => {
|
||||
|
@ -272,14 +280,10 @@
|
|||
getPerons() {
|
||||
let str = "";
|
||||
this.roles.forEach((e, i) => {
|
||||
if (i == 0) {
|
||||
str += "?roles=" + e
|
||||
} else {
|
||||
str += "&roles=" + e
|
||||
}
|
||||
});
|
||||
axios
|
||||
.get(this.url + "/Person/GetPersons" + str,)
|
||||
.get(this.url + "/Person/GetPersons?isRegister=true&isFillIn=false&questionnaireId="+this.templateId+str,)
|
||||
.then((res) => {
|
||||
let result = res.data;
|
||||
if (result.code == 0) {
|
||||
|
|
Loading…
Reference in New Issue