| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- <template>
- <div class="jcsjzl" style="width: 100%;margin: auto">
- <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>
- <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>
- <div style="text-align:center;">
- <!-- <p>检查人员评价</p> -->
- <el-input type="textarea" :rows="12" v-model="checkComment" placeholder="请输入评价内容" style="width:80%;padding-top:30px;"></el-input>
- </div>
- <el-button type="primary" style="margin-left:10%;margin-top:20px" @click="addMember">保 存</el-button>
- </el-main>
- </el-container>
- <!-- <span slot="footer" class="dialog-footer" style="justify-content: flex-end;display: flex;">
- <el-button @click="cancelHandler">取 消</el-button>
- <el-button type="primary" @click="addMember">确 定</el-button>
- </span> -->
- </div>
- </template>
- <script>
- import request from "../../../utils/gw_ajax_request.js";
- import { getBaseExt } from "../../../api/duChaTianBao.js";
- export default {
- props: ["currentObjectRgstrId", "currentObjectName", "currentObjectId",'currentGrwCode'],
- components: {
-
- },
- data() {
- return {
- checkComment:'',
- operationType1: "",
- dialogShow: false
- };
- },
- computed: {
- recPersId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- }
- },
- mounted() {
- this.getRgstridObj();
- },
- watch: {
- currentGrwCode(n, o) {
- this.getRgstridObj();
- }
- },
- methods: {
- closeDialog() {
- this.dialogShow = false;
- },
- getRgstridObj() {
- request.get(`/dc/insp/grw/getCkComment?id=${this.currentObjectRgstrId}`).then(res => {
- if (res.data) {
- this.checkComment = res.data.checkComment;
- this.operationType1 = "update";
- console.log(this.addObj);
- } else {
- this.addObj = {};
- this.operationType1 = "add";
- }
- });
- },
- addMember() {
- let addObj = {};
- addObj["checkComment"] = this.checkComment;
- addObj["id"] = this.currentObjectRgstrId;
- addObj["checkPid"] = this.recPersId;
- addObj['checkPname'] = this.recPersName;
-
- if (this.operationType1 == "add") {
- request
- .post("/dc/insp/grw/updateCkComment", addObj)
- .then(res => {
- if (res.success) {
- this.$message({
- type: "success",
- message: "添加成功!"
- });
- this.$emit("addShuiKuSuccess");
- } else {
- this.$message.error(res.message);
- }
- })
- .catch(err => {
- this.$message.error(res.message);
- });
- } else {
- request.post("/dc/insp/grw/updateCkComment", addObj).then(res => {
- if (res.success) {
- this.$message({
- type: "success",
- message: "修改成功!"
- });
- this.$emit("addShuiKuSuccess");
- } else {
- this.$message.error(res.message);
- }
- })
- .catch(err => {
- this.$message.error(res.message);
- });
- }
- },
- cancelHandler() {
- this.$emit("cancelHandler");
- }
- }
- };
- </script>
- <style>
- </style>
|