| | |
| | | </el-row> |
| | | </div> |
| | | |
| | | <el-table v-loading="loading" :data="listRoot" @selection-change="handleSelectionChange" @row-click="handleCheck" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;"> |
| | | <el-table v-loading="loading" :data="listRoot" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;"> |
| | | <el-table-column type="selection" width="25" align="center" /> |
| | | <el-table-column label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80"/> |
| | | |
| | |
| | | <el-table-column label="所在单位" prop="unit" sortable width="150" align="center" > |
| | | <template slot-scope="scope">{{scope.row.unit? scope.row.unit: '————'}}</template> |
| | | </el-table-column> |
| | | <el-table-column label="配偶" prop="userId" sortable width="110" align="center" > |
| | | <template slot-scope="scope">{{scope.row.phoneNumber? scope.row.phoneNumber: '————'}}</template> |
| | | <el-table-column label="配偶" prop="spouseId" sortable width="110" align="center" > |
| | | <template slot-scope="scope"><span>{{getPerson(scope.row.spouseId)}}</span></template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope" v-if="scope.row.roleId !== 1"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:role:edit']" |
| | | >修改</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:role:remove']" |
| | | >删除</el-button> |
| | | |
| | | |
| | | <el-button |
| | | size="mini" |
| | |
| | | icon="el-icon-d-arrow-right" |
| | | @click="handleCheck(scope.row)"> |
| | | 查看详情</el-button> |
| | | |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | v-show="total" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | |
| | | |
| | | //导入接口函数 |
| | | import {enload, uploadPic} from "@/api/contacts/index"; |
| | | import {getRoot} from "@/api/root/index"; |
| | | import {getRoot,listUserAll} from "@/api/root/index"; |
| | | export default { |
| | | name: "index", |
| | | dicts: ['sys_normal_disable'], |
| | |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | //拿到配偶的姓名 |
| | | getPerson(id) |
| | | { |
| | | // alert(id) |
| | | // alert(typeof(id)) |
| | | // this.listRoot.forEach(function(item, index) { |
| | | // //item 就是当日按循环到的对象 |
| | | // //index是循环的索引,从0开始 |
| | | // //alert(typeof(item.userId)) |
| | | // if(item.userId==id){ |
| | | // // alert(89) |
| | | // alert(item.nickName) |
| | | // return item.nickName |
| | | // } |
| | | |
| | | // }) |
| | | let username = "" |
| | | for(let i = 0; i < this.listRoot.length;i++) |
| | | { |
| | | if(this.listRoot[i].userId==id) |
| | | username = this.listRoot[i].nickName |
| | | } |
| | | return username; |
| | | // return "12ddd" |
| | | }, |
| | | //隔行变色 |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if (rowIndex % 2 == 0) { |
| | |
| | | getList() { |
| | | this.loading = true; |
| | | // console.log(this.queryParams) |
| | | //alert(23) |
| | | |
| | | // listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => { |
| | | getRoot(this.queryParams).then(response => { |
| | | listUserAll(this.queryParams).then(response => { |
| | | // alert(123) |
| | | // console.log(response.data) |
| | | this.listRoot = response.data.data; |
| | | this.total = response.data.total; |
| | | // alert(76) |
| | | this.listRoot = response.data; |
| | | // alert(this.listRoot) |
| | | this.total = response.data.length; |
| | | // alert(this.total) |
| | | this.loading = false; |
| | | } |
| | | ); |
| | |
| | | // }, |
| | | |
| | | |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "添加通讯录详细信息"; |
| | | }, |
| | | |
| | | /** 查看详细信息 */ |
| | | handleCheck(row){ |
| | | const id = row.id; |
| | | this.$router.push("/familymodel/Contact/contactsInfo/" + id); |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | const id = row.id; |
| | | let jd = true |
| | | |
| | | this.$router.push({ |
| | | path:"/familymodel/Contact/contactsInfo/" + id, |
| | | query:{ |
| | | detail:jd |
| | | } |
| | | }); |
| | | const id = row.userId; |
| | | alert(id) |
| | | this.$router.push("/familymodel/jiagenwang/getPInfo/" + id); |
| | | }, |
| | | |
| | | |