detail.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. <template>
  2. <view class="content-box">
  3. <view class="title">
  4. <view class="logo">
  5. <!-- <image :src="globalUrl + company.pic_url" alt="" class="logo-img" mode="aspectFit"/> -->
  6. <image src="/static/nodata.svg" alt="" class="logo-img" mode="aspectFit"/>
  7. </view>
  8. <view class="name">
  9. {{ itemObj.name || '-'}}
  10. </view>
  11. </view>
  12. <view class="uni-list title-date-box">
  13. <view class="uni-list-cell">
  14. <view class="uni-list-cell-db display-flex-start">
  15. <picker mode="date" fields="year" @change="bindDateChange" class="picker-class">
  16. <view class="uni-input display-between items-center">{{dateYear}}年<image src="/static/arrow_down.svg" mode="aspectFit"></image></view>
  17. </picker>
  18. <view style="font-size: 26rpx;margin-left: 20rpx;">1月~ </view>
  19. <picker :range="arrayMonth" :value="dateMonth" @change="bindDateMonthChange" class="picker-class">
  20. <view class="uni-input display-between items-center" style="color: #707070;">{{dateMonth}}月<image src="/static/calendar_icon.svg" mode="aspectFit"></image></view>
  21. </picker>
  22. </view>
  23. </view>
  24. </view>
  25. <qiun-title-bar title="工业产值(亿元)"/>
  26. <view class="charts-box">
  27. <qiun-data-charts type="line" :chartData="chartData" background="#4C4C4C"/>
  28. </view>
  29. <view class="item-list">
  30. <view class="term">
  31. <view class="term-name">法定代表人:</view>
  32. <view class="term-value-group">
  33. <p class="term-value-item">{{ itemObj.representative || "-" }}</p>
  34. </view>
  35. </view>
  36. <view class="term">
  37. <view class="term-name">成立日期:</view>
  38. <view class="term-value-group">
  39. <p class="term-value-item">{{ itemObj.found_date || "-" }}</p>
  40. </view>
  41. </view>
  42. <view class="term">
  43. <view class="term-name">注册资本:</view>
  44. <view class="term-value-group">
  45. <p class="term-value-item">{{ itemObj.capital || "-" }}</p>
  46. </view>
  47. </view>
  48. <view class="term">
  49. <view class="term-name">规上工业企业:</view>
  50. <view class="term-value-group">
  51. <p class="term-value-item">{{ highType[itemObj.high_tech] || "-" }}</p>
  52. </view>
  53. </view>
  54. <view class="term">
  55. <view class="term-name">先进制造业:</view>
  56. <view class="term-value-group">
  57. <p class="term-value-item">
  58. {{ advancedType[itemObj.advanced] || "-" }}
  59. </p>
  60. </view>
  61. </view>
  62. <view class="term">
  63. <view class="term-name">亩均排序:</view>
  64. <view class="term-value-group">
  65. <p class="term-value-item">{{ itemObj.aera_order || "-" }}</p>
  66. </view>
  67. </view>
  68. <view class="term">
  69. <view class="term-name">规上评定时间:</view>
  70. <view class="term-value-group">
  71. <p class="term-value-item">{{ itemObj.advanced_update_time || "-" }}</p>
  72. </view>
  73. </view>
  74. <view class="term">
  75. <view class="term-name">经营地址:</view>
  76. <view class="term-value-group">
  77. <p class="term-value-item">{{ itemObj.rigiser_address || "-" }}</p>
  78. </view>
  79. </view>
  80. <view class="term">
  81. <view class="term-name">累计研发投入费用:</view>
  82. <view class="term-value-group">
  83. <p class="term-value-item">{{ itemObj.insure_count || "-" }}</p>
  84. </view>
  85. </view>
  86. <view class="term">
  87. <view class="term-name">本年度生产总值:</view>
  88. <view class="term-value-group">
  89. <p class="term-value-item">{{ itemObj.industry_money || "-" }}</p>
  90. </view>
  91. </view>
  92. <view class="term">
  93. <view class="term-name">本年度工业产值增速:</view>
  94. <view class="term-value-group">
  95. <p class="term-value-item">{{ itemObj.increase_ratio || "-" }}</p>
  96. </view>
  97. </view>
  98. </view>
  99. </view>
  100. </template>
  101. <script>
  102. import md5 from "@/common/md5.js";
  103. export default {
  104. data() {
  105. return{
  106. dateYear:new Date().getFullYear(),
  107. dateMonth:new Date().getMonth() + 1,
  108. arrayMonth:["1", "2","3", "4","5", "6","7", "8","9", "10","11", "12"],
  109. chartData:{
  110. "categories": ["1月", "2月","3月", "4月","5月", "6月","7月", "8月","9月", "10月","11月", "12月"],
  111. "series": [
  112. {name: "本年度",data: [15,10,16,23,21,36,25,7,18,29,33,12]},
  113. ]
  114. },
  115. itemObj:{},
  116. advancedType:{
  117. '0':'是',
  118. '1':'否'
  119. },
  120. highType:{
  121. '0':'是',
  122. '1':'否'
  123. },
  124. nowId:''
  125. }
  126. },
  127. onLoad(option) {
  128. this.nowId = option.id;
  129. this.getCompanyInfo(this.dateYear,this.dateMonth,option.id)
  130. },
  131. methods:{
  132. bindDateChange(e){
  133. this.dateYear = e.target.value
  134. this.getCompanyInfo(this.dateYear,this.dateMonth,this.nowId)
  135. },
  136. bindDateMonthChange(e){
  137. this.dateMonth = this.arrayMonth[e.target.value]
  138. this.getCompanyInfo(this.dateYear,this.dateMonth,this.nowId)
  139. },
  140. getCompanyInfo(y,m,ids) {
  141. let md5Sign = md5(
  142. "method=" +
  143. "stat" +
  144. "&timestamp=" +
  145. getApp().globalData.globalTimestamp +
  146. "&secret=" +
  147. getApp().globalData.secret
  148. );
  149. let url =
  150. getApp().globalData.shareUrl +
  151. "api/api.php" +
  152. "?method=stat&action=company_by_id&timestamp=" +
  153. getApp().globalData.globalTimestamp +
  154. "&sign=" +
  155. md5Sign;
  156. let postData = {
  157. year : y,
  158. month: m,
  159. id: ids
  160. };
  161. uni.request({
  162. url: url,
  163. method: "POST",
  164. header: {
  165. "content-type": "application/x-www-form-urlencoded",
  166. },
  167. data: postData,
  168. success: (res) => {
  169. if (res.data.code === 200) {
  170. this.itemObj = res.data.data;
  171. }
  172. },
  173. fail: () => {
  174. console.log("连接失败");
  175. },
  176. });
  177. },
  178. }
  179. };
  180. </script>
  181. <style lang="scss">
  182. .content-box {
  183. display: flex;
  184. flex-direction: column;
  185. flex: 1;
  186. }
  187. .charts-box-title{
  188. width: 100%;
  189. height: 100rpx;
  190. }
  191. .charts-box {
  192. width: 100%;
  193. height: 600rpx;
  194. }
  195. .title-date-box {
  196. margin-top: 10px;
  197. border-bottom: 1px solid #d7d7d7;
  198. padding-bottom: 10px;
  199. }
  200. .picker-class {
  201. border-radius: 10rpx;
  202. padding: 10rpx;
  203. width: 180rpx;
  204. font-size: 28rpx;
  205. background: #f5f5f5;
  206. margin-left: 20rpx;
  207. }
  208. .picker-class image {
  209. width: 26rpx;
  210. height: 26rpx;
  211. }
  212. .title {
  213. display: flex;
  214. align-items: center;
  215. .logo {
  216. margin-right: 30rpx;
  217. display: flex;
  218. justify-content: center;
  219. align-items: center;
  220. overflow: hidden;
  221. width: 150rpx;
  222. height: 100rpx;
  223. overflow: hidden;
  224. .logo-img {
  225. max-width: 100%;
  226. max-height: 100%;
  227. }
  228. }
  229. }
  230. .item-list {
  231. margin-left: 20rpx;
  232. display: flex;
  233. flex-direction: column;
  234. .term {
  235. display: flex;
  236. .term-name {
  237. font-size: 28rpx;
  238. width: 30%;
  239. display: flex;
  240. margin: 20rpx;
  241. color: #7f7f7f;
  242. }
  243. .term-value-group {
  244. flex: 1;
  245. display: flex;
  246. flex-direction: column;
  247. font-size: 28rpx;
  248. .term-value-item {
  249. margin: 20rpx;
  250. }
  251. .flex_i {
  252. display: flex;
  253. flex-flow: row;
  254. justify-content: space-around;
  255. }
  256. }
  257. }
  258. }
  259. </style>