移动端
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

282 linhas
8.3 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
  15. readonly
  16. clickable
  17. label="是否在建建筑物"
  18. placeholder="请选择"
  19. v-model="sfzjjzw"
  20. @click="showSys = true"
  21. input-align="right"
  22. right-icon="arrow-down"
  23. label-width="auto"
  24. />
  25. <van-popup v-model="showSys" position="bottom">
  26. <van-picker
  27. show-toolbar
  28. :columns="sysDictionaries"
  29. @confirm="onConfirmSys"
  30. @cancel="showSys = false"
  31. />
  32. </van-popup>
  33. <van-field label="宅基地代码" v-model="jgList.zjddm" placeholder="请输入宅基地代码" input-align="right" />
  34. <!-- <van-popup v-model="showZjd" position="bottom">-->
  35. <!-- <van-picker-->
  36. <!-- show-toolbar-->
  37. <!-- @cancel="showZjd = false"-->
  38. <!-- />-->
  39. <!-- </van-popup>-->
  40. <van-field
  41. readonly
  42. clickable
  43. label="监管类型"
  44. placeholder="请选择"
  45. v-model="jglx"
  46. @click="showjglx = true"
  47. input-align="right"
  48. right-icon="arrow-down"
  49. />
  50. <van-popup v-model="showjglx" position="bottom">
  51. <van-picker
  52. show-toolbar
  53. :columns="jglxDictionaries"
  54. @confirm="onConfirmJglx"
  55. @cancel="showjglx = false"
  56. />
  57. </van-popup>
  58. <van-field
  59. readonly
  60. clickable
  61. v-model="jgList.lasj"
  62. label="立案时间"
  63. placeholder="请选择立案时间"
  64. @click="showlasj = true"
  65. input-align="right"
  66. right-icon="arrow-down"
  67. />
  68. <van-popup v-model="showlasj" position="bottom">
  69. <van-datetime-picker
  70. v-model="currentDate"
  71. type="date"
  72. title="选择年月日"
  73. :min-date="minDate"
  74. :max-date="maxDate"
  75. @confirm="onConfirmLasj"
  76. />
  77. </van-popup>
  78. <van-field label="巡查人" v-model="jgList.inspector" placeholder="请输入巡查人" input-align="right" label-width="auto"/>
  79. <van-field
  80. readonly
  81. clickable
  82. label="巡查时间"
  83. v-model="jgList.inspectorTime"
  84. placeholder="请选择巡查时间"
  85. @click="showinspectorTime = true"
  86. input-align="right"
  87. right-icon="arrow-down"
  88. />
  89. <van-popup v-model="showinspectorTime" position="bottom">
  90. <van-datetime-picker
  91. v-model="currentDate"
  92. type="date"
  93. title="选择年月日"
  94. :min-date="minDate"
  95. :max-date="maxDate"
  96. @confirm="onConfirmInspectorTime"
  97. />
  98. </van-popup>
  99. <van-field label="备注" v-model="jgList.bz" placeholder="填写备注" input-align="right" label-width="auto"/>
  100. </div>
  101. <p class="main_title">违法信息</p>
  102. <div class="main_box">
  103. <van-field
  104. readonly
  105. clickable
  106. label="违法用地类型"
  107. placeholder="请选择"
  108. v-model="wfydlx"
  109. @click="showwfydlx = true"
  110. input-align="right"
  111. right-icon="arrow-down"
  112. />
  113. <van-popup v-model="showwfydlx" position="bottom">
  114. <van-picker
  115. show-toolbar
  116. :columns="wfydlxDictionaries"
  117. @confirm="onConfirmWfydlx"
  118. @cancel="showwfydlx = false"
  119. />
  120. </van-popup>
  121. <van-field v-model="jgList.wfydmj" label="违法用地面积" placeholder="请输入面积" input-align="right" label-width="auto"/>
  122. <van-field v-model="jgList.fmkje" label="罚没款金额" placeholder="请输入金额" input-align="right" label-width="auto"/>
  123. <van-field v-model="jgList.msmj" label="没收面积" placeholder="请输入面积" input-align="right" label-width="auto"/>
  124. <van-field v-model="jgList.ccmj" label="拆除面积" placeholder="请输入面积" input-align="right" label-width="auto"/>
  125. <van-field
  126. readonly
  127. clickable
  128. label="整改截止时间"
  129. placeholder="选择整改截止时间"
  130. v-model="jgList.reformDeadline"
  131. @click="showReformDeadline = true"
  132. input-align="right"
  133. right-icon="arrow-down"
  134. />
  135. <van-popup v-model="showReformDeadline" position="bottom">
  136. <van-datetime-picker
  137. v-model="currentDate"
  138. type="date"
  139. title="选择年月日"
  140. :min-date="minDate"
  141. :max-date="maxDate"
  142. @confirm="onConfirmReformDeadline"
  143. />
  144. </van-popup>
  145. </div>
  146. <div style="padding: 16px 0;">
  147. <van-row>
  148. <van-col span="12" align="center">
  149. <van-button type="info" color="#B4B0B0" native-type="submit" @click="goBack" class="submitButton">取<i style="margin-right: 1em;"></i>消</van-button>
  150. </van-col>
  151. <van-col span="12" align="center">
  152. <van-button type="info" native-type="submit" @click="goAdd" class="submitButton">添<i style="margin-right: 1em;"></i>加</van-button>
  153. </van-col>
  154. </van-row>
  155. <div class="clear"></div>
  156. </div>
  157. </div>
  158. </template>
  159. <script>
  160. import { jgAdd } from "@/api/onlineHome/homestead/reporting";
  161. export default {
  162. name: "supervisionAdd",
  163. data() {
  164. return {
  165. showSys:false,
  166. showjglx:false,
  167. showlasj:false,
  168. showinspectorTime:false,
  169. showwfydlx:false,
  170. showReformDeadline:false,
  171. minDate: new Date(),
  172. maxDate: new Date(2025, 10, 1),
  173. currentDate: new Date(),
  174. jgList:{},
  175. sfzjjzw:'',
  176. jglx:'',
  177. wfydlx:'',
  178. wfydlxDictionaries:[],
  179. jglxDictionaries:[],
  180. sysDictionaries:[],
  181. };
  182. },
  183. created() {
  184. this.getDictionaries();
  185. },
  186. methods: {
  187. getDictionaries(){
  188. //违法用地类型
  189. this.houseGetDicts("villations_type").then((res) => {
  190. for(var i = 0 ; i < res.data.length ; i++){
  191. this.wfydlxDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue});
  192. }
  193. });
  194. //监管类型
  195. this.houseGetDicts("jglx").then((res) => {
  196. for(var i = 0 ; i < res.data.length ; i++){
  197. this.jglxDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue});
  198. }
  199. });
  200. //是否在建建筑物
  201. this.houseGetDicts("sys_yes_no").then((res) => {
  202. for(var i = 0 ; i < res.data.length ; i++){
  203. this.sysDictionaries.push({text:res.data[i].dictLabel,value:res.data[i].dictValue});
  204. }
  205. });
  206. },
  207. onConfirmSys(data){
  208. this.sfzjjzw = data.text;
  209. this.jgList.sfzjjzw = data.value;
  210. this.showSys = false;
  211. },
  212. onConfirmJglx(data){
  213. this.jglx = data.text;
  214. this.jgList.jglx = data.value;
  215. this.showjglx = false;
  216. },
  217. onConfirmWfydlx(data){
  218. this.wfydlx = data.text;
  219. this.jgList.wfydlx = data.value;
  220. this.showwfydlx = false;
  221. },
  222. onConfirmLasj(data){
  223. this.jgList.lasj = this.getNowFormatDate(data).substr(0,10);
  224. this.showlasj = false;
  225. },
  226. onConfirmInspectorTime(data){
  227. this.jgList.inspectorTime = this.getNowFormatDate(data).substr(0,10);
  228. this.showinspectorTime = false;
  229. },
  230. onConfirmReformDeadline(data){
  231. this.jgList.reformDeadline = this.getNowFormatDate(data).substr(0,10);
  232. this.showReformDeadline = false;
  233. },
  234. goAdd(){
  235. console.log(this.jgList)
  236. jgAdd(this.jgList).then(response => {
  237. console.log(response);
  238. this.$toast.success('保存成功');
  239. setTimeout(function(){
  240. history.go(-1)
  241. },2000)
  242. });
  243. },
  244. goBack(){
  245. window.history.go(-1)
  246. }
  247. },
  248. }
  249. </script>
  250. <style scoped lang="scss">
  251. .app-container {
  252. padding: 2% 0;
  253. }
  254. .main_title{
  255. font-size: 0.4rem;
  256. color: #1D6FE9;
  257. margin: 0.2rem 6%;
  258. position: relative;
  259. }
  260. .main_box{
  261. width: 96%;
  262. margin: 0 auto;
  263. border-radius: 6px;
  264. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  265. overflow: hidden;
  266. background-color: #FFF;
  267. }
  268. .submitButton{
  269. width: 80%;
  270. margin: 0 auto;
  271. background-color: #1D6FE9;
  272. }
  273. </style>