移动端
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

364 行
13 KiB

  1. <template>
  2. <div class="app-container">
  3. <van-nav-bar
  4. left-arrow
  5. fixed
  6. placeholder
  7. @click-left="$router.back(-1)"
  8. >
  9. <template #title>
  10. <p style="font-weight: bold;">修改违法监管</p>
  11. </template>
  12. </van-nav-bar>
  13. <div class="main_box">
  14. <van-field v-model="jgList.shyqrdbxm" label="申请人姓名" placeholder="申请人姓名" input-align="right" label-width="auto" :rules="[{ required: true }]" required @input="remoteTransfereeMethod" />
  15. <div id="dropList" v-show="showDropList" style="width: 92vw; position: absolute; z-index: 99; left: 50%; margin-left: -46vw; border: 1px solid #E2E0E0;" >
  16. <van-cell id="vanCell" v-for="(item, index) in getObligeeOptions" :key="index" @click="shyqrdmxmChange(item)" style="position: relative; z-index: 999;">
  17. {{item.sqrxm}}
  18. </van-cell>
  19. </div>
  20. <van-field
  21. v-model="jgList.zjddm"
  22. label="宅基地代码"
  23. input-align="right"
  24. >
  25. <template #button>
  26. <van-icon name="../../../static/images/22.png" color="#539FFD" size="20" @click="mapLook"/>
  27. </template>
  28. </van-field>
  29. <field-select
  30. v-model="jgList.shyqrzjlx"
  31. label="证件类型"
  32. value-key="dictLabel"
  33. data-key="dictValue"
  34. placeholder="选择证件类型"
  35. :rules="[{ required: true }]"
  36. required
  37. remote-url="/system/dict/data/type/zjlx"
  38. :on-remote-response="'data'"
  39. />
  40. <van-field v-model="jgList.shyqrzjhm" label="申请人证件号码" placeholder="申请人证件号码" input-align="right" label-width="auto" :rules="[{ required: true }]" required/>
  41. <field-select
  42. v-model="jgList.shangbaoId"
  43. label="关联任务"
  44. value-key="surveyName"
  45. data-key="id"
  46. placeholder="选择关联任务"
  47. :rules="[{ required: true }]"
  48. :columns="shangbaoList"
  49. :clearable="true"
  50. />
  51. </div>
  52. <p class="main_title">执法情况</p>
  53. <field-select
  54. v-model="jgList.jglx"
  55. label="监管类型"
  56. value-key="dictLabel"
  57. data-key="dictValue"
  58. placeholder="选择监管类型"
  59. :rules="[{ required: true }]"
  60. required
  61. remote-url="/system/dict/data/type/jglx"
  62. :on-remote-response="'data'"
  63. />
  64. <field-date-picker
  65. v-model="jgList.lasj"
  66. label="立案时间"
  67. placeholder="选择立案时间"
  68. :rules="[{ required: true }]"
  69. formatter="yyyy-MM-dd"
  70. required
  71. />
  72. <field-select
  73. v-model="jgList.wfydlx"
  74. label="违法用地类型"
  75. value-key="dictLabel"
  76. data-key="dictValue"
  77. placeholder="选择违法用地类型"
  78. :rules="[{ required: true }]"
  79. required
  80. remote-url="/system/dict/data/type/villations_type"
  81. :on-remote-response="'data'"
  82. />
  83. <van-field required v-model="jgList.sjdz" label="事件地址" placeholder="事件地址" input-align="right" :rules="[{ required: true }]"/>
  84. <van-dialog v-model="mapShow" show-cancel-button>
  85. <MapGisObtainTc ref="zjdProductResh" :shqrxm="jgList.shyqrdbxm" :landStatus="landStatus" :deptId="deptId" @closeMoule="closeMoule"></MapGisObtainTc>
  86. </van-dialog>
  87. <van-field rows="3" :autosize="true" type="textarea" label="备注" label-width="auto" placeholder="备注" v-model="jgList.bz" input-align="left"></van-field>
  88. <div v-if="wfxxShow">
  89. <p class="main_title">违法信息</p>
  90. <div class="main_box">
  91. <van-field
  92. readonly
  93. clickable
  94. label="违法用地类型"
  95. placeholder="请选择"
  96. v-model="wfydlx"
  97. @click="showwfydlx = true"
  98. input-align="right"
  99. right-icon="arrow-down"
  100. />
  101. <van-popup v-model="showwfydlx" position="bottom">
  102. <van-picker
  103. show-toolbar
  104. :columns="wfydlxDictionaries"
  105. @confirm="onConfirmWfydlx"
  106. @cancel="showwfydlx = false"
  107. />
  108. </van-popup>
  109. <van-field v-model="jgList.wfydmj" label="违法用地面积" placeholder="请输入面积" input-align="right" label-width="auto"/>
  110. <van-field v-model="jgList.fmkje" label="罚没款金额" placeholder="请输入金额" input-align="right" label-width="auto"/>
  111. <van-field v-model="jgList.msmj" label="没收面积" placeholder="请输入面积" input-align="right" label-width="auto"/>
  112. <van-field v-model="jgList.ccmj" label="拆除面积" placeholder="请输入面积" input-align="right" label-width="auto"/>
  113. <van-field
  114. readonly
  115. clickable
  116. label="整改截止时间"
  117. placeholder="选择整改截止时间"
  118. v-model="jgList.reformDeadline"
  119. @click="showReformDeadline = true"
  120. input-align="right"
  121. right-icon="arrow-down"
  122. />
  123. <van-popup v-model="showReformDeadline" position="bottom">
  124. <van-datetime-picker
  125. v-model="currentDate"
  126. type="date"
  127. title="选择年月日"
  128. :min-date="minDate"
  129. :max-date="maxDate"
  130. @confirm="onConfirmReformDeadline"
  131. />
  132. </van-popup>
  133. </div>
  134. </div>
  135. <div style="padding: 16px 0;">
  136. <van-row>
  137. <van-col span="12" align="center">
  138. <van-button type="info" color="#B4B0B0" native-type="submit" @click="goBack" class="submitButton">取<i style="margin-right: 1em;"></i>消</van-button>
  139. </van-col>
  140. <van-col span="12" align="center">
  141. <van-button type="info" native-type="submit" @click="goAdd" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button>
  142. </van-col>
  143. </van-row>
  144. <div class="clear"></div>
  145. </div>
  146. </div>
  147. </template>
  148. <script>
  149. import {jgAdd, getShyqrs, getJg, jgEdit, listHomeuseshangbao} from "@/api/onlineHome/homestead/reporting";
  150. import FieldSelect from "@/components/form/FieldSelect";
  151. import MapGisObtainTc from "@/components/Map/MapGisObtainTc";
  152. import FieldDatePicker from "@/components/form/FieldDatePicker";
  153. import {formatDate} from "element-ui/src/utils/date-util.js";
  154. export default {
  155. name: "supervisionAdd",
  156. components: { MapGisObtainTc,FieldSelect,FieldDatePicker },
  157. data() {
  158. return {
  159. showSys:false,
  160. showjglx:false,
  161. showlasj:false,
  162. showinspectorTime:false,
  163. showwfydlx:false,
  164. showReformDeadline:false,
  165. showDropList:false,
  166. wfxxShow:false,
  167. mapShow:false,
  168. landStatus:"1",
  169. minDate: new Date(),
  170. maxDate: new Date(2025, 10, 1),
  171. currentDate: new Date(),
  172. deptId:this.$store.state.user.loginDeptId,
  173. jgList:{},
  174. getObligeeOptions:[],
  175. sfzjjzw:'',
  176. jglx:'',
  177. wfydlx:'',
  178. wfydlxDictionaries:[],
  179. jglxDictionaries:[],
  180. sysDictionaries:[],
  181. shangbaoList: [],
  182. };
  183. },
  184. created() {
  185. this.getDictionaries();
  186. this.getTaskGet();
  187. this.getShangbaoList();
  188. },
  189. methods: {
  190. getTaskGet(){
  191. getJg(this.$route.query.id).then(response => {
  192. this.jgList = response.data;
  193. });
  194. },
  195. getDictionaries(){
  196. //违法用地类型
  197. this.houseGetDicts("villations_type").then((res) => {
  198. for(var i = 0 ; i < res.data.length ; i++){
  199. this.wfydlxDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue});
  200. }
  201. });
  202. //监管类型
  203. this.houseGetDicts("jglx").then((res) => {
  204. for(var i = 0 ; i < res.data.length ; i++){
  205. this.jglxDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue});
  206. }
  207. });
  208. //是否在建建筑物
  209. this.houseGetDicts("sys_yes_no").then((res) => {
  210. for(var i = 0 ; i < res.data.length ; i++){
  211. this.sysDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue});
  212. }
  213. });
  214. },
  215. /** 模糊查询人员信息 */
  216. remoteTransfereeMethod(query) {
  217. if (query !== "") {
  218. getShyqrs({shyqrdbxm:query,status:1}).then((response) => {
  219. if (response.code == 200) {
  220. this.getObligeeOptions = response.rows.map(function (item) {
  221. return {
  222. sqrxm:item.shyqrdbxm,
  223. sqrxb:item.xb,
  224. sqrzjhm:item.shyqrdbzjhm,
  225. shyqrdm:item.shyqrdm,
  226. sqrzjlx:item.shyqrdbzjlx,
  227. sqrdh:item.dh,
  228. gyfs:item.gyfs,
  229. dz:item.dz,
  230. deptId:item.deptId,
  231. deptName:item.deptName,
  232. }
  233. })
  234. //设置模糊查询的下拉框和滚动条
  235. if (this.getObligeeOptions.length > 0) {
  236. this.showDropList = true; // div显示会阻挡下边的选择框和输入框,showDropList控制下拉框是否显示
  237. //设置模糊查询的和滚动条
  238. this.$nextTick(() => {
  239. if (this.getObligeeOptions.length > 4) {
  240. let height = document.getElementById("vanCell").offsetHeight * 4;
  241. document.getElementById("dropList").style.height = height + "px";
  242. document.getElementById("dropList").style.overflow = "scroll";
  243. } else {
  244. document.getElementById("dropList").style.height = "";
  245. document.getElementById("dropList").style.overflow = "visible";
  246. }
  247. });
  248. } else {
  249. this.showDropList = false;
  250. }
  251. }
  252. });
  253. } else {
  254. this.getObligeeOptions = [];
  255. this.showDropList = false;
  256. }
  257. },
  258. shyqrdmxmChange(val){
  259. this.$set(this.jgList, "shyqrdbxm", val.sqrxm);
  260. this.$set(this.jgList, "deptId", val.deptId);
  261. this.$set(this.jgList, "deptName", val.deptId);
  262. this.$set(this.jgList, "shyqrzjhm", val.sqrzjhm);
  263. this.$set(this.jgList, "shyqrzjlx", val.sqrzjlx);
  264. this.$set(this.jgList, "shyqrdm", val.shyqrdm);
  265. this.getObligeeOptions=[];
  266. this.showDropList = false;
  267. },
  268. /** 查找地图中宅基地 */
  269. closeMoule: function (data) {
  270. this.jgList.zjddm = data;
  271. let _this = this;
  272. let handlerTime = this.getDate();
  273. this.$set(this.jgList, "sqrq", handlerTime);
  274. this.$set(this.jgList, "pzrq", handlerTime);
  275. this.$set(this.jgList, "barq", handlerTime);
  276. },
  277. // 获取日期, yyyy-MM-dd
  278. getDate(d) {
  279. return formatDate(d ? d : new Date(), 'yyyy-MM-dd');
  280. },
  281. mapLook(){
  282. this.mapShow = true;
  283. setTimeout(() => {
  284. this.$refs.zjdProductResh.drawingLyPaceCountryDarw();
  285. },1000);
  286. },
  287. onConfirmSys(data){
  288. this.sfzjjzw = data.text;
  289. this.jgList.sfzjjzw = data.value;
  290. this.showSys = false;
  291. },
  292. onConfirmJglx(data){
  293. this.jglx = data.text;
  294. this.jgList.jglx = data.value;
  295. this.showjglx = false;
  296. },
  297. onConfirmWfydlx(data){
  298. this.wfydlx = data.text;
  299. this.jgList.wfydlx = data.value;
  300. this.showwfydlx = false;
  301. },
  302. onConfirmLasj(data){
  303. this.jgList.lasj = this.getNowFormatDate(data).substr(0,10);
  304. this.showlasj = false;
  305. },
  306. onConfirmInspectorTime(data){
  307. this.jgList.inspectorTime = this.getNowFormatDate(data).substr(0,10);
  308. this.showinspectorTime = false;
  309. },
  310. onConfirmReformDeadline(data){
  311. this.jgList.reformDeadline = this.getNowFormatDate(data).substr(0,10);
  312. this.showReformDeadline = false;
  313. },
  314. goAdd(){
  315. console.log(this.jgList)
  316. jgEdit(this.jgList).then(response => {
  317. console.log(response);
  318. this.$toast.success('保存成功');
  319. setTimeout(function(){
  320. history.go(-1)
  321. },2000)
  322. });
  323. },
  324. goBack(){
  325. window.history.go(-1)
  326. },
  327. getShangbaoList() {
  328. listHomeuseshangbao({deptId: this.$store.state.user.loginDeptId, surveyStatus: '0'}).then((resp) => {
  329. this.shangbaoList = resp.rows;
  330. });
  331. },
  332. },
  333. }
  334. </script>
  335. <style scoped lang="scss">
  336. .app-container {
  337. padding: 2% 0;
  338. }
  339. .main_title{
  340. font-size: 0.4rem;
  341. color: #1D6FE9;
  342. margin: 0.2rem 6%;
  343. position: relative;
  344. }
  345. .main_box{
  346. width: 96%;
  347. margin: 0 auto;
  348. border-radius: 6px;
  349. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  350. overflow: hidden;
  351. background-color: #FFF;
  352. }
  353. .submitButton{
  354. width: 80%;
  355. margin: 0 auto;
  356. background-color: #1D6FE9;
  357. }
  358. </style>