管理系统PC端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

315 行
7.9 KiB

  1. <template>
  2. <div class="home_wrapper">
  3. <van-nav-bar
  4. title="土地列表管理"
  5. left-arrow
  6. placeholder
  7. safe-area-inset-top
  8. @click-left="onClickLeft"
  9. />
  10. <div class="search_box">
  11. <div class="left">
  12. <p @click="showPicker = true">{{surveyStatus}}<van-icon name="play" /></p>
  13. <van-field v-model="value" @input="searchChange" @clear="searchClear" clearable left-icon="search" placeholder="请输入地块名称" />
  14. </div>
  15. <van-button type="primary" round @click="goSearch" >搜索</van-button>
  16. </div>
  17. <van-popup v-model="showPicker" round position="bottom">
  18. <van-picker
  19. show-toolbar
  20. :columns="dict.type.survey_status"
  21. value-key="label"
  22. @cancel="showPicker = false"
  23. @confirm="onConfirm"
  24. />
  25. </van-popup>
  26. <div class="list_main">
  27. <van-list
  28. v-model="loading"
  29. :finished="finished"
  30. finished-text="没有更多了"
  31. @load="getList"
  32. >
  33. <!--1-->
  34. <van-swipe-cell right-width="200" class="item" v-for="(item,index) in landList" :key="index">
  35. <div class="item_box" @click="$router.push({name:'appDetail',query:{dkbm:item.dkbm}})">
  36. <div class="head_block">
  37. <div class="title">{{item.dkbm}}</div>
  38. <div class="describe"><dict-tag :options="dict.type.survey_status" :value="item.surveyStatus"/></div>
  39. </div>
  40. <div class="order_block">
  41. <div class="order">{{item.dkmc}}</div>
  42. <div class="describe">{{item.scmjm}}</div>
  43. </div>
  44. </div>
  45. <template #right>
  46. <div style="background-color: #29D2AF;height: 100%" @click="$router.push({name:'appAttributeEdit',query:{dkbm:item.dkbm}})">属性<br/>修改</div>
  47. <div style="background-color: #0E82EB;height: 100%" @click="$router.push({name:'appOperateEdit',query:{dkbm:item.dkbm}})">经营<br/>修改</div>
  48. <div style="background-color: #ee0a24;height: 100%" @click="handleDelete(item)">删除</div>
  49. </template>
  50. </van-swipe-cell>
  51. </van-list>
  52. </div>
  53. </div>
  54. </template>
  55. <script>
  56. // import { getMenuApp } from "@/api/app/index";
  57. import { Dialog } from 'vant';
  58. import { listLand, delLand } from "@/api/resource/land"
  59. export default {
  60. dicts: ['ownership_type', 'land_use_type', 'survey_status', 'is_common', 'land_grade_type', 'land_type', 'land_use'],
  61. name: "appList",
  62. data() {
  63. return {
  64. loading: false,
  65. finished: false,
  66. showPicker: false,
  67. value:'',
  68. queryParams: {
  69. pageNum: 1,
  70. pageSize: 10,
  71. // 查询排序
  72. //orderByColumn: "id",
  73. //isAsc: "desc",
  74. // 翻译字典
  75. //toTranslateDict: "1",
  76. dkbm: null,
  77. dkmc: null,
  78. syqxz: null,
  79. dklb: null,
  80. tdlylx: null,
  81. dldj: null,
  82. tdyt: null,
  83. sfjbnt: null,
  84. surveyStatus: null,
  85. importCode: null,
  86. sfzwd: null,
  87. },
  88. landList:[],
  89. surveyStatus:'调查状态'
  90. };
  91. },
  92. created() {
  93. console.log(this.dict.type.survey_status)
  94. },
  95. methods: {
  96. onClickLeft(){
  97. history.back(-1);
  98. },
  99. getList(){
  100. listLand(this.queryParams).then(response => {
  101. this.total = response.total
  102. for (var i = 0; i < response.rows.length; i++) {
  103. this.landList.push(response.rows[i]);
  104. }
  105. if(this.landList.length >= response.total){
  106. this.finished = true;
  107. return;
  108. }else{
  109. this.loading = false;
  110. this.queryParams.pageNum += 1 ;
  111. }
  112. })
  113. },
  114. onConfirm(value) {
  115. console.log(value)
  116. this.surveyStatus = value.label;
  117. this.queryParams.surveyStatus = value.value;
  118. this.showPicker = false;
  119. },
  120. searchChange(value) {
  121. this.queryParams.dkmc = value;
  122. },
  123. goSearch(){
  124. this.queryParams.pageNum = 1;
  125. this.landList = [];
  126. this.finished = false;
  127. this.loading = false;
  128. this.getList();
  129. },
  130. searchClear(){
  131. this.surveyStatus = '调查状态';
  132. this.queryParams.surveyStatus = '';
  133. },
  134. /** 删除按钮操作 */
  135. handleDelete(row) {
  136. const fids = row.fid || this.ids
  137. Dialog.confirm({
  138. title: '提示',
  139. message: '是否确认删除地块属性编号为"' + fids + '"的数据项?',
  140. })
  141. .then(() => {
  142. return delLand(fids)
  143. })
  144. .then(() => {
  145. this.goSearch()
  146. this.$modal.msgSuccess("删除成功")
  147. })
  148. .catch(() => {
  149. // on cancel
  150. });
  151. }
  152. },
  153. };
  154. </script>
  155. <style scoped lang="scss">
  156. p{margin: 0;}
  157. ::v-deep .el-tag{
  158. padding: 0;
  159. }
  160. .home_wrapper{
  161. width: 100vw;
  162. min-height: 100vh;
  163. background: #F6F9FB;
  164. }
  165. .van-nav-bar{
  166. background: linear-gradient( 173deg, #91E2D3 0%, #CDFCF0 100%);
  167. ::v-deep.van-icon{
  168. color: #000000;
  169. }
  170. }
  171. .list_main{
  172. padding:0 3vw;
  173. .item{
  174. border-radius: 10px;
  175. background: #fff;
  176. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  177. margin-bottom: 20px;
  178. .item_box{
  179. padding:15px;
  180. }
  181. .head_block{
  182. display: flex;
  183. align-items: center;
  184. width: 100%;
  185. .title{
  186. flex:1;
  187. font-size: 16px;
  188. color: #252525;
  189. overflow: hidden;
  190. text-overflow: ellipsis;
  191. white-space: nowrap;
  192. padding-right: 20px;
  193. }
  194. .describe{
  195. font-size: 14px;
  196. color: #29D2AF;
  197. }
  198. }
  199. .order_block{
  200. display: flex;
  201. align-items: center;
  202. width: 100%;
  203. margin-top: 10px;
  204. .order{
  205. flex: 1;
  206. font-size: 16px;
  207. color: #666666;
  208. }
  209. .describe{
  210. font-size: 22px;
  211. color: #29D2AF;
  212. }
  213. }
  214. .function_block{
  215. height: 46px;
  216. display: flex;
  217. align-items: center;
  218. .time{
  219. display: flex;
  220. flex: 1;
  221. align-items: center;
  222. font-size: 24px;
  223. color: #858585;
  224. .icon{
  225. width: 25px;
  226. height: 25px;
  227. display: block;
  228. margin-right: 8px;
  229. }
  230. }
  231. .state{
  232. /*flex: 1;*/
  233. display: flex;
  234. justify-content: center;
  235. align-items: center;
  236. &.sell{
  237. color: #f69600;
  238. }
  239. &.scrap{
  240. color: #858585;
  241. }
  242. &.normal{
  243. color: #68c000;
  244. }
  245. }
  246. .value{
  247. flex:1;
  248. display: flex;
  249. align-items: center;
  250. justify-content:flex-end;
  251. font-size: 24px;
  252. color: #858585;
  253. .amount{
  254. color: #eb1616;
  255. }
  256. }
  257. }
  258. }
  259. }
  260. ::v-deep .van-swipe-cell__right{
  261. display: flex;
  262. align-items: center;
  263. width: 200PX;
  264. margin-left: 5PX;
  265. a,div{
  266. margin: 0;
  267. display: flex;
  268. align-items: center;
  269. justify-content: center;
  270. color: #ffffff;
  271. font-size: 14PX;
  272. height: 100%;
  273. flex: 1;
  274. }
  275. }
  276. .search_box{
  277. display: flex;
  278. align-items: center;
  279. justify-content: space-between;
  280. width: 94%;
  281. margin: 2vh auto;
  282. .left{
  283. display: flex;
  284. align-items: center;
  285. flex: 1;
  286. background-color: #ffffff;
  287. border-radius: 50vh;
  288. padding-left: 6%;
  289. overflow: hidden;
  290. margin-right: 3vw;
  291. }
  292. p{
  293. flex-shrink: 0;
  294. }
  295. button{
  296. flex-shrink: 0;
  297. background: linear-gradient( 271deg, #53E4A5 0%, #24DBDB 100%);
  298. border: none;
  299. width: 20%;
  300. }
  301. }
  302. </style>