project.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  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"></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. },
  169. getlist() {
  170. uni.request({
  171. url: mydata_api + "/project/getprojectcontent",
  172. data: {
  173. "UserID": mydata_userInfo.UserID,
  174. "ProjectID": this.projectData[0].Id
  175. },
  176. method: "POST",
  177. dataType: "json",
  178. success: res => {
  179. if (res.data.Code == 100) {
  180. this.projectData[0] = null
  181. this.projectData[0] = res.data.Project;
  182. this.$forceUpdate()
  183. }
  184. // console.log("获取了什么样子的信息", this.projectData[0]);
  185. }
  186. })
  187. },
  188. getFileList() {
  189. uni.request({
  190. url: mydata_api + "/project/getprojectcontent",
  191. data: {
  192. "UserID": mydata_userInfo.UserID,
  193. "ProjectID": this.projectData[0].Id
  194. },
  195. method: "POST",
  196. dataType: "json",
  197. success: res => {
  198. this.fileData = res.data.ProjectItem;
  199. // console.log('this.fileData=',this.fileData)
  200. }
  201. })
  202. },
  203. viewProject(obj) {
  204. // console.log('进来的什么信息',obj)
  205. this.projectData = [obj];
  206. this.getFileList();
  207. this.getMemberList();
  208. },
  209. getMemberList() {
  210. var temp = {
  211. "ProjectID": this.projectData[0].Id
  212. }
  213. uni.request({
  214. url: mydata_api + "/project/getmember",
  215. data: temp,
  216. method: "POST",
  217. dataType: "json",
  218. success: res => {
  219. // console.log("请求学生", res);
  220. if (res.data.Code == 100) {
  221. this.projectMembers = res.data.Users;
  222. // console.log();
  223. }
  224. }
  225. })
  226. },
  227. bindPickerChange_proType: function(e) {
  228. this.index_proType = e.target.value;
  229. this.editDialogData.type = this.proType[this.index_proType];
  230. // console.log(this.model)
  231. },
  232. bindPickerChange_proTypeadd: function(e) {
  233. this.index_addproType = e.target.value;
  234. this.addedMemberModel.type = this.addproType[this.index_addproType];
  235. // console.log(this.model)
  236. },
  237. bindPickerChange_fileType: function(e) {
  238. this.index_FileType = e.target.value;
  239. this.fileDialogData.type = this.addFileType[this.index_FileType];
  240. // console.log(this.model)
  241. },
  242. deleteMember(item){
  243. console.log('删掉成员 ',item)
  244. let url = mydata_api + "/project/deletemember"
  245. let data = {
  246. "userID" : this.projectData[0].CreateUserID,
  247. "DeleteUserID":item.User.Id,
  248. "ProjectID":this.projectData[0].Id,
  249. }
  250. console.log('删掉成员 发送数据 '," 地址 ",url," 数据 ",data)
  251. uni.request({
  252. url: url,
  253. data: data,
  254. method: "POST",
  255. dataType: "json",
  256. success: res => {
  257. console.log('删掉成员 返回',res)
  258. if (res.data.Code == 100) {
  259. // this.$refs.table.getList();
  260. this.getMemberList();
  261. this.$forceUpdate();//强制刷新页面
  262. }
  263. // this.projectData.splice(index,index);
  264. }
  265. })
  266. },
  267. delFile(){
  268. // this.currentSelect
  269. console.log('删除文件', this.currentSelect)
  270. // SetFilePass
  271. let url = mydata_api + "/project/deleteprojectcontent"
  272. // "UserID":"xxxx", //上传人或者项目创建人
  273. // "ProjectItemID" : "123"
  274. let data = {
  275. "UserID" : this.projectData[0].CreateUserID,
  276. "ProjectItemID":this.currentSelect.item.Id
  277. }
  278. console.log('删除文件 发送数据 '," 地址 ",url," 数据 ",data,"项目数据",this.projectData)
  279. uni.request({
  280. url: url,
  281. data: data,
  282. method: "POST",
  283. dataType: "json",
  284. success: res => {
  285. console.log('删除文件 返回',res)
  286. if (res.data.Code == 100) {
  287. this.getFileList();
  288. }
  289. }
  290. })
  291. },
  292. DownloadFile() {
  293. window.location.href = this.currentSelect.item.URL;
  294. },
  295. },
  296. }
  297. </script>
  298. <style lang="scss">
  299. .m_right {
  300. width: 100%;
  301. margin-top: 5rpx;
  302. // padding: 0 150rpx;
  303. background-color: #fff;
  304. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  305. .m_right_container {
  306. padding: 150rpx;
  307. }
  308. .s_logo {
  309. width: 100%;
  310. height: 800rpx;
  311. }
  312. .m_right_hander {
  313. text-align: right;
  314. height: 250rpx;
  315. position: relative;
  316. .m_btn_red {
  317. position: absolute;
  318. height: 80rpx;
  319. line-height: 80rpx;
  320. padding: 0 40rpx;
  321. right: 0;
  322. top: 50%;
  323. transform: translateY(-50%);
  324. background: #EA252C;
  325. color: #fff;
  326. }
  327. }
  328. }
  329. .m_btn_download {
  330. height: 80rpx;
  331. line-height: 80rpx;
  332. padding: 0 70rpx;
  333. background: #EA252C;
  334. color: #fff;
  335. font-family: MicrosoftYaHei;
  336. }
  337. tbody tr {
  338. border-top: 2rpx solid #DDDDDD !important;
  339. }
  340. tbody tr th:first-child {
  341. position: relative;
  342. }
  343. tbody tr th {
  344. font-weight: 400 !important;
  345. height: 140rpx;
  346. line-height: 140rpx;
  347. }
  348. tbody tr:hover {
  349. // color: #fff;
  350. background: #FDEBEC;
  351. // opacity: 0.08;
  352. }
  353. .form-input {
  354. width: 100%;
  355. border: 1px solid #ece8e8;
  356. line-height: 50rpx;
  357. font-size: 30rpx;
  358. border-radius: 6rpx;
  359. padding: 10rpx 40rpx;
  360. }
  361. .m-table-hander {
  362. background-color: #FFF8F7;
  363. height: 140rpx;
  364. line-height: 140rpx;
  365. font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
  366. font-weight: bold;
  367. }
  368. .m_edit {
  369. position: absolute;
  370. top: 50%;
  371. left: 50%;
  372. transform: translate(-50%, -50%);
  373. background: rgb(67, 127, 250);
  374. color: rgb(255, 255, 255);
  375. min-width: 130rpx;
  376. }
  377. .m_delete {
  378. position: absolute;
  379. top: 50%;
  380. left: 50%;
  381. min-width: 130rpx;
  382. transform: translate(-50%, -50%);
  383. background: rgb(234, 37, 44);
  384. color: rgb(255, 255, 255);
  385. }
  386. .m_edit_1 {
  387. position: absolute;
  388. top: 50%;
  389. left: 50%;
  390. transform: translate(-50%, -50%);
  391. background: rgb(67, 127, 250);
  392. color: rgb(255, 255, 255);
  393. min-width: 130rpx;
  394. }
  395. .m_delete_1 {
  396. position: absolute;
  397. top: 50%;
  398. left: 50%;
  399. min-width: 110rpx;
  400. transform: translate(-50%, -50%);
  401. background: rgb(234, 37, 44);
  402. color: rgb(255, 255, 255);
  403. }
  404. .m_right_footer {
  405. margin-top: 80rpx;
  406. }
  407. .m_logoimg {
  408. width: 80rpx;
  409. height: 80rpx;
  410. position: absolute;
  411. top: 50%;
  412. left: 50%;
  413. transform: translate(-50%, -50%);
  414. }
  415. .m_paging {
  416. text-align: right;
  417. .m_paging_item {
  418. padding: 10rpx 18rpx;
  419. border: 1rpx solid #DDDDDD;
  420. border-radius: 8rpx;
  421. margin-right: 10rpx;
  422. }
  423. .p_act {
  424. background: #EA252C;
  425. color: #fff;
  426. border: inherit;
  427. }
  428. }
  429. .m_paging_item:hover {
  430. background: #EA252C;
  431. color: #fff;
  432. border: inherit;
  433. }
  434. .m_act1 {
  435. color: #FF0019;
  436. }
  437. .m_row {
  438. display: flex;
  439. height: 60rpx;
  440. line-height: 60rpx;
  441. font-size: 30rpx;
  442. color: #ea252c;
  443. padding: 0 0 80rpx 0;
  444. }
  445. .m_audit {
  446. position: absolute;
  447. top: 50%;
  448. left: 50%;
  449. min-width: 65px;
  450. -webkit-transform: translate(-50%, -50%);
  451. transform: translate(-50%, -50%);
  452. color: white;
  453. background-color: #FF791B;
  454. }
  455. .m_audit_1 {
  456. position: absolute;
  457. top: 50%;
  458. left: 50%;
  459. min-width: 55px;
  460. -webkit-transform: translate(-50%, -50%);
  461. transform: translate(-50%, -50%);
  462. color: white;
  463. background-color: #FF791B;
  464. }
  465. .m_row_link {
  466. width: 10rpx;
  467. height: 60rpx;
  468. background-color: #ea252c;
  469. margin-right: 40rpx;
  470. }
  471. .m_row_title {
  472. color: #ea252c;
  473. font-weight: bold;
  474. font-size: 40rpx;
  475. }
  476. /*向下*/
  477. .triangle_border_down {
  478. width: 0;
  479. height: 0;
  480. border-width: 25rpx 25rpx 0;
  481. border-style: solid;
  482. border-color: #ea252c transparent transparent;
  483. /*灰 透明 透明 */
  484. margin: 20rpx auto;
  485. position: relative;
  486. }
  487. .m_row_class {
  488. margin-bottom: 60rpx;
  489. }
  490. .addMember_box{
  491. margin-bottom: 50rpx;
  492. height: 80rpx;
  493. }
  494. .addMember_input_box{
  495. width: 500rpx;
  496. height: 80rpx;
  497. }
  498. .addMember_input {
  499. width: 100%;
  500. height: 100%;
  501. border: 1px solid #ece8e8;
  502. line-height: 50rpx;
  503. font-size: 30rpx;
  504. border-radius: 6rpx;
  505. padding: 10rpx 40rpx;
  506. }
  507. .addMember_btn {
  508. width: 130rpx;
  509. height: 80rpx;
  510. transform: translate(-50%, -50%);
  511. background: rgb(234, 37, 44);
  512. color: rgb(255, 255, 255);
  513. }
  514. .blank{
  515. border:1px solid black;
  516. }
  517. .table{
  518. border:1px solid black;
  519. }
  520. .input-item {
  521. border:1px solid black;
  522. }
  523. .pop_view{
  524. position: fixed;
  525. display: flex;
  526. justify-content: center;
  527. align-items:center;/*垂直居中*/
  528. width: 100%;
  529. height: 100%;
  530. top: 0rpx;
  531. left: 0rpx;
  532. // z-index: 100;
  533. background-color:rgba(0,0,0,0.5)
  534. }
  535. .edit_form{
  536. width: 25%;
  537. height: 50%;
  538. background-color:rgba(255,255,255,1);
  539. display: flex;
  540. justify-content: center;
  541. // justify-content: space-between;
  542. align-items:center;
  543. .edit_BG{
  544. width: 90%;
  545. height: 90%;
  546. display: flex;
  547. justify-content: space-between;
  548. align-items:center;
  549. flex-direction:column;
  550. // border:1rpx solid #000000;
  551. .edit_row{
  552. width: 90%;
  553. height: 50%;
  554. // border:1rpx solid #000000;
  555. display: flex;
  556. // justify-content: space-between;
  557. align-items:center;
  558. flex-direction:row;
  559. }
  560. }
  561. }
  562. .edit_title
  563. {
  564. width: 80%;
  565. height: 100%;
  566. font-size: 70rpx;
  567. color: #000000;
  568. // border:1rpx solid #000000;
  569. display: flex;
  570. justify-content: center;
  571. align-items:center;
  572. margin-bottom:10%;
  573. }
  574. .edit_text{
  575. width: 50%;
  576. height: 50%;
  577. font-size: 30rpx;
  578. color: #000000;
  579. // border:1rpx solid #000000;
  580. }
  581. .input_frame{
  582. width: 100%;
  583. height: 80%;
  584. border:1rpx solid #000000;
  585. border-radius: 25rpx;
  586. display: flex;
  587. justify-content: center;
  588. align-items:center;
  589. }
  590. .edit_input{
  591. font-size: 30rpx;
  592. color: #000000;
  593. width: 80%;
  594. height: 100%;
  595. // border:1rpx solid #000000;
  596. }
  597. .modify_btn
  598. {
  599. width: 90%;
  600. height: 50%;
  601. // border:1rpx solid #000000;
  602. display: flex;
  603. align-items:center;
  604. flex-direction:row;
  605. margin-top:10%;
  606. }
  607. .modify_confirm
  608. {
  609. background: rgb(67, 127, 250);
  610. color: rgb(255, 255, 255);
  611. min-width: 30%;
  612. }
  613. .modify_cancel
  614. {
  615. min-width: 30%;
  616. background: rgb(234, 37, 44);
  617. color: rgb(255, 255, 255);
  618. }
  619. .m_msg {
  620. width: 1500rpx;
  621. height: 900rpx;
  622. padding: 0rpx 0 40rpx 0;
  623. position: fixed;
  624. top: 50%;
  625. left: 50%;
  626. border-radius: 10rpx;
  627. transform: translate(-50%, -50%);
  628. z-index: 100;
  629. background-color: #fff;
  630. opacity: 1;
  631. .layout{
  632. position: absolute;
  633. left: 50%;
  634. bottom: 2%;
  635. }
  636. .m_edit {
  637. position: relative;
  638. left: 20%;
  639. transform: translate(-50%, -50%);
  640. background: rgb(67, 127, 250);
  641. color: rgb(255, 255, 255);
  642. min-width: 130rpx;
  643. }
  644. .m_delete {
  645. position: relative;
  646. left: 50%;
  647. min-width: 130rpx;
  648. transform: translate(-50%, -50%);
  649. background: rgb(234, 37, 44);
  650. color: rgb(255, 255, 255);
  651. }
  652. }
  653. </style>