project.vue 14 KB

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