project.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  1. <template>
  2. <view class="m_right">
  3. <!-- <img src="@/assets/home/homeBG.jpg" class="s_logo" mode=""></img> -->
  4. <view class="m_right_container">
  5. <view class="m_row_class">
  6. <view class="m_row">
  7. <view class="m_row_link"></view>
  8. <view class="m_row_title" v-text="'项目管理'"></view>
  9. <view style="position: relative;margin-left: 40rpx;">
  10. <div class="triangle_border_down">
  11. <span></span>
  12. </div>
  13. </view>
  14. </view>
  15. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  16. <thead class="m-table-hander">
  17. <tr>
  18. <th>名称</th>
  19. <th>类型</th>
  20. <th>介绍</th>
  21. <th>创始人</th>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. <tr v-for="(item,index) in projectData" :key="index">
  26. <th>{{item.ProjectName}}</th>
  27. <th>{{item.Type}}</th>
  28. <th style="position: relative;"><button type="default" size="mini" @click="viewIntro(item)" class="m_edit">简介</button></th>
  29. <th>{{item.CreateUserName}}</th>
  30. </tr>
  31. </tbody>
  32. </table>
  33. </view>
  34. <view class="m_row_class">
  35. <view class="" style="display: flex;justify-content: space-between;">
  36. <view class="m_row">
  37. <view class="m_row_link">
  38. </view>
  39. <view class="m_row_title" v-text="'文件管理'">
  40. </view>
  41. <view style="position: relative;margin-left: 40rpx;">
  42. <div class="triangle_border_down">
  43. <span></span>
  44. </div>
  45. </view>
  46. </view>
  47. </view>
  48. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  49. <thead class="m-table-hander">
  50. <tr>
  51. <th>文件</th>
  52. <th>文件名</th>
  53. <th>文件类型</th>
  54. <th>上传人</th>
  55. <th>上传日期</th>
  56. <th>下载</th>
  57. <th>审核状态</th>
  58. </tr>
  59. </thead>
  60. <tbody>
  61. <tr v-for="(item,index) in fileData" :key="index">
  62. <th>{{index+1}}</th>
  63. <th>{{item.Name}}</th>
  64. <th>{{item.Type}}</th>
  65. <th>{{item.UploadUserName}}</th>
  66. <th>{{item.UPloadTime.substring(0,9)}}</th>
  67. <th style="position: relative;"><button type="default" size="mini" @click="download(index,item)" class="m_edit_1">下载</button></th>
  68. <th>{{getShenheText(item.Pass)}}</th>
  69. </tr>
  70. </tbody>
  71. </table>
  72. </view>
  73. <view class="m_row_class">
  74. <view class="" style="display: flex;justify-content: space-between;">
  75. <view class="m_row">
  76. <view class="m_row_link">
  77. </view>
  78. <view class="m_row_title" v-text="'成员信息'">
  79. </view>
  80. <view style="position: relative;margin-left: 40rpx;">
  81. <div class="triangle_border_down">
  82. <span></span>
  83. </div>
  84. </view>
  85. </view>
  86. </view>
  87. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  88. <thead class="m-table-hander">
  89. <tr>
  90. <th>用户名</th>
  91. <th>姓名</th>
  92. <th>专业</th>
  93. <th>班级</th>
  94. <th>职务</th>
  95. <th>电话</th>
  96. </tr>
  97. </thead>
  98. <tbody>
  99. <tr v-for="(item,index) in projectMembers" :key="index">
  100. <th>{{item.User.IlabAccount}}</th>
  101. <th>{{item.User.Name}}</th>
  102. <th>{{item.User.Profession}}</th>
  103. <th>{{item.User.Class}}</th>
  104. <th>
  105. <div>
  106. {{item.User.Type}}
  107. </div>
  108. </th>
  109. <th>{{item.User.PhoneNum}}</th>
  110. </tr>
  111. </tbody>
  112. </table>
  113. </view>
  114. </view>
  115. </view>
  116. </template>
  117. <script>
  118. export default {
  119. name: "home_project",
  120. data() {
  121. return {
  122. index: 1,
  123. title: "",
  124. show: false,
  125. auditshow: false,
  126. callback: "",
  127. arr: [],
  128. data: [],
  129. projectData: [],
  130. ProjectItem: [],
  131. fileData: [],
  132. projectMembers: [],
  133. }
  134. },
  135. components: {
  136. },
  137. methods: {
  138. stopPenetrate(){
  139. return;
  140. },
  141. paging(obj) {
  142. this.index = obj;
  143. },
  144. viewIntro(item){
  145. uni.showModal({
  146. title: '简介',
  147. showCancel: false,
  148. content: item.Describe,
  149. success: function (res) {
  150. if (res.confirm) {
  151. console.log('确定');
  152. } else if (res.cancel) {
  153. console.log('取消');
  154. }
  155. }
  156. });
  157. },
  158. //审核状态中文
  159. getShenheText(pass){
  160. let t = "成功"
  161. if (pass == false) {
  162. t = "失败"
  163. }
  164. return t
  165. },
  166. download(index,item) {
  167. // window.location.href = item.URL;
  168. window.open(item.URL);
  169. },
  170. getlist() {
  171. uni.request({
  172. url: mydata_api + "/project/getprojectcontent",
  173. data: {
  174. "UserID": mydata_userInfo.UserID,
  175. "ProjectID": this.projectData[0].Id
  176. },
  177. method: "POST",
  178. dataType: "json",
  179. success: res => {
  180. if (res.data.Code == 100) {
  181. // this.projectData[0] = null
  182. this.projectData[0] = res.data.Project;
  183. // console.log('projectData=',this.projectData[0])
  184. this.$forceUpdate()
  185. }
  186. // console.log("获取了什么样子的信息", this.projectData[0]);
  187. }
  188. })
  189. },
  190. getFileList() {
  191. uni.request({
  192. url: mydata_api + "/project/getprojectcontent",
  193. data: {
  194. "UserID": mydata_userInfo.UserID,
  195. "ProjectID": this.projectData[0].Id
  196. },
  197. method: "POST",
  198. dataType: "json",
  199. success: res => {
  200. this.fileData = res.data.ProjectItem;
  201. // console.log('this.fileData=',this.fileData)
  202. }
  203. })
  204. },
  205. viewProject(obj, index) {
  206. // console.log('进来的什么信息',obj)
  207. this.projectData = [obj];
  208. if(index==0){
  209. this.fileData = [
  210. {
  211. "AliyunOssName": "_59458299-3b84-4895-98f6-b990cdaedc72_chrome_elf.dll",
  212. "Id": "0b0d8876-71de-43e6-a3dd-59a3c8f6d069",
  213. "Name": "《火星计划》气氛图",
  214. "Pass": false,
  215. "ProjectID": 30,
  216. "ProjectName": "《火星计划》",
  217. "Type": "气氛图",
  218. "UPloadTime": "2021-05-13 18:19:12",
  219. "URL": "https://www.yuyekeji.cn/H5/ZhongChuang/《火星计划》气氛图.jpeg",
  220. "UpLoadUserID": "59458299-3b84-4895-98f6-b990cdaedc72",
  221. "UploadUserDuty": "创建人",
  222. "UploadUserName": "朱峰",
  223. },
  224. {
  225. "AliyunOssName": "_59458299-3b84-4895-98f6-b990cdaedc72_chrome_elf.dll",
  226. "Id": "0b0d8876-71de-43e6-a3dd-59a3c8f6d069",
  227. "Name": "《火星计划》气氛图2",
  228. "Pass": false,
  229. "ProjectID": 30,
  230. "ProjectName": "《火星计划》",
  231. "Type": "气氛图",
  232. "UPloadTime": "2021-05-13 18:19:12",
  233. "URL": "https://www.yuyekeji.cn/H5/ZhongChuang/《火星计划》气氛图2.jpg",
  234. "UpLoadUserID": "59458299-3b84-4895-98f6-b990cdaedc72",
  235. "UploadUserDuty": "创建人",
  236. "UploadUserName": "朱峰",
  237. }
  238. ]
  239. return;
  240. }
  241. this.getFileList();
  242. this.getMemberList();
  243. },
  244. getMemberList() {
  245. var temp = {
  246. "ProjectID": this.projectData[0].Id
  247. }
  248. uni.request({
  249. url: mydata_api + "/project/getmember",
  250. data: temp,
  251. method: "POST",
  252. dataType: "json",
  253. success: res => {
  254. // console.log("请求学生", res);
  255. if (res.data.Code == 100) {
  256. this.projectMembers = res.data.Users;
  257. // console.log();
  258. }
  259. }
  260. })
  261. },
  262. bindPickerChange_proType: function(e) {
  263. this.index_proType = e.target.value;
  264. this.editDialogData.type = this.proType[this.index_proType];
  265. // console.log(this.model)
  266. },
  267. bindPickerChange_proTypeadd: function(e) {
  268. this.index_addproType = e.target.value;
  269. this.addedMemberModel.type = this.addproType[this.index_addproType];
  270. // console.log(this.model)
  271. },
  272. bindPickerChange_fileType: function(e) {
  273. this.index_FileType = e.target.value;
  274. this.fileDialogData.type = this.addFileType[this.index_FileType];
  275. // console.log(this.model)
  276. },
  277. deleteMember(item){
  278. console.log('删掉成员 ',item)
  279. let url = mydata_api + "/project/deletemember"
  280. let data = {
  281. "userID" : this.projectData[0].CreateUserID,
  282. "DeleteUserID":item.User.Id,
  283. "ProjectID":this.projectData[0].Id,
  284. }
  285. console.log('删掉成员 发送数据 '," 地址 ",url," 数据 ",data)
  286. uni.request({
  287. url: url,
  288. data: data,
  289. method: "POST",
  290. dataType: "json",
  291. success: res => {
  292. console.log('删掉成员 返回',res)
  293. if (res.data.Code == 100) {
  294. // this.$refs.table.getList();
  295. this.getMemberList();
  296. this.$forceUpdate();//强制刷新页面
  297. }
  298. // this.projectData.splice(index,index);
  299. }
  300. })
  301. },
  302. delFile(){
  303. // this.currentSelect
  304. console.log('删除文件', this.currentSelect)
  305. // SetFilePass
  306. let url = mydata_api + "/project/deleteprojectcontent"
  307. // "UserID":"xxxx", //上传人或者项目创建人
  308. // "ProjectItemID" : "123"
  309. let data = {
  310. "UserID" : this.projectData[0].CreateUserID,
  311. "ProjectItemID":this.currentSelect.item.Id
  312. }
  313. console.log('删除文件 发送数据 '," 地址 ",url," 数据 ",data,"项目数据",this.projectData)
  314. uni.request({
  315. url: url,
  316. data: data,
  317. method: "POST",
  318. dataType: "json",
  319. success: res => {
  320. console.log('删除文件 返回',res)
  321. if (res.data.Code == 100) {
  322. this.getFileList();
  323. }
  324. }
  325. })
  326. },
  327. DownloadFile() {
  328. window.location.href = this.currentSelect.item.URL;
  329. },
  330. },
  331. }
  332. </script>
  333. <style lang="scss">
  334. .m_right {
  335. width: 100%;
  336. margin-top: 5rpx;
  337. // padding: 0 150rpx;
  338. background-color: #fff;
  339. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  340. .m_right_container {
  341. padding: 150rpx;
  342. }
  343. .s_logo {
  344. width: 100%;
  345. height: 800rpx;
  346. }
  347. .m_right_hander {
  348. text-align: right;
  349. height: 250rpx;
  350. position: relative;
  351. .m_btn_red {
  352. position: absolute;
  353. height: 80rpx;
  354. line-height: 80rpx;
  355. padding: 0 40rpx;
  356. right: 0;
  357. top: 50%;
  358. transform: translateY(-50%);
  359. background: #EA252C;
  360. color: #fff;
  361. }
  362. }
  363. }
  364. .m_btn_download {
  365. height: 80rpx;
  366. line-height: 80rpx;
  367. padding: 0 70rpx;
  368. background: #EA252C;
  369. color: #fff;
  370. font-family: MicrosoftYaHei;
  371. }
  372. tbody tr {
  373. border-top: 2rpx solid #DDDDDD !important;
  374. }
  375. tbody tr th:first-child {
  376. position: relative;
  377. }
  378. tbody tr th {
  379. font-weight: 400 !important;
  380. height: 140rpx;
  381. line-height: 140rpx;
  382. }
  383. tbody tr:hover {
  384. // color: #fff;
  385. background: #FDEBEC;
  386. // opacity: 0.08;
  387. }
  388. .form-input {
  389. width: 100%;
  390. border: 1px solid #ece8e8;
  391. line-height: 50rpx;
  392. font-size: 30rpx;
  393. border-radius: 6rpx;
  394. padding: 10rpx 40rpx;
  395. }
  396. .m-table-hander {
  397. background-color: #FFF8F7;
  398. height: 140rpx;
  399. line-height: 140rpx;
  400. font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
  401. font-weight: bold;
  402. }
  403. .m_edit {
  404. position: absolute;
  405. top: 50%;
  406. left: 50%;
  407. transform: translate(-50%, -50%);
  408. background: rgb(67, 127, 250);
  409. color: rgb(255, 255, 255);
  410. min-width: 130rpx;
  411. }
  412. .m_delete {
  413. position: absolute;
  414. top: 50%;
  415. left: 50%;
  416. min-width: 130rpx;
  417. transform: translate(-50%, -50%);
  418. background: rgb(234, 37, 44);
  419. color: rgb(255, 255, 255);
  420. }
  421. .m_edit_1 {
  422. position: absolute;
  423. top: 50%;
  424. left: 50%;
  425. transform: translate(-50%, -50%);
  426. background: rgb(67, 127, 250);
  427. color: rgb(255, 255, 255);
  428. min-width: 130rpx;
  429. z-index: 0;
  430. }
  431. .m_delete_1 {
  432. position: absolute;
  433. top: 50%;
  434. left: 50%;
  435. min-width: 110rpx;
  436. transform: translate(-50%, -50%);
  437. background: rgb(234, 37, 44);
  438. color: rgb(255, 255, 255);
  439. }
  440. .m_right_footer {
  441. margin-top: 80rpx;
  442. }
  443. .m_logoimg {
  444. width: 80rpx;
  445. height: 80rpx;
  446. position: absolute;
  447. top: 50%;
  448. left: 50%;
  449. transform: translate(-50%, -50%);
  450. }
  451. .m_paging {
  452. text-align: right;
  453. .m_paging_item {
  454. padding: 10rpx 18rpx;
  455. border: 1rpx solid #DDDDDD;
  456. border-radius: 8rpx;
  457. margin-right: 10rpx;
  458. }
  459. .p_act {
  460. background: #EA252C;
  461. color: #fff;
  462. border: inherit;
  463. }
  464. }
  465. .m_paging_item:hover {
  466. background: #EA252C;
  467. color: #fff;
  468. border: inherit;
  469. }
  470. .m_act1 {
  471. color: #FF0019;
  472. }
  473. .m_row {
  474. display: flex;
  475. height: 60rpx;
  476. line-height: 60rpx;
  477. font-size: 30rpx;
  478. color: #ea252c;
  479. padding: 0 0 80rpx 0;
  480. }
  481. .m_audit {
  482. position: absolute;
  483. top: 50%;
  484. left: 50%;
  485. min-width: 65px;
  486. -webkit-transform: translate(-50%, -50%);
  487. transform: translate(-50%, -50%);
  488. color: white;
  489. background-color: #FF791B;
  490. }
  491. .m_audit_1 {
  492. position: absolute;
  493. top: 50%;
  494. left: 50%;
  495. min-width: 55px;
  496. -webkit-transform: translate(-50%, -50%);
  497. transform: translate(-50%, -50%);
  498. color: white;
  499. background-color: #FF791B;
  500. }
  501. .m_row_link {
  502. width: 10rpx;
  503. height: 60rpx;
  504. background-color: #ea252c;
  505. margin-right: 40rpx;
  506. }
  507. .m_row_title {
  508. color: #ea252c;
  509. font-weight: bold;
  510. font-size: 40rpx;
  511. }
  512. /*向下*/
  513. .triangle_border_down {
  514. width: 0;
  515. height: 0;
  516. border-width: 25rpx 25rpx 0;
  517. border-style: solid;
  518. border-color: #ea252c transparent transparent;
  519. /*灰 透明 透明 */
  520. margin: 20rpx auto;
  521. position: relative;
  522. }
  523. .m_row_class {
  524. margin-bottom: 60rpx;
  525. }
  526. .addMember_box{
  527. margin-bottom: 50rpx;
  528. height: 80rpx;
  529. }
  530. .addMember_input_box{
  531. width: 500rpx;
  532. height: 80rpx;
  533. }
  534. .addMember_input {
  535. width: 100%;
  536. height: 100%;
  537. border: 1px solid #ece8e8;
  538. line-height: 50rpx;
  539. font-size: 30rpx;
  540. border-radius: 6rpx;
  541. padding: 10rpx 40rpx;
  542. }
  543. .addMember_btn {
  544. width: 130rpx;
  545. height: 80rpx;
  546. transform: translate(-50%, -50%);
  547. background: rgb(234, 37, 44);
  548. color: rgb(255, 255, 255);
  549. }
  550. .blank{
  551. border:1px solid black;
  552. }
  553. .table{
  554. border:1px solid black;
  555. }
  556. .input-item {
  557. border:1px solid black;
  558. }
  559. .pop_view{
  560. position: fixed;
  561. display: flex;
  562. justify-content: center;
  563. align-items:center;/*垂直居中*/
  564. width: 100%;
  565. height: 100%;
  566. top: 0rpx;
  567. left: 0rpx;
  568. // z-index: 100;
  569. background-color:rgba(0,0,0,0.5)
  570. }
  571. .edit_form{
  572. width: 25%;
  573. height: 50%;
  574. background-color:rgba(255,255,255,1);
  575. display: flex;
  576. justify-content: center;
  577. // justify-content: space-between;
  578. align-items:center;
  579. .edit_BG{
  580. width: 90%;
  581. height: 90%;
  582. display: flex;
  583. justify-content: space-between;
  584. align-items:center;
  585. flex-direction:column;
  586. // border:1rpx solid #000000;
  587. .edit_row{
  588. width: 90%;
  589. height: 50%;
  590. // border:1rpx solid #000000;
  591. display: flex;
  592. // justify-content: space-between;
  593. align-items:center;
  594. flex-direction:row;
  595. }
  596. }
  597. }
  598. .edit_title
  599. {
  600. width: 80%;
  601. height: 100%;
  602. font-size: 70rpx;
  603. color: #000000;
  604. // border:1rpx solid #000000;
  605. display: flex;
  606. justify-content: center;
  607. align-items:center;
  608. margin-bottom:10%;
  609. }
  610. .edit_text{
  611. width: 50%;
  612. height: 50%;
  613. font-size: 30rpx;
  614. color: #000000;
  615. // border:1rpx solid #000000;
  616. }
  617. .input_frame{
  618. width: 100%;
  619. height: 80%;
  620. border:1rpx solid #000000;
  621. border-radius: 25rpx;
  622. display: flex;
  623. justify-content: center;
  624. align-items:center;
  625. }
  626. .edit_input{
  627. font-size: 30rpx;
  628. color: #000000;
  629. width: 80%;
  630. height: 100%;
  631. // border:1rpx solid #000000;
  632. }
  633. .modify_btn
  634. {
  635. width: 90%;
  636. height: 50%;
  637. // border:1rpx solid #000000;
  638. display: flex;
  639. align-items:center;
  640. flex-direction:row;
  641. margin-top:10%;
  642. }
  643. .modify_confirm
  644. {
  645. background: rgb(67, 127, 250);
  646. color: rgb(255, 255, 255);
  647. min-width: 30%;
  648. }
  649. .modify_cancel
  650. {
  651. min-width: 30%;
  652. background: rgb(234, 37, 44);
  653. color: rgb(255, 255, 255);
  654. }
  655. .m_msg {
  656. width: 1500rpx;
  657. height: 900rpx;
  658. padding: 0rpx 0 40rpx 0;
  659. position: fixed;
  660. top: 50%;
  661. left: 50%;
  662. border-radius: 10rpx;
  663. transform: translate(-50%, -50%);
  664. z-index: 100;
  665. background-color: #fff;
  666. opacity: 1;
  667. .layout{
  668. position: absolute;
  669. left: 50%;
  670. bottom: 2%;
  671. }
  672. .m_edit {
  673. position: relative;
  674. left: 20%;
  675. transform: translate(-50%, -50%);
  676. background: rgb(67, 127, 250);
  677. color: rgb(255, 255, 255);
  678. min-width: 130rpx;
  679. }
  680. .m_delete {
  681. position: relative;
  682. left: 50%;
  683. min-width: 130rpx;
  684. transform: translate(-50%, -50%);
  685. background: rgb(234, 37, 44);
  686. color: rgb(255, 255, 255);
  687. }
  688. }
  689. </style>