| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- <template>
- <div id="zfqkContainer">
- <el-container :style="{'height':this.testHeight+'px'}" >
- <el-main style="border:1px solid #d5d5ff;margin-left:5px;padding:0px;overflow-x: hidden;">
- <el-table :data="tableData" :height="testHeight1" style="width: 100%" >
- <el-table-column prop="viewPreName" label="走访人姓名" min-width="100" align="center"></el-table-column>
- <el-table-column prop="knowResManager" label="是否知晓水库管护员" min-width="150" align="center">
- <template slot-scope="scope">
- <span style="font-weight:bolder;color:#67C23A" v-if="scope.row.knowResManager == 1">是</span>
- <span style="font-weight:bolder;color:#F56C6C" v-if="scope.row.knowResManager == 0">否</span>
- </template>
- </el-table-column>
- <el-table-column prop="managerComment" label="对管护责任人评价" min-width="150" align="center">
- <template slot-scope="scope">
- <span
- style="font-weight:bolder;color:#F56C6C"
- v-if="scope.row.managerComment == 3"
- >不满意</span>
- <span style="font-weight:bolder;color:#E6A23C" v-if="scope.row.managerComment == 2">一般</span>
- <span style="font-weight:bolder;color:#67C23A" v-if="scope.row.managerComment == 1">满意</span>
- </template>
- </el-table-column>
- <el-table-column prop="note" label="备注" :show-overflow-tooltip="true" min-width="170"></el-table-column>
- <!-- <el-table-column align="center" show-overflow-tooltip label="操作" min-width="160" fixed="right">
- <template slot-scope="scope">
- <el-button type="success" plain @click="manageItem(scope.row)">编辑</el-button>
- <el-button type="danger" plain @click="deleteItem(scope.row)">删除</el-button>
- </template>
- </el-table-column>-->
- </el-table>
- </el-main>
- <span slot="footer" class="dialog-footer" style="justify-content: flex-end;display: flex;">
- <!-- <el-button @click="cancelHandler">取 消</el-button> -->
- </span>
- </el-container>
- <el-dialog :title="'行政村填报'" :visible.sync="dialogFormVisible" :modal="false">
- <el-container style="height:520px;">
- <el-main style="border:1px solid #d5d5ff;margin-left:5px;padding:0px;">
- <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">信息填报</p>
- <el-form :model="formObj" label-width="120px" status-icon>
- <p style="margin-top:10px;margin-bottom: 10px">
- <i class="el-icon-caret-right"></i>
- <span style="width:120px;padding-left: 10px">行政村基本信息</span>
- <span class="hrs"></span>
- </p>
- <el-form-item label="走访人员名称">
- <!-- <el-input v-model="formObj.adNm" autocomplete="off" style="width:70%;"></el-input> -->
- <el-input v-model.number="formObj.viewPreName" style="width:70%;"></el-input>
- </el-form-item>
- <p style="margin-top:10px;margin-bottom: 10px">
- <i class="el-icon-caret-right"></i>
- <span style="width:120px;padding-left: 10px">行政村调研信息</span>
- <span class="hrs"></span>
- </p>
- <el-form-item label="是否知晓水库管护人员">
- <el-radio v-model="formObj.knowResManager" label="1">是</el-radio>
- <el-radio v-model="formObj.knowResManager" label="0">否</el-radio>
- </el-form-item>
- <el-form-item label="对管护责任人的评价">
- <el-radio v-model="formObj.managerComment" label="1">满意</el-radio>
- <el-radio v-model="formObj.managerComment" label="2">一般</el-radio>
- <el-radio v-model="formObj.managerComment" label="3">不满意</el-radio>
- </el-form-item>
- <el-form-item label="备注">
- <el-input v-model="formObj.note" type="textarea" :rows="2"></el-input>
- </el-form-item>
- <el-form-item label="操作">
- <el-button @click="dialogFormVisible = false">取 消</el-button>
- <el-button type="primary" @click="addSkZouFangSubmit">确 定</el-button>
- </el-form-item>
- </el-form>
- </el-main>
- </el-container>
- </el-dialog>
- </div>
- </template>
- <script>
- import request from "../../../../../utils/gw_ajax_request.js";
- import {
- getskZouFangByrgstrId,
- getSkZouFangViewId,
- addZouFangRenYuanList_sk,
- updateZouFangRenYuanList_sk,
- getZouFangrenYuanListByViewId
- } from "../../../../../api/duChaTianBao.js";
- import { formatDateTimeD } from "../../../../../utils/gw_date.js";
- export default {
- components: {},
- props: ["currentObjectRgstrId"],
- data() {
- return {
- tableData: [],
- testHeight: window.innerHeight * 0.5,
- testHeight1: window.innerHeight * 0.5 - 2,
- dialogFormVisible: false,
- viewId: "",
- formObj: {
- viewPreName: "",
- knowResManager: "",
- managerComment: "",
- note: "",
- viewId: ""
- }
- };
- },
- computed: {
- recPersId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "";
- }
- },
- mounted() {
- this.getZouFangCun();
- },
- watch: {
- currentObjectRgstrId(n, o) {
- this.getZouFangCun();
- }
- },
- methods: {
- addHandler: function() {
- this.dialogFormVisible = true;
- },
- addZouFang: function() {
- this.dialogFormVisible = false;
- },
- getZouFangCun: function() {
- getskZouFangByrgstrId(this.currentObjectRgstrId).then(
- res => {
- if (res.data && res.success) {
- this.viewId = res.data.viewId;
- this.getRenYuanListData();
- } else {
- console.log("未创建走访表,创建走访表");
- this.getSkZouFangViewId();
- }
- },
- err => {}
- );
- },
- getRenYuanListData: function() {
- getZouFangrenYuanListByViewId(this.viewId).then(
- res => {
- console.log(res);
- this.tableData = res.data.list;
- },
- err => {}
- );
- },
- getSkZouFangViewId: function() {
- getSkZouFangViewId(this.recPersId, this.currentObjectRgstrId).then(
- res => {
- console.log(res);
- if (res.data && res.success) {
- this.viewId = res.data.viewId;
- } else {
- }
- },
- err => {}
- );
- },
- addSkZouFangSubmit: function() {
- let updateArray = this.tableData;
- this.formObj["viewId"] = this.viewId;
- updateArray.push(this.formObj);
- updateZouFangRenYuanList_sk(
- updateArray,
- this.viewId,
- this.currentObjectRgstrId
- ).then(res => {
- console.log(res);
- this.getRenYuanListData();
- this.dialogFormVisible = false;
- });
- },
- manageItem: function(row) {
- let updateArray = [];
- this.tableData.forEach((element, index) => {
- if (element.viewPreName != row.viewPreName) {
- updateArray.push(element);
- }
- });
- this.formObj = row;
- this.dialogFormVisible = true;
- this.tableData = updateArray;
- },
- deleteItem: function(row) {
- let updateArray = [];
- this.tableData.forEach((element, index) => {
- if (element.viewPreName != row.viewPreName) {
- updateArray.push(element);
- }
- });
- updateZouFangRenYuanList_sk(
- updateArray,
- this.viewId,
- this.currentObjectRgstrId
- ).then(res => {
- console.log(res);
- this.getRenYuanListData();
- });
- }
- }
- };
- </script>
- <style>
- </style>
|