workspace.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <template>
  2. <view>
  3. <!-- 胶囊 -->
  4. <mvBar :mysNavConfig="mysNavConfig"></mvBar>
  5. <view style="height: 160rpx;width: 100%; position: fixed;background-color: #FFFFFF;top: 0;z-index: 8;">
  6. </view>
  7. <view class="menu">
  8. <view class="menu-item" @click="toShow1()">
  9. <p v-bind:class="showList1?'lor':''">待传脚本</p>
  10. </view>
  11. <view class="menu-item" @click="toShow2()">
  12. <p v-bind:class="showList2?'lor':''">待传初稿</p>
  13. </view>
  14. <view class="menu-item" @click="toShow3()">
  15. <p v-bind:class="showList3?'lor':''">待发布</p>
  16. </view>
  17. <view class="menu-item" @click="toShow4()">
  18. <p v-bind:class="showList4?'lor':''">待传数据</p>
  19. </view>
  20. </view>
  21. <view class="home" v-if="showList1">
  22. <view class="task" v-for="item in List1">
  23. <view @click="toDetail(item)">
  24. <view class="task-head">
  25. <view class="task-head-account">
  26. <image :src="item.platform_icon_url" style="height: 50rpx;width: 50rpx;"></image>
  27. <p style="margin-left: 20rpx;">{{item.platform_nick_name}}</p>
  28. </view>
  29. <view class="task-head-status">
  30. <p>{{item.task_stage_txt}}</p>
  31. </view>
  32. </view>
  33. <view class="task-info">
  34. <image :src="item.product_img_url" style="height: 120rpx;width: 120rpx;"></image>
  35. <p style="margin-left: 50rpx;">{{item.project_name}}</p>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="home" v-if="showList2">
  41. <view class="task" v-for="item in List2">
  42. <view @click="toDetail(item)">
  43. <view class="task-head">
  44. <view class="task-head-account">
  45. <image :src="item.platform_icon_url" style="height: 50rpx;width: 50rpx;"></image>
  46. <p style="margin-left: 20rpx;">{{item.platform_nick_name}}</p>
  47. </view>
  48. <view class="task-head-status">
  49. <p>{{item.task_stage_txt}}</p>
  50. </view>
  51. </view>
  52. <view class="task-info">
  53. <image :src="item.product_img_url" style="height: 120rpx;width: 120rpx;"></image>
  54. <p style="margin-left: 50rpx;">{{item.project_name}}</p>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. <view class="home" v-if="showList3">
  60. <view class="task" v-for="item in List3">
  61. <view @click="toDetail(item)">
  62. <view class="task-head">
  63. <view class="task-head-account">
  64. <image :src="item.platform_icon_url" style="height: 50rpx;width: 50rpx;"></image>
  65. <p style="margin-left: 20rpx;">{{item.platform_nick_name}}</p>
  66. </view>
  67. <view class="task-head-status">
  68. <p>{{item.task_stage_txt}}</p>
  69. </view>
  70. </view>
  71. <view class="task-info">
  72. <image :src="item.product_img_url" style="height: 120rpx;width: 120rpx;"></image>
  73. <p style="margin-left: 50rpx;">{{item.project_name}}</p>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. <view class="home" v-if="showList4">
  79. <view class="task" v-for="item in List4">
  80. <view @click="toDetail(item)">
  81. <view class="task-head">
  82. <view class="task-head-account">
  83. <image :src="item.platform_icon_url" style="height: 50rpx;width: 50rpx;"></image>
  84. <p style="margin-left: 20rpx;">{{item.platform_nick_name}}</p>
  85. </view>
  86. <view class="task-head-status">
  87. <p>{{item.task_stage_txt}}</p>
  88. </view>
  89. </view>
  90. <view class="task-info">
  91. <image :src="item.product_img_url" style="height: 120rpx;width: 120rpx;"></image>
  92. <p style="margin-left: 50rpx;">{{item.project_name}}</p>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. </template>
  99. <script>
  100. import mvBar from "@/components/mys_navBar/mysNavBar";
  101. export default {
  102. components: {
  103. mvBar,
  104. },
  105. data() {
  106. return {
  107. showList1: true,
  108. showList2: false,
  109. showList3: false,
  110. showList4: false,
  111. List1: [],
  112. List2: [],
  113. List3: [],
  114. List4: [],
  115. taskStageList: [],
  116. mysNavConfig: {
  117. /* 开启单页显示首页图标 */
  118. isHome: true,
  119. /* 固定导航 */
  120. navFixed: true,
  121. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  122. navTitle: {
  123. text: "工作台",
  124. color: "",
  125. fontSize: "32rpx", // px upx rpx
  126. fontWeight: "normal", // 100 - 700
  127. },
  128. },
  129. list: [{
  130. account: {
  131. platform: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/lQLPDhrXwll1_MsjI7CSK_6e62AG2AGOvh1HgAcA_35_35.png",
  132. nickname: "丸子在成都",
  133. },
  134. status: "待确认",
  135. mainphoto: "https://static1.paizi.com/uploadfile/2018/1013/20181013013207465.png",
  136. taskname: "醉码头火锅太古里店",
  137. }, {
  138. account: {
  139. platform: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/pingtai2.png",
  140. nickname: "成都的一颗丸子",
  141. },
  142. status: "待确认",
  143. mainphoto: "https://tse1-mm.cn.bing.net/th/id/R-C.978cb3a3b27875a0cc9d78a254b30b8f?rik=yrP2kNCtfQYEgQ&riu=http%3a%2f%2fnews.southcn.com%2fgd%2fcontent%2fimages%2fattachement%2fpng%2fsite4%2f20190917%2feca86b61fd551eeb23c507.png&ehk=xuWbgLrNmyhNJaByMZPJrX81PrzXrLHqHM%2fdYatFhrs%3d&risl=&pid=ImgRaw&r=0&sres=1&sresct=1",
  144. taskname: "奥运吉祥物冰墩墩盲盒",
  145. }],
  146. }
  147. },
  148. onShow() {
  149. this.isLogin()
  150. },
  151. methods: {
  152. // 判断登陆是否过期
  153. isLogin() {
  154. if (this.token == '') {
  155. this.token = uni.getStorageSync('token')
  156. }
  157. this.$https.get('/youngee/c/t/g/is-login')
  158. .then(res => {
  159. console.log(res)
  160. if (res.data.code == 403) {
  161. this.token = ""
  162. uni.clearStorage();
  163. uni.showModal({
  164. content: '请先登录',
  165. success: function(res) {
  166. uni.navigateTo({
  167. url: '../login/login'
  168. });
  169. }
  170. });
  171. } else {
  172. uni.showLoading({
  173. title: '加载中'
  174. });
  175. this.getInfoTable();
  176. }
  177. })
  178. },
  179. getInfoTable() {
  180. this.$https.get('/youngee/c/g/get-info-tables')
  181. .then(res => {
  182. console.log(res)
  183. this.taskStageList = res.data.data.TaskStage
  184. this.getList()
  185. })
  186. },
  187. getList() {
  188. console.log("run func getList")
  189. this.$https.get('/youngee/c/t/g/get-task-exe-list').then(res => {
  190. console.log(res)
  191. this.List1 = res.data.data.list1
  192. this.List2 = res.data.data.list2
  193. this.List3 = res.data.data.list3
  194. this.List4 = res.data.data.list4
  195. if (this.List1 != null) {
  196. for (let i = 0; i < this.List1.length; ++i) {
  197. for (let j = 0; j < this.taskStageList.length; ++j) {
  198. if (this.List1[i].task_stage == this.taskStageList[j].task_stage_id)
  199. this.List1[i].task_stage_txt = this.taskStageList[j].task_stage
  200. }
  201. }
  202. }
  203. if (this.List2 != null) {
  204. for (let i = 0; i < this.List2.length; ++i) {
  205. for (let j = 0; j < this.taskStageList.length; ++j) {
  206. if (this.List2[i].task_stage == this.taskStageList[j].task_stage_id)
  207. this.List2[i].task_stage_txt = this.taskStageList[j].task_stage
  208. }
  209. }
  210. }
  211. if (this.List3 != null) {
  212. for (let i = 0; i < this.List3.length; ++i) {
  213. for (let j = 0; j < this.taskStageList.length; ++j) {
  214. if (this.List3[i].task_stage == this.taskStageList[j].task_stage_id)
  215. this.List3[i].task_stage_txt = this.taskStageList[j].task_stage
  216. }
  217. }
  218. }
  219. if (this.List4 != null) {
  220. for (let i = 0; i < this.List4.length; ++i) {
  221. for (let j = 0; j < this.taskStageList.length; ++j) {
  222. if (this.List4[i].task_stage == this.taskStageList[j].task_stage_id)
  223. this.List4[i].task_stage_txt = this.taskStageList[j].task_stage
  224. }
  225. }
  226. }
  227. uni.hideLoading();
  228. })
  229. },
  230. toShow1() {
  231. this.showList2 = false;
  232. this.showList3 = false;
  233. this.showList4 = false;
  234. this.showList1 = true;
  235. },
  236. toShow2() {
  237. this.showList1 = false;
  238. this.showList3 = false;
  239. this.showList4 = false;
  240. this.showList2 = true;
  241. },
  242. toShow3() {
  243. this.showList2 = false;
  244. this.showList1 = false;
  245. this.showList4 = false;
  246. this.showList3 = true;
  247. },
  248. toShow4() {
  249. this.showList2 = false;
  250. this.showList1 = false;
  251. this.showList3 = false;
  252. this.showList4 = true;
  253. },
  254. toDetail(item) {
  255. uni.navigateTo({
  256. url: '/pages/workspace/taskdetail?taskId=' + item.task_id,
  257. success(res) {
  258. console.log(res);
  259. },
  260. fail(err) {
  261. console.log(err);
  262. }
  263. });
  264. },
  265. }
  266. }
  267. </script>
  268. <style lang="scss" scoped>
  269. view {
  270. font-size: 14px;
  271. line-height: inherit;
  272. }
  273. .menu {
  274. position: fixed;
  275. top: 160rpx;
  276. border-bottom: #FCCF41;
  277. background-color: #FFFFFF;
  278. justify-content: space-around;
  279. height: 5%;
  280. width: 100%;
  281. display: flex;
  282. z-index: 10;
  283. }
  284. .menu-item p {
  285. font-weight: 600;
  286. &.lor {
  287. border-bottom: 5rpx solid #F0D232;
  288. color: #F0D232;
  289. padding-bottom: 15rpx;
  290. }
  291. }
  292. .home {
  293. margin-top: 100rpx;
  294. }
  295. .task {
  296. margin-bottom: 20rpx;
  297. border-bottom: 1rpx #d7d7d7 solid;
  298. .task-head {
  299. display: flex;
  300. justify-content: space-between;
  301. align-items: center;
  302. padding: 10rpx 20rpx;
  303. .task-head-account {
  304. display: flex;
  305. }
  306. .task-head-status {
  307. color: red;
  308. }
  309. }
  310. .task-info {
  311. display: flex;
  312. align-items: center;
  313. padding: 10rpx 20rpx;
  314. }
  315. }
  316. .line {
  317. border-bottom: 1rpx #AAAAAA solid;
  318. }
  319. </style>