5ca2a3554f726dcfc5e94f82237b7243c125d61b.svn-base 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. <template>
  2. <div>
  3. <el-container>
  4. <el-main style="border:1px solid #d5d5ff;margin-left:5px;padding:0px;">
  5. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">信息填报</p>
  6. <el-form :model="formObj" :label-width="formLabelWidth">
  7. <p style="margin-top:10px;margin-bottom: 10px;overflow: hidden;"><i class="el-icon-caret-right"></i><span
  8. style="width:120px;padding-left: 10px">基本信息</span><span class="hrs"></span></p>
  9. <el-form-item label="所在位置">
  10. <el-input v-model="formObj.location" autocomplete="off" style="width:70%;"></el-input>
  11. </el-form-item>
  12. <el-form-item label="督查方式">
  13. <el-select v-model="formObj.chkMode" placeholder="请选择督查方式" style="width:20%">
  14. <el-option label="市州级督查" value="1"></el-option>
  15. <el-option label="省、市州级联合督查" value="2"></el-option>
  16. <el-option label="省级督查" value="3"></el-option>
  17. <el-option label="其他" value="4"></el-option>
  18. </el-select>
  19. </el-form-item>
  20. <el-form-item label="检查类别">
  21. <el-select v-model="formObj.chkType" placeholder="请选择检查类别" style="width:20%">
  22. <el-option label="小流域水土保持综合治理工程" value="1"></el-option>
  23. <el-option label="坡耕地水土流失综合治理工程" value="2"></el-option>
  24. </el-select>
  25. </el-form-item>
  26. <el-form-item label="现场检查时间">
  27. <el-date-picker
  28. v-model="formObj.chkTm"
  29. type="date"
  30. format="yyyy-MM-dd"
  31. placeholder="选择日期">
  32. </el-date-picker>
  33. </el-form-item>
  34. <el-form-item label="" style="text-align: center">
  35. <el-button type="primary" @click="addHandler" v-if="openType">保 存</el-button>
  36. </el-form-item>
  37. </el-form>
  38. </el-main>
  39. </el-container>
  40. <!--影像弹窗-->
  41. </div>
  42. </template>
  43. <script>
  44. import inputWith from "@widget/inuptWith.vue"
  45. import request from "@util/gw_ajax_request.js"
  46. import theRecentAppearance from '../../duChaDuiXiang/theRecentAppearance'
  47. import unlimitDatePicker from '@baseWidget/unLimitdatePicker.vue'
  48. import mapLocation from '../mapLocation'
  49. import {
  50. getrgstrIdObject_stbczdgc_state
  51. } from "@api/duChaTianBao.js"
  52. import {
  53. dateFormat
  54. } from "@util/gw_date.js"
  55. export default {
  56. components: {
  57. inputWith: inputWith,
  58. unlimitDatePicker: unlimitDatePicker,
  59. theRecentAppearance,
  60. mapLocation
  61. },
  62. props: ['id','currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName','openType'],
  63. data() {
  64. return {
  65. formObj: {
  66. location:"",
  67. chkMode:"",
  68. chkType:"",
  69. chkTm:""
  70. },
  71. dialogFormVisible: false,
  72. formLabelWidth: '160px',
  73. loading: true,
  74. operationType1: '',
  75. currentResCode1: '',
  76. currentObjectId1: '',
  77. value1: '',
  78. provList: [],
  79. cityList: [],
  80. countryList: [],
  81. provName: '',
  82. cityName: '',
  83. countryName: '',
  84. provNames: '',
  85. cityNames: '',
  86. countryNames: '',
  87. curSelectItem: 0,
  88. showLocSelect: false,
  89. locat: {
  90. location: "",
  91. admDiv: ""
  92. },
  93. xcztShow: false,
  94. imageShow: false,
  95. xcztEngId: '',
  96. centerX: 0,
  97. centerY: 0
  98. }
  99. },
  100. computed: {
  101. recPersId() {
  102. return localStorage.getItem("userid") ? localStorage.getItem("userid") : ''
  103. }
  104. },
  105. mounted() {
  106. this.currentResCode1 = this.currentResCode;
  107. this.currentObjectId1 = this.currentObjectId;
  108. this.getRgstridObj();
  109. this.getAreaList()
  110. },
  111. watch: {
  112. id(n, o) {
  113. this.getRgstridObj();
  114. },
  115. showLocSelect(val) {
  116. if (!val) {
  117. this.formObj.rvLoc = this.locat.location
  118. this.formObj.admDiv = this.locat.admDiv
  119. this.provName = ''
  120. this.cityName = ''
  121. this.countryName = ''
  122. }
  123. }
  124. },
  125. methods: {
  126. getRgstridObj() {
  127. var _self = this;
  128. getrgstrIdObject_stbczdgc_state(_self.currentObjectRgstrId).then(
  129. (res) => {
  130. if (res.data) {
  131. _self.formObj = res.data;
  132. } else {
  133. _self.formObj = {};
  134. }
  135. },
  136. (err) => {
  137. }
  138. );
  139. },
  140. addHandler() {
  141. var _self = this;
  142. _self.formObj['rgstrId'] = _self.currentObjectRgstrId;
  143. _self.formObj['recPersId'] = _self.recPersId;
  144. if(
  145. (this.formObj.location==null || this.formObj.location=="") &&
  146. (this.formObj.chkMode==null || this.formObj.chkMode=="") &&
  147. (this.formObj.chkTm==null || this.formObj.chkTm=="") &&
  148. (this.formObj.chkType==null || this.formObj.chkType=="")
  149. ){
  150. this.formObj.state = "0"
  151. }else if(
  152. this.formObj.location!=null &&
  153. this.formObj.location!="" &&
  154. this.formObj.chkMode!=null &&
  155. this.formObj.chkMode!="" &&
  156. this.formObj.chkTm!=null &&
  157. this.formObj.chkTm!="" &&
  158. this.formObj.chkType!=null &&
  159. this.formObj.chkType!=""
  160. ){
  161. this.formObj.state = "2";
  162. }else{
  163. this.formObj.state = "1"
  164. }
  165. try {
  166. this.$confirm('确认保存现场督查情况信息?', '提示', {
  167. confirmButtonText: '确定',
  168. cancelButtonText: '取消',
  169. type: 'warning'
  170. }).then(() => {
  171. request.post('/bis/insp/prdqh', _self.formObj).then((res) => {
  172. if (res.success) {
  173. _self.$emit("addShuiKuSuccess");
  174. _self.showLocSelect = false
  175. _self.getRgstridObj()
  176. _self.$message.success("修改成功");
  177. } else {
  178. _self.$emit('cancelHandler');
  179. }
  180. });
  181. })
  182. } catch (e) {
  183. }
  184. },
  185. cancelHandler() {
  186. this.$emit('cancelHandler');
  187. },
  188. formatRadio(val) {
  189. if (val == '1') {
  190. return '是'
  191. } else if (val == '0') {
  192. return '否'
  193. } else {
  194. return val
  195. }
  196. },
  197. getAreaList(val) {
  198. let areaParams = {
  199. adName: "",
  200. id: this.dczId,
  201. pageNum: 1,
  202. pageSize: 10000
  203. }
  204. let adCode = ''
  205. if (!val) {
  206. adCode = '000000000000'
  207. } else {
  208. adCode = val
  209. }
  210. request.get('/dc/ad/base/getAdData', {params: {'adCode': adCode}}).then(res => {
  211. if (res.success) {
  212. if (this.curSelectItem == 1) {
  213. this.cityList = res.data
  214. } else if (this.curSelectItem == 2) {
  215. this.countryList = res.data
  216. } else {
  217. this.provList = res.data
  218. }
  219. }
  220. })
  221. },
  222. provChange(val) {
  223. this.curSelectItem = 1
  224. this.cityName = ''
  225. this.countryName = ''
  226. this.formObj.admDiv = val
  227. this.provList.forEach(ele => {
  228. if (ele.adCode == this.provName) {
  229. this.provNames = ele.adName
  230. }
  231. })
  232. this.formObj.adName = this.provNames
  233. this.getAreaList(val)
  234. },
  235. RsvrTypeChange(val) {
  236. },
  237. cityChange(val) {
  238. this.curSelectItem = 2
  239. if (val && val != '') {
  240. this.formObj.admDiv = val
  241. this.countryName = ''
  242. this.cityList.forEach(ele => {
  243. if (ele.adCode == this.cityName) {
  244. this.cityNames = ele.adName
  245. }
  246. })
  247. this.formObj.adName = this.provNames + this.cityNames
  248. this.getAreaList(val)
  249. }
  250. },
  251. countryChange(val) {
  252. if (val && val != '') {
  253. this.formObj.admDiv = val
  254. this.countryList.forEach(ele => {
  255. if (ele.adCode == this.countryName) {
  256. this.countryNames = ele.adName
  257. }
  258. })
  259. this.formObj.adName = this.provNames + this.cityNames + this.countryNames
  260. this.formObj.adCode = val
  261. }
  262. },
  263. // 近期面貌
  264. recentAppearance() {
  265. this.xcztShow = true;
  266. },
  267. jqmmDialog() {
  268. this.xcztShow = false;
  269. },
  270. //影像
  271. imageClick() {
  272. if (!this.centerX && !this.centerY) {
  273. this.$message.warning('暂无经纬度信息!');
  274. return false;
  275. }
  276. this.imageShow = true;
  277. }
  278. },
  279. }
  280. </script>
  281. <style>
  282. #dcdxHeader {
  283. padding: 15px 20px;
  284. }
  285. #dxdcFooter {
  286. text-align: center;
  287. }
  288. #dxdcAside {
  289. border: 1px solid #d5d5ff;
  290. }
  291. .el-dialog__wrapper .el-treeWhite {
  292. /* max-height: 260px !important; */
  293. }
  294. </style>