projectX.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <template>
  2. <view class="content">
  3. <view class="param">
  4. <view class="proName">项目标题</view>
  5. <view class="prolittle">{{data.projectName}}</view>
  6. <view class="proMiao">项目描述</view>
  7. <view class="prolittle">{{data.projectContent}}</view>
  8. <view class="proMiao">附件</view>
  9. <view class="prolittle" v-for="(item,index) in fileList2">
  10. <view style="color: rgba(0, 97, 255, 1);" @click="navigateToTU(item.name)">{{item.name}}</view>
  11. </view>
  12. <!-- <view class="upload-img">
  13. <uni-file-picker limit="3"
  14. @select='selectUpload'
  15. :auto-upload='false'
  16. file-extname='pdf,docx,xlsx,'
  17. file-mediatype="all"
  18. @success='uploadSuccess'
  19. @fail='uploadFail'
  20. :list-styles='listStyles'
  21. v-model='fileList2'
  22. ></uni-file-picker>
  23. </view> -->
  24. <view class="proMiao">主办单位</view>
  25. <view class="prolittle">{{data.organize}}</view>
  26. <view class="proMiao">协办单位</view>
  27. <view class="prolittle">{{data.coOrganize}}</view>
  28. <view class="proMiao">项目级别</view>
  29. <view class="prolittle">{{data.projectLevel}}</view>
  30. <view class="proMiao">项目来源</view>
  31. <view class="prolittle">{{data.projectFrom}}</view>
  32. <view class="proMiao jindu">完成进度</view>
  33. <view class="weidu">维度权重40%</view>
  34. <view class="addRen" @click="addRen">新增任务</view>
  35. <!-- 任务列表 -->
  36. <view style="width: 100%;margin: 50rpx 0 0 20rpx;">
  37. <view class="renwu" v-for="(item,index) in renwu" :key="index">
  38. <view>{{item.taskName}}</view>
  39. <view>{{item.createTime}}</view>
  40. <view style="display: flex;">
  41. <view class="renwu-bu bianji">编辑</view>
  42. <view class="renwu-bu delete">删除</view>
  43. </view>
  44. </view>
  45. </view>
  46. <view style="width: 100%;margin: 50rpx 0 0 20rpx;">
  47. <view class="renwu" v-for="(item,index) in renwu" :key="index">
  48. <view>{{item.taskName}}</view>
  49. <view>{{item.createTime}}</view>
  50. <view>30%</view>
  51. <view>{{item.scoreLimit}}</view>
  52. <view style="color: rgba(0, 97, 255, 1);">更新进度</view>
  53. </view>
  54. </view>
  55. <view class="proMiao jindu" v-if="data.progress>0">进度详情</view>
  56. <!-- 进度 -->
  57. <view style="margin: 33rpx 0 0 19rpx;">
  58. <view v-for="(item,index) in rizhi" :key="index" class="jindu-kuang">
  59. <view style="display: flex;">
  60. <view class="jindu-circle"></view>
  61. <view>
  62. <view style="width: 600rpx;display: flex;justify-content: space-between;margin-top: 20rpx;">
  63. <view style="display: flex;">
  64. <view style="margin-left: 28rpx;">{{item.createBy}}</view>
  65. <view class="jindu-type lixiang">{{item.content}}</view>
  66. </view>
  67. <!-- <view class="jindu-type cuiban">已催办</view>
  68. <view class="jindu-type tijiao">已提交</view> -->
  69. <view>{{item.createTime}}</view>
  70. </view>
  71. <view style="margin:7rpx 0 0 28rpx;">项目名:{{item.projectName}}</view>
  72. <!-- <view style="margin:7rpx 0 0 28rpx;">任务指派:xxx,xxx,xxx</view>
  73. <view style="margin:7rpx 0 0 28rpx;">任务指派:xxx,xxx,xxx</view>
  74. <view style="margin:7rpx 0 0 28rpx;">任务指派:xxx,xxx,xxx</view> -->
  75. </view>
  76. </view>
  77. <view class="jindu-line" v-if="index<(rizhi.length-1)"></view>
  78. </view>
  79. </view>
  80. <view style="width: 100%;height: 60rpx;"></view>
  81. </view>
  82. </view>
  83. </template>
  84. <script>
  85. export default {
  86. data() {
  87. return {
  88. data:{},
  89. fileList2: [],
  90. fileList22:'',
  91. listStyles: {
  92. "borderStyle": {
  93. "width": "0", // 边框宽度
  94. },
  95. "border": false, // 是否显示边框
  96. "dividline": false
  97. },
  98. renwu:[],
  99. rizhi:[],//日志
  100. }
  101. },
  102. onLoad(option) {
  103. console.log(JSON.parse(decodeURIComponent(option.data)))
  104. this.data=JSON.parse(decodeURIComponent(option.data))
  105. var image=[]
  106. image=this.data.fileUrl.split(',')
  107. this.fileList2 =image.map(item =>{
  108. return {
  109. name: item
  110. }
  111. })
  112. this.fileList22=image.join(",")
  113. console.log(this.fileList2)
  114. this.getRenwu()
  115. this.getRizhi()
  116. },
  117. methods: {
  118. change(e) {
  119. console.log("e:", e);
  120. },
  121. //跳转页面
  122. navigateToTU(url) {
  123. window.location.href = url;
  124. },
  125. //新增任务
  126. addRen(){
  127. uni.navigateTo({
  128. url:'/pages/project/addRenwu?proId='+this.data.id
  129. })
  130. },
  131. // 查找任务
  132. getRenwu(){
  133. let that = this
  134. that.renwu=[]
  135. uni.showLoading({
  136. title: '加载中',
  137. mask: true, // 是否显示透明蒙层,防止触摸穿透
  138. });
  139. var data={
  140. "projectId": that.data.id
  141. }
  142. that.$Request.postT('/api/sysTask/queryTaskByProject',data).then(res => {
  143. if (res.code==200) {
  144. that.renwu=res.data
  145. console.log(that.renwu,'任务')
  146. }
  147. uni.hideLoading();
  148. });
  149. },
  150. //项目日志
  151. getRizhi(){
  152. let that = this
  153. that.rizhi=[]
  154. uni.showLoading({
  155. title: '加载中',
  156. mask: true, // 是否显示透明蒙层,防止触摸穿透
  157. });
  158. var data={
  159. "projectId": that.data.id
  160. }
  161. that.$Request.postT('/api/sysProject/queryLogs',data).then(res => {
  162. if (res.code==200) {
  163. that.rizhi=res.data
  164. console.log(that.rizhi,'日志')
  165. }
  166. uni.hideLoading();
  167. });
  168. }
  169. }
  170. }
  171. </script>
  172. <style>
  173. .content {
  174. display: flex;
  175. flex-direction: column;
  176. align-items: center;
  177. justify-content: center;
  178. }
  179. .param{
  180. margin: 20rpx 0 0 0;
  181. width: 100%;
  182. background-color: rgba(255, 255, 255, 1);
  183. font-size: 28rpx;
  184. font-weight: 400;
  185. line-height: 41rpx;
  186. color: rgba(0, 0, 0, 1);
  187. }
  188. .proName{
  189. margin: 23rpx 0 0 20rpx;
  190. }
  191. .prolittle{
  192. margin: 5rpx 0 0 20rpx;
  193. width: 710rpx;
  194. }
  195. .proINname{
  196. margin: 25rpx 0 0 21rpx;
  197. width: 709rpx;
  198. height: 90rpx;
  199. border-radius: 13rpx;
  200. background: rgba(245, 248, 252, 1);
  201. border: 1rpx solid rgba(229, 229, 229, 1);
  202. font-size: 28rpx;
  203. line-height: 90rpx;
  204. color: rgba(179, 179, 179, 1);
  205. }
  206. .proIMi{
  207. height: 315rpx;
  208. }
  209. .proMiao{
  210. margin: 31rpx 0 0 20rpx;
  211. }
  212. /* 上传附件 */
  213. .upload-img{
  214. /* width: 200rpx;
  215. height: 80rpx;
  216. opacity: 1;
  217. border-radius: 13rpx;
  218. background: rgba(0, 97, 255, 0.1);
  219. border: 1rpx solid rgba(0, 97, 255, 1); */
  220. }
  221. .jindu{
  222. font-size: 32rpx;
  223. font-weight: 500;
  224. line-height: 46rpx;
  225. }
  226. /* 进度 */
  227. .jindu-kuang{
  228. font-size: 24rpx;
  229. line-height: 35rpx;
  230. color: rgba(128, 128, 128, 1);
  231. }
  232. .jindu-circle{
  233. margin-top: 10rpx;
  234. width: 100rpx;
  235. height: 100rpx;
  236. border-radius: 50%;
  237. opacity: 1;
  238. background-color:rgba(204, 204, 204, 1);
  239. }
  240. .jindu-type{
  241. width: 103rpx;
  242. height: 40rpx;
  243. border-radius: 71rpx;
  244. font-size: 24rpx;
  245. line-height: 40rpx;
  246. color: rgba(255, 255, 255, 1);
  247. text-align: center;
  248. margin: 0 0 0 20rpx;
  249. }
  250. .lixiang{
  251. background: linear-gradient(90deg, rgba(54, 111, 255, 1) 0%, rgba(93, 160, 252, 1) 100%);
  252. }
  253. .cuiban{
  254. background: linear-gradient(90deg, rgba(57, 167, 139, 1) 0%, rgba(126, 224, 203, 1) 100%);
  255. }
  256. .tijiao{
  257. background: linear-gradient(90deg, rgba(255, 112, 69, 1) 0%, rgba(247, 161, 114, 1) 100%);
  258. }
  259. .jindu-line{
  260. width: 4rpx;
  261. height: 100rpx;
  262. background-color: rgba(166, 166, 166, 1);
  263. }
  264. .weidu{
  265. margin: 7rpx 0 0 20rpx;
  266. font-size: 24rpx;
  267. line-height: 35rpx;
  268. color: rgba(128, 128, 128, 1);
  269. }
  270. .addRen{
  271. margin: -80rpx 0 0 581rpx;
  272. width: 149rpx;
  273. height: 59rpx;
  274. border-radius: 92rpx;
  275. background: rgba(0, 97, 255, 1);
  276. font-size: 28rpx;
  277. line-height: 59rpx;
  278. color: rgba(255, 255, 255, 1);
  279. text-align: center;
  280. }
  281. /* 任务列表 */
  282. .renwu{
  283. display: flex;
  284. margin-top: 6rpx;
  285. width: 709rpx;
  286. height: 90rpx;
  287. border-radius: 13rpx;
  288. background: rgba(245, 248, 252, 1);
  289. border: 1rpx solid rgba(229, 229, 229, 1);
  290. font-size: 28rpx;
  291. justify-content: space-evenly;
  292. align-items: center;
  293. }
  294. .renwu-bu{
  295. width: 105rpx;
  296. height: 50rpx;
  297. border-radius: 110rpx;
  298. line-height:50rpx;
  299. text-align: center;
  300. }
  301. .bianji{
  302. border: 1rpx solid rgba(0, 97, 255, 1);
  303. color: rgba(0, 97, 255, 1);
  304. }
  305. .delete{
  306. margin-left: 20rpx;
  307. border: 1rpx solid rgba(212, 48, 48, 1);
  308. color: rgba(212, 48, 48, 1);
  309. }
  310. .project{
  311. display: flex;
  312. margin: 61rpx 0 0 0;
  313. justify-content: space-evenly;
  314. }
  315. .butt{
  316. width: 330rpx;
  317. height: 90rpx;
  318. border-radius: 117rpx;
  319. font-size: 32rpx;
  320. line-height: 90rpx;
  321. text-align: center;
  322. }
  323. .quxiao{
  324. border: 1rpx solid rgba(0, 97, 255, 1);
  325. color: rgba(0, 97, 255, 1);
  326. }
  327. .queren{
  328. background: rgba(0, 97, 255, 1);
  329. color: rgba(255, 255, 255, 1);
  330. }
  331. </style>