56be8dce325cd0ce6d6bd3f36d571c10f2532fef.svn-base 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">信息填报</p>
  7. <el-form :model="formObj" :label-width="formLabelWidth" :rules="rules">
  8. <el-form-item label="是否安装最小生态下泄流量监控设施" :required="true">
  9. <el-radio v-model="formObj.isBuldMnt" label="1">是</el-radio>
  10. <el-radio v-model="formObj.isBuldMnt" label="2">否</el-radio>
  11. <el-button
  12. @click="addProblem('isBuldMnt',formObj.isBuldMnt)"
  13. type="text"
  14. v-if="formObj.isBuldMnt =='2'">
  15. <i class="el-icon-circle-plus add-problem-icon"></i>
  16. </el-button>
  17. </el-form-item>
  18. <el-form-item label="已安装的最小生态下泄流量监控设施是否接入环保部门在线监控平台" :required="true" v-if="formObj.isBuldMnt=='1'">
  19. <el-radio v-model="formObj.isBuldInSys" label="1">是</el-radio>
  20. <el-radio v-model="formObj.isBuldInSys" label="2">否</el-radio>
  21. <el-button
  22. @click="addProblem('isBuldInSys',formObj.isBuldInSys)"
  23. type="text"
  24. v-if="formObj.isBuldInSys =='2'">
  25. <i class="el-icon-circle-plus add-problem-icon"></i>
  26. </el-button>
  27. </el-form-item>
  28. <el-form-item label="是否落实最小生态下泄流量" :required="true">
  29. <el-radio v-model="formObj.isEnsuQ" label="1">是</el-radio>
  30. <el-radio v-model="formObj.isEnsuQ" label="2">否</el-radio>
  31. <el-button
  32. @click="addProblem('isEnsuQ',formObj.isEnsuQ)"
  33. type="text"
  34. v-if="formObj.isEnsuQ =='2'">
  35. <i class="el-icon-circle-plus add-problem-icon"></i>
  36. </el-button>
  37. </el-form-item>
  38. <el-form-item label="">
  39. <el-button type="primary" @click="addHandler" v-if="openType">保 存</el-button>
  40. </el-form-item>
  41. </el-form>
  42. </el-main>
  43. <problem-dialog
  44. v-if="showAddProblemDialog && openType"
  45. :objType="57"
  46. :villType="57"
  47. :objId="currentObjectId"
  48. :objName="currentObjectName"
  49. :problemMiddleType="'取水许可管理复核'"
  50. :problData="probId"
  51. @closeDialog="closePlDialog"
  52. :currentObjectRgstrId="currentObjectRgstrId"
  53. ></problem-dialog>
  54. </el-container>
  55. </div>
  56. </template>
  57. <script>
  58. import inputWith from "@widget/inuptWith.vue"
  59. import problemDialog from "../../duChaWenTi/problemDialog.vue";
  60. import request from "@util/gw_ajax_request.js"
  61. import {getRgstridWtgthDrain} from "@api/duChaTianBao.js"
  62. import {formatDateTimeD} from "@util/gw_date.js"
  63. export default {
  64. components: {
  65. inputWith: inputWith,
  66. problemDialog
  67. },
  68. props: ['currentObjectId','currentObjectName','currentObjectRgstrId','openType'],
  69. data() {
  70. var checkTel = (rule, value, callback) => {
  71. var isPhone = /^([0-9]{3,4}-)?[0-9]{7,8}$/;//座机
  72. var isMob= /^[1][3,4,5,7,8][0-9]{9}$/;// 座机格式
  73. if (value&&!isMob.test(value)&&!isPhone.test(value)) {
  74. callback(new Error('请输入合理电话'));
  75. } else if(value&&(isMob.test(value)||isPhone.test(value))){
  76. callback();
  77. }
  78. // setTimeout(() => {
  79. // }, 1000);
  80. };
  81. return {
  82. id:"",
  83. objtbStatu:{
  84. drainState:"",
  85. rgstrId:"",
  86. id:"",
  87. state:""
  88. },
  89. rules:{
  90. wiunWaoLegPersTel:[
  91. { validator: checkTel,trigger: 'blur' }
  92. ],
  93. techPersTel:[
  94. { validator: checkTel,trigger: 'blur' }
  95. ],
  96. patrolPersTel:[
  97. { validator: checkTel,trigger: 'blur' }
  98. ],
  99. },
  100. jqmmDialogShow: false,
  101. type: '',
  102. formObj: {
  103. "isBuldMnt":'',
  104. "isBuldInSys":'',
  105. "isEnsuQ":''
  106. },
  107. dialogFormVisible: false,
  108. formLabelWidth: '180px',
  109. loading: true,
  110. operationType1:'',
  111. rsvrRules: null,
  112. probId: '',
  113. showAddProblemDialog: false
  114. }
  115. },
  116. computed:{
  117. recPersId(){
  118. return localStorage.getItem("userid")? localStorage.getItem("userid"): ''
  119. }
  120. },
  121. created(){
  122. this.findItemByType()
  123. },
  124. mounted() {
  125. this.getRgstridObj();
  126. },
  127. watch: {
  128. currentObjectRgstrId(n,o){
  129. this.getRgstridObj();
  130. },
  131. },
  132. methods: {
  133. jqmmDialogClose() {
  134. this.jqmmDialogShow = false;
  135. },
  136. showPic(type){
  137. this.type = type
  138. this.jqmmDialogShow = true
  139. },
  140. getRgstridObj(){
  141. var _self = this;
  142. getRgstridWtgthDrain(_self.currentObjectRgstrId).then((res)=>{
  143. _self.formObj = res.data;
  144. _self.id = res.data.id;
  145. });
  146. },
  147. addHandler(){
  148. var _self = this;
  149. _self.formObj['rgstrId'] = _self.currentObjectRgstrId;
  150. _self.formObj['recPersId'] = _self.recPersId;
  151. _self.objtbStatu.rgstrId = _self.currentObjectRgstrId;
  152. _self.objtbStatu.id = _self.currentObjectRgstrId;
  153. if(this.formObj.isBuldMnt!=null &&
  154. this.formObj.isEnsuQ!=null){
  155. this.objtbStatu.drainState = "2"
  156. this.objtbStatu.state = "1"
  157. }else if(this.formObj.isBuldMnt==null &&
  158. this.formObj.isEnsuQ==null){
  159. this.objtbStatu.drainState = "0"
  160. this.formObj['state'] = "0";
  161. }else{
  162. this.objtbStatu.drainState = "1"
  163. this.objtbStatu.state = "1"
  164. }
  165. this.$confirm('确认保存现场督查情况信息?', '提示', {
  166. confirmButtonText: '确定',
  167. cancelButtonText: '取消',
  168. type: 'warning'
  169. })
  170. .then(() => {
  171. try{
  172. request.post('/bis/insp/wtgth/drain',_self.formObj).then((res)=>{
  173. if (res.success) {
  174. _self.$message.success("修改成功");
  175. request.post("/bis/insp/wtgth",_self.objtbStatu).then((res)=>{
  176. res;
  177. })
  178. _self.$emit("addShuiKuSuccess");
  179. }
  180. });
  181. } catch(e) {
  182. }
  183. })
  184. .catch(() => {
  185. });
  186. },
  187. cancelHandler(){
  188. this.$emit('cancelHandler');
  189. },
  190. findItemByType(){
  191. const obj ={
  192. tname: "BIS_INSP_WTGTH_RGSTR_DRAIN",
  193. }
  194. request.post("/bis/insp/item/ques/info/findItemByType",obj).then(res =>{
  195. this.rsvrRules = res.data;
  196. })
  197. },
  198. addProblem(item,iValue){
  199. let rest = this.rsvrRules.filter(e => {
  200. return e.iValue === iValue && e.eName === item;
  201. });
  202. if (rest[0]){
  203. this.probId = rest[0].id;
  204. }
  205. this.showAddProblemDialog = true;
  206. },
  207. formatRadio(val){
  208. if(val == '1'){
  209. return '是'
  210. }else if(val == '2'){
  211. return '否'
  212. }else{
  213. return val
  214. }
  215. },
  216. closePlDialog(val) {
  217. this.showAddProblemDialog = false;
  218. }
  219. },
  220. }
  221. </script>
  222. <style scoped>
  223. #dcdxHeader {
  224. padding: 15px 20px;
  225. }
  226. #dxdcFooter {
  227. text-align: center;
  228. }
  229. #dxdcAside {
  230. border:1px solid #d5d5ff;
  231. }
  232. .el-dialog__wrapper .el-treeWhite{
  233. /* max-height: 260px !important; */
  234. }
  235. .add-problem-icon{
  236. font-size: 16px;
  237. }
  238. .el-icon-camera-solid,.el-icon-circle-plus{
  239. margin-left: 20px;
  240. color: #00bbff;
  241. font-size: 18px;
  242. line-height: 12px;
  243. vertical-align: middle;
  244. cursor: pointer;
  245. }
  246. .el-icon-circle-plus{
  247. vertical-align: top;
  248. }
  249. </style>