market-research.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view>
  3. <ul style="list-style: none;padding-left: 0px;margin-top: 20rpx;">
  4. <li v-for="data in msgdata" :key="data.researchId" style="margin:0 auto 40rpx;padding: 20rpx;width: 90%;background-color: #f5f5f5;">
  5. <view class="slot-text-filename" @click="clickDetail(data)">
  6. <text>{{data.marketName}}</text>
  7. </view>
  8. <view class="slot-text-msg" @click="clickDetail(data)" style="display: flex;flex-direction: column;">
  9. <text class="slot-text-msg-data" style="font-size: 30rpx;">市场地址:{{data.address}}</text>
  10. <text class="slot-text-msg-data" style="font-size: 30rpx;">竞争对手数量:{{data.competitorNumber}}</text>
  11. <text class="slot-text-msg-data" style="font-size: 30rpx;">潜在客户数量:{{data.customerNumber}}</text>
  12. <text class="slot-text-msg-data" style="font-size: 30rpx;">平均消费水平:{{data.avgPrice}} </text>
  13. <text class="slot-text-msg-data" style="font-size: 30rpx;">调研时间:{{data.researchTime}} </text>
  14. </view>
  15. <view class="slot-text-btn">
  16. <button class="btn-modify" @click="modifyF(data.researchId)">修改</button>
  17. <button class="btn-delete" @click="deleteF(data.researchId)">删除</button>
  18. </view>
  19. </li>
  20. </ul>
  21. <view class="tips-box" v-show="isShow">
  22. <text style="line-height: 150rpx;">确认删除?</text>
  23. <view class="tips-btn">
  24. <button @click="close">取消</button>
  25. <button @click="handleDelete()">确认</button>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. import { listResearch,delResearch } from "../../api/marketmini/index"
  32. export default {
  33. data() {
  34. return {
  35. visit:'visit',
  36. msgdata:[
  37. {
  38. address: "城北",
  39. avgPrice: 5,
  40. competitorNumber: 5,
  41. createBy: null,
  42. createTime: "2022-07-12 15:30:26",
  43. createUserId: null,
  44. customerNumber: 5,
  45. marketName: "城北市场",
  46. params: {},
  47. remark: null,
  48. researchId: "1",
  49. researchTime: "2022-07-12",
  50. searchValue: null,
  51. updateBy: null,
  52. updateTime: "2022-07-12 15:30:40",
  53. updateUserId: null
  54. }
  55. ],
  56. queryParams: {
  57. pageNum: 1,
  58. pageSize: 10,
  59. // marketName: null,
  60. // address: null,
  61. // researchTime: null,
  62. },
  63. isShow:false,
  64. deleteid:''
  65. };
  66. },
  67. methods:{
  68. createF(){
  69. uni.navigateTo({
  70. url:"/pages/newAdd/newAdd"
  71. })
  72. },
  73. deleteF(data){
  74. // delCustomerInfo()
  75. this.isShow= true
  76. // this.$refs.popup.open('top')
  77. this.deleteid = data
  78. console.log(this.deleteid)
  79. },
  80. close() {
  81. // this.$refs.popup.close()
  82. this.isShow = false
  83. },
  84. handleDelete(){
  85. delResearch(this.deleteid).then(data=>{
  86. this.getlist()
  87. this.close()
  88. })
  89. },
  90. modifyF(id){
  91. uni.navigateTo({
  92. url:'/pages/addMarket/addMarket?id='+id
  93. })
  94. },
  95. exportF(){
  96. console.log("导出")
  97. },
  98. getlist(){
  99. listResearch(this.queryParams).then(data=>{
  100. this.msgdata = data.rows
  101. })
  102. }
  103. },
  104. onShow(){
  105. this.getlist()
  106. }
  107. }
  108. </script>
  109. <style lang="scss">
  110. @import url("@/common/scss/core.scss");
  111. .commonlist-text{
  112. margin: 50rpx 20rpx 20rpx;
  113. }
  114. /deep/ checkbox.round .wx-checkbox-input,
  115. /deep/ checkbox.round .uni-checkbox-input {
  116. border-radius: 50%;
  117. width: 14px;
  118. height: 14px;
  119. }
  120. .slot-box {
  121. display: flex;
  122. flex-direction: row;
  123. align-items: center;
  124. }
  125. .slot-image {
  126. display: block;
  127. margin-right: 10px;
  128. width: 30px;
  129. }
  130. .slot-text {
  131. flex: 1;
  132. font-size: 13px;
  133. color: #000000;
  134. margin-right: 10px;
  135. .slot-text-msg{
  136. color: #8F8F94;
  137. font-size: 35rpx;
  138. .slot-text-msg-data{
  139. margin-right: 10px;
  140. font-size:20px ;
  141. }
  142. }
  143. }
  144. // .slot-box-checkbox{
  145. // }
  146. .slot-text-filename{
  147. font-size: 40rpx;
  148. border-bottom: 2px solid #c9c9cd;
  149. }
  150. .slot-text-btn{
  151. margin-top: 30rpx;
  152. display: flex;
  153. justify-content: space-around;
  154. button{
  155. width: 25%;
  156. font-size: 20rpx;
  157. color: white;
  158. background-color: blue;
  159. }
  160. }
  161. .tips-box{
  162. padding: 40rpx;
  163. position: fixed;
  164. top: 50%;
  165. left: 50%;
  166. transform: translate(-50%,-50%);
  167. // height: 100px;
  168. width: 70%;
  169. background-color: #fff;font-size: 40rpx;
  170. border-radius: 20px;
  171. text-align: center;
  172. .tips-btn{
  173. display: flex;
  174. justify-content: space-around;
  175. }
  176. // span{
  177. // margin-bottom: 50rpx;
  178. // line-height: 100rpx;
  179. // }
  180. button{
  181. background-color: blue;
  182. color: #fff;
  183. font-size: 35rpx;
  184. width: 30%;
  185. }
  186. }
  187. </style>