8288920aea333ee2b444c06dff34fd51fe082e1c.svn-base 10 KB

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