13d4c83bb5c27ff187fc87b31f7ad796b1c9b03a.svn-base 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. <template>
  2. <div>
  3. <!-- <el-dialog :title="'责任人填报'" :visible.sync="dialogFormVisible"> -->
  4. <el-container style="height:520px;">
  5. <el-main style="border:1px solid #d5d5ff;margin-left:5px;padding:0px;">
  6. <el-form :model="formObj" :label-width="formLabelWidth" :rules="rules">
  7. <p style="margin-top:10px;margin-bottom: 10px">
  8. <i class="el-icon-caret-right"></i>
  9. <span style="width:120px;padding-left: 10px">水源保护</span>
  10. <span class="hrs"></span>
  11. </p>
  12. <el-form-item label="供水工程饮用水水源是否划定水源保护区/保护范围" :required="true">
  13. <el-radio v-model="formObj.isSureRange" label="1">是</el-radio>
  14. <el-radio v-model="formObj.isSureRange" label="2">否</el-radio>
  15. <el-button
  16. @click="addProblem('isSureRange',formObj.isSureRange)"
  17. type="text"
  18. v-if="formObj.isSureRange =='2'">
  19. <i class="el-icon-circle-plus add-problem-icon"></i>
  20. </el-button>
  21. </el-form-item>
  22. <el-form-item label="供水工程水源保护区/保护范围是否设立标志牌和保护措施" :required="true">
  23. <el-radio v-model="formObj.isSetLog" label="1">是</el-radio>
  24. <el-radio v-model="formObj.isSetLog" label="2">否</el-radio>
  25. <el-button
  26. @click="addProblem('isSetLog',formObj.isSetLog)"
  27. type="text"
  28. v-if="formObj.isSetLog =='2'">
  29. <i class="el-icon-circle-plus add-problem-icon"></i>
  30. </el-button>
  31. </el-form-item>
  32. <el-form-item label="供水工程水源保护区/保护范围内是否有排污口,或向水体排放、倾倒有毒有害工业废渣、垃圾或其他废弃物" :required="true">
  33. <el-radio v-model="formObj.isSetOut" label="1">是</el-radio>
  34. <el-radio v-model="formObj.isSetOut" label="2">否</el-radio>
  35. <el-button
  36. @click="addProblem('isSetOut',formObj.isSetOut)"
  37. type="text"
  38. v-if="formObj.isSetOut =='2'">
  39. <i class="el-icon-circle-plus add-problem-icon"></i>
  40. </el-button>
  41. </el-form-item>
  42. <p style="margin-top:10px;margin-bottom: 10px">
  43. <i class="el-icon-caret-right"></i>
  44. <span style="width:120px;padding-left: 10px">水源管理</span>
  45. <span class="hrs"></span>
  46. </p>
  47. <el-form-item label="管理单位是否定期开展水源巡查和记录" :required="true">
  48. <el-radio v-model="formObj.isPatrol" label="1">是</el-radio>
  49. <el-radio v-model="formObj.isPatrol" label="2">否</el-radio>
  50. <el-button
  51. @click="addProblem('isPatrol',formObj.isPatrol)"
  52. type="text"
  53. v-if="formObj.isPatrol =='2'">
  54. <i class="el-icon-circle-plus add-problem-icon"></i>
  55. </el-button>
  56. </el-form-item>
  57. <el-form-item label="管理单位是否及时处理巡查发现问题" :required="true">
  58. <el-radio v-model="formObj.isFindPblm" label="1">是</el-radio>
  59. <el-radio v-model="formObj.isFindPblm" label="2">否</el-radio>
  60. <el-button
  61. @click="addProblem('isFindPblm',formObj.isFindPblm)"
  62. type="text"
  63. v-if="formObj.isFindPblm =='2'">
  64. <i class="el-icon-circle-plus add-problem-icon"></i>
  65. </el-button>
  66. </el-form-item>
  67. <el-form-item label="">
  68. <el-button type="primary" @click="addHandler" v-if="openType">保 存</el-button>
  69. </el-form-item>
  70. </el-form>
  71. </el-main>
  72. <problem-dialog
  73. v-if="showAddProblemDialog && openType"
  74. :objType="79"
  75. :villType="79"
  76. :flag="1"
  77. :objId="currentObjectId"
  78. :objName="currentObjectName"
  79. :currentUnitId="currentGcId"
  80. :currentUnitName="currentGcTitle"
  81. :problemMiddleType="'农村饮水安全暗访'"
  82. :problData="probId"
  83. @closeDialog="closePlDialog"
  84. :currentObjectRgstrId="currentObjectRgstrId"
  85. ></problem-dialog>
  86. <add-pic-com v-if="jqmmDialogShow" :dialogTitle="'相关材料'" :jqmmEngId="id" :type="type" :openType="openType" @jqmmDialogClose="jqmmDialogClose"></add-pic-com>
  87. </el-container>
  88. </div>
  89. </template>
  90. <script>
  91. import inputWith from "@widget/inuptWith.vue"
  92. import problemDialog from "../../duChaWenTi/problemDialog.vue";
  93. import addPicCom from "./addPic.vue"
  94. import request from "@util/gw_ajax_request.js"
  95. import {getRgstriyQqe} from "@api/duChaTianBao.js"
  96. import {formatDateTimeD} from "@util/gw_date.js"
  97. export default {
  98. components: {
  99. inputWith: inputWith,
  100. problemDialog,
  101. addPicCom
  102. },
  103. props: ['currentObjectId','currentObjectName','currentObjectRgstrId','openType','currentGcTitle','currentGcId'],
  104. data() {
  105. var checkTel = (rule, value, callback) => {
  106. var isPhone = /^([0-9]{3,4}-)?[0-9]{7,8}$/;//座机
  107. var isMob= /^[1][3,4,5,7,8][0-9]{9}$/;// 座机格式
  108. if (value&&!isMob.test(value)&&!isPhone.test(value)) {
  109. callback(new Error('请输入合理电话'));
  110. } else if(value&&(isMob.test(value)||isPhone.test(value))){
  111. callback();
  112. }
  113. // setTimeout(() => {
  114. // }, 1000);
  115. };
  116. return {
  117. id:"",
  118. objtbStatu:{
  119. wtuntStat:"",
  120. rgstrId:"",
  121. id:"",
  122. state:""
  123. },
  124. rules:{
  125. wiunWaoLegPersTel:[
  126. { validator: checkTel,trigger: 'blur' }
  127. ],
  128. techPersTel:[
  129. { validator: checkTel,trigger: 'blur' }
  130. ],
  131. patrolPersTel:[
  132. { validator: checkTel,trigger: 'blur' }
  133. ],
  134. },
  135. jqmmDialogShow: false,
  136. type: '',
  137. formObj: {
  138. isSureRange:"",
  139. isSetLog:"",
  140. isSetOut:"",
  141. isPatrol:"",
  142. isFindPblm:""
  143. },
  144. dialogFormVisible: false,
  145. formLabelWidth: '180px',
  146. loading: true,
  147. operationType1:'',
  148. rsvrRules: null,
  149. probId: '',
  150. showAddProblemDialog: false
  151. }
  152. },
  153. computed:{
  154. recPersId(){
  155. return localStorage.getItem("userid")? localStorage.getItem("userid"): ''
  156. }
  157. },
  158. created(){
  159. this.findItemByType()
  160. },
  161. mounted() {
  162. this.getRgstridObj();
  163. },
  164. watch: {
  165. currentObjectRgstrId(n,o){
  166. this.getRgstridObj();
  167. },
  168. },
  169. methods: {
  170. jqmmDialogClose() {
  171. this.jqmmDialogShow = false;
  172. },
  173. showPic(type){
  174. this.type = type
  175. this.jqmmDialogShow = true
  176. },
  177. getRgstridObj(){
  178. var _self = this;
  179. request.get("/bis/insp/villgd/wtsp/src/"+this.currentGcId).then(res => {
  180. if (res.success) {
  181. if (res.data) {
  182. _self.formObj = res.data;
  183. } else {
  184. _self.formObj = {};
  185. }
  186. }
  187. })
  188. },
  189. addHandler(){
  190. var _self = this;
  191. _self.formObj['rgstrId'] = _self.currentObjectRgstrId;
  192. _self.formObj['recPersId'] = _self.recPersId;
  193. if(this.formObj.isSureRange==null &&
  194. this.formObj.isSetLog==null &&
  195. this.formObj.isSetOut==null &&
  196. this.formObj.isPatrol==null &&
  197. this.formObj.isFindPblm==null
  198. ){
  199. this.formObj.state = "0"
  200. }else if(this.formObj.isSureRange!=null &&
  201. this.formObj.isSetLog!=null &&
  202. this.formObj.isSetOut!=null &&
  203. this.formObj.isPatrol!=null &&
  204. this.formObj.isFindPblm!=null
  205. ){
  206. this.formObj.state = "2";
  207. }else{
  208. this.formObj.state = "1"
  209. }
  210. this.$confirm('确认保存现场督查情况信息?', '提示', {
  211. confirmButtonText: '确定',
  212. cancelButtonText: '取消',
  213. type: 'warning'
  214. })
  215. .then(() => {
  216. try{
  217. request.post('/bis/insp/villgd/wtsp/src',_self.formObj).then((res)=>{
  218. if (res.success) {
  219. _self.$message.success("修改成功");
  220. _self.$emit("addShuiKuSuccess");
  221. }
  222. });
  223. } catch(e) {
  224. }
  225. })
  226. .catch(() => {
  227. });
  228. },
  229. cancelHandler(){
  230. this.$emit('cancelHandler');
  231. },
  232. findItemByType(){
  233. const obj ={
  234. tname: "BIS_INSP_VILLGD_WTSP_SRC",
  235. }
  236. request.post("/bis/insp/item/ques/info/findItemByType",obj).then(res =>{
  237. this.rsvrRules = res.data;
  238. })
  239. },
  240. addProblem(item,iValue){
  241. let rest = this.rsvrRules.filter(e => {
  242. return e.iValue === iValue && e.eName === item;
  243. });
  244. if (rest[0]){
  245. this.probId = rest[0].id;
  246. }
  247. this.showAddProblemDialog = true;
  248. },
  249. formatRadio(val){
  250. if(val == '1'){
  251. return '是'
  252. }else if(val == '2'){
  253. return '否'
  254. }else{
  255. return val
  256. }
  257. },
  258. closePlDialog(val) {
  259. this.showAddProblemDialog = false;
  260. }
  261. },
  262. }
  263. </script>
  264. <style scoped>
  265. #dcdxHeader {
  266. padding: 15px 20px;
  267. }
  268. #dxdcFooter {
  269. text-align: center;
  270. }
  271. #dxdcAside {
  272. border:1px solid #d5d5ff;
  273. }
  274. .el-dialog__wrapper .el-treeWhite{
  275. /* max-height: 260px !important; */
  276. }
  277. .add-problem-icon{
  278. font-size: 16px;
  279. }
  280. .el-icon-camera-solid,.el-icon-circle-plus{
  281. margin-left: 20px;
  282. color: #00bbff;
  283. font-size: 18px;
  284. line-height: 12px;
  285. vertical-align: middle;
  286. cursor: pointer;
  287. }
  288. .el-icon-circle-plus{
  289. vertical-align: top;
  290. }
  291. </style>