detail.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  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">{{ standard_sized[itemObj.standard_sized] || "-" }}</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.standard_sized_date || "-" }}</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.value_last_year || "-" }} 万元</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. "categories":[],
  112. "series": [
  113. {name: "本年度",data: [],textSize:'10'},
  114. ]
  115. },
  116. itemObj:{},
  117. advancedType:{
  118. '0':'否',
  119. '1':'是'
  120. },
  121. highType:{
  122. '0':'否',
  123. '1':'是'
  124. },
  125. standard_sized:{
  126. '0':'否',
  127. '1':'是'
  128. },
  129. nowId:''
  130. }
  131. },
  132. onLoad(option) {
  133. this.nowId = option.id;
  134. this.dateYear = Number(option.year);
  135. this.dateMonth = Number(option.month);
  136. this.getCompanyInfo(this.dateYear,this.dateMonth,option.id)
  137. },
  138. methods:{
  139. bindDateChange(e){
  140. this.dateYear = e.target.value
  141. this.getCompanyInfo(this.dateYear,this.dateMonth,this.nowId)
  142. },
  143. bindDateMonthChange(e){
  144. this.dateMonth = this.arrayMonth[e.target.value]
  145. this.getCompanyInfo(this.dateYear,this.dateMonth,this.nowId)
  146. },
  147. getCompanyInfo(y,m,ids) {
  148. let md5Sign = md5(
  149. "method=" +
  150. "stat" +
  151. "&timestamp=" +
  152. getApp().globalData.globalTimestamp +
  153. "&secret=" +
  154. getApp().globalData.secret
  155. );
  156. let url =
  157. getApp().globalData.shareUrl +
  158. "api/api.php" +
  159. "?method=stat&action=company_by_id&timestamp=" +
  160. getApp().globalData.globalTimestamp +
  161. "&sign=" +
  162. md5Sign;
  163. let postData = {
  164. year : y,
  165. month: m,
  166. id: ids
  167. };
  168. uni.request({
  169. url: url,
  170. method: "POST",
  171. header: {
  172. "content-type": "application/x-www-form-urlencoded",
  173. },
  174. data: postData,
  175. success: (res) => {
  176. if (res.data.code === 200) {
  177. this.itemObj = res.data.data;
  178. let chartList = res.data.data.month_list;
  179. let chartCategories = [], chartData = [];
  180. if(chartList.length){
  181. chartList.forEach((item)=>{
  182. chartCategories.push(item.month + '月')
  183. chartData.push(item.balance)
  184. })
  185. this.chartData.categories = chartCategories;
  186. this.chartData.series[0].data = chartData;
  187. }
  188. }
  189. },
  190. fail: () => {
  191. console.log("连接失败");
  192. },
  193. });
  194. },
  195. }
  196. };
  197. </script>
  198. <style lang="scss">
  199. .content-box {
  200. display: flex;
  201. flex-direction: column;
  202. flex: 1;
  203. }
  204. .charts-box-title{
  205. width: 100%;
  206. height: 100rpx;
  207. }
  208. .charts-box {
  209. width: 100%;
  210. height: 600rpx;
  211. }
  212. .title-date-box {
  213. margin-top: 10px;
  214. border-bottom: 1px solid #d7d7d7;
  215. padding-bottom: 10px;
  216. }
  217. .picker-class {
  218. border-radius: 10rpx;
  219. padding: 10rpx;
  220. width: 180rpx;
  221. font-size: 28rpx;
  222. background: #f5f5f5;
  223. margin-left: 20rpx;
  224. }
  225. .picker-class image {
  226. width: 26rpx;
  227. height: 26rpx;
  228. }
  229. .title {
  230. display: flex;
  231. align-items: center;
  232. .logo {
  233. margin-right: 30rpx;
  234. display: flex;
  235. justify-content: center;
  236. align-items: center;
  237. overflow: hidden;
  238. width: 150rpx;
  239. height: 100rpx;
  240. overflow: hidden;
  241. .logo-img {
  242. max-width: 100%;
  243. max-height: 100%;
  244. }
  245. }
  246. }
  247. .item-list {
  248. margin-left: 20rpx;
  249. display: flex;
  250. flex-direction: column;
  251. .term {
  252. display: flex;
  253. .term-name {
  254. font-size: 28rpx;
  255. width: 30%;
  256. display: flex;
  257. margin: 20rpx;
  258. color: #7f7f7f;
  259. }
  260. .term-value-group {
  261. flex: 1;
  262. display: flex;
  263. flex-direction: column;
  264. font-size: 28rpx;
  265. .term-value-item {
  266. margin: 20rpx;
  267. }
  268. .flex_i {
  269. display: flex;
  270. flex-flow: row;
  271. justify-content: space-around;
  272. }
  273. }
  274. }
  275. }
  276. </style>