project.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212
  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. <th>修改</th>
  25. <th>删除</th>
  26. </tr>
  27. </thead>
  28. <!-- <tbody class='table'> -->
  29. <tbody>
  30. <tr v-for="(item,index) in projectData" :key="index">
  31. <th>{{item.ProjectName}}</th>
  32. <th>{{item.Type}}</th>
  33. <th style="position: relative;"><button type="default" size="mini" @click="viewIntro(item)" class="m_edit">简介</button></th>
  34. <!-- <th>{{item.Describe}}</th> -->
  35. <th>{{item.CreateUserName}}</th>
  36. <th style="position: relative;"><button type="default" size="mini" @click="editProject(index)" class="m_edit">修改</button></th>
  37. <th style="position: relative;"><button type="default" size="mini" @click="deleteProject(index)" class="m_delete">删除</button></th>
  38. </tr>
  39. </tbody>
  40. </table>
  41. </view>
  42. <view class="m_row_class">
  43. <view class="" style="display: flex;justify-content: space-between;">
  44. <view class="m_row">
  45. <view class="m_row_link">
  46. </view>
  47. <view class="m_row_title" v-text="'文件管理'">
  48. </view>
  49. <view style="position: relative;margin-left: 40rpx;">
  50. <div class="triangle_border_down">
  51. <span></span>
  52. </div>
  53. </view>
  54. </view>
  55. <view class="">
  56. <button type="default" class="m_btn_download" size="mini" @click="onClick_addFile">添加文件</button>
  57. </view>
  58. </view>
  59. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  60. <thead class="m-table-hander">
  61. <tr>
  62. <th>文件</th>
  63. <th>文件名</th>
  64. <th>文件类型</th>
  65. <th>上传人</th>
  66. <th>上传日期</th>
  67. <th>下载</th>
  68. <th>删除</th>
  69. <th>审核</th>
  70. <th>审核状态</th>
  71. </tr>
  72. </thead>
  73. <tbody>
  74. <tr v-for="(item,index) in fileData" :key="index">
  75. <th>{{index+1}}</th>
  76. <th>{{item.Name}}</th>
  77. <th>{{item.Type}}</th>
  78. <th>{{item.UploadUserName}}</th>
  79. <th>{{item.UPloadTime.substring(0,9)}}</th>
  80. <th style="position: relative;"><button type="default" size="mini" @click="download(index,item)" class="m_edit_1">下载</button></th>
  81. <th style="position: relative;"><button type="default" size="mini" @click="deleteFile(index,item)" class="m_delete_1">删除</button></th>
  82. <th style="position: relative;"><button type="default" size="mini" @click="audit(index,item)" class="m_audit_1">审核</button></th>
  83. <th>{{getShenheText(item.Pass)}}</th>
  84. </tr>
  85. </tbody>
  86. </table>
  87. </view>
  88. <view class="m_row_class">
  89. <view class="" style="display: flex;justify-content: space-between;">
  90. <view class="m_row">
  91. <view class="m_row_link">
  92. </view>
  93. <view class="m_row_title" v-text="'成员管理'">
  94. </view>
  95. <view style="position: relative;margin-left: 40rpx;">
  96. <div class="triangle_border_down">
  97. <span></span>
  98. </div>
  99. </view>
  100. </view>
  101. <view class="">
  102. <button type="default" class="m_btn_download" size="mini" @click="addMember">添加学生</button>
  103. </view>
  104. </view>
  105. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  106. <thead class="m-table-hander">
  107. <tr>
  108. <th>用户名</th>
  109. <th>姓名</th>
  110. <th>专业</th>
  111. <th>班级</th>
  112. <th>职务</th>
  113. <th>电话</th>
  114. <th>删除</th>
  115. </tr>
  116. </thead>
  117. <tbody>
  118. <tr v-for="(item,index) in projectMembers" :key="index">
  119. <th>{{item.User.IlabAccount}}</th>
  120. <th>{{item.User.Name}}</th>
  121. <th>{{item.User.Profession}}</th>
  122. <th>{{item.User.Class}}</th>
  123. <th>
  124. <div>
  125. {{item.User.Type}}
  126. </div>
  127. </th>
  128. <th>{{item.User.PhoneNum}}</th>
  129. <th style="position: relative;"><button type="default" size="mini" class="m_delete" @click="deleteMember(item)" v-show="item.User.Id != projectData[0].CreateUserID">删除</button></th>
  130. </tr>
  131. </tbody>
  132. </table>
  133. </view>
  134. </view>
  135. <msg ref="msg" :title="title" @determine="determine" :btnArr="arr" v-show="show"></msg>
  136. <audit ref="audit" v-show="auditshow" @determine="determine"></audit>
  137. <!--修改对话框-->
  138. <view class="m_msg" v-show="editDialogshow">
  139. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  140. <thead class="m-table-hander">
  141. <tr>
  142. <th>名称</th>
  143. <th>类型</th>
  144. <th>介绍</th>
  145. </tr>
  146. </thead>
  147. <tbody>
  148. <tr>
  149. <th>
  150. <input class="uni-input" placeholder-style="color:#F76260" placeholder="名称" v-model="editDialogData.name"/>
  151. </th>
  152. <th>
  153. <picker class="form-input" @change="bindPickerChange_proType" :value="index_proType" :range="proType">
  154. <view class=" df fdr aic jcsb">
  155. <view>{{proType[index_proType]}}</view>
  156. <view>
  157. <img src="../../../assets/user/pic_user_03.png" />
  158. </view>
  159. </view>
  160. </picker>
  161. </th>
  162. <th>
  163. <input class="uni-input" placeholder-style="color:#F76260" placeholder="介绍" v-model="editDialogData.Introduction"/>
  164. </th>
  165. </tr>
  166. </tbody>
  167. </table>
  168. <view class="layout">
  169. <button type="default" size="mini" @click="editDialogDetermine(index)" class="m_edit">修改</button>
  170. <button type="default" size="mini" @click="editDialogCancel(index)" class="m_delete">取消</button>
  171. </view>
  172. </view>
  173. <!--添加用户对话框-->
  174. <view class="m_msg" v-show="isShowAddMember">
  175. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  176. <thead class="m-table-hander">
  177. <tr>
  178. <th>名称</th>
  179. <th>类型</th>
  180. </tr>
  181. </thead>
  182. <tbody>
  183. <tr>
  184. <th>
  185. <view class="addMember_input_box">
  186. <input class="addMember_input" type="string" v-model="addedMemberModel.IlabAccount" placeholder="学员id" />
  187. </view>
  188. </th>
  189. <th>
  190. <picker class="form-input" @change="bindPickerChange_proTypeadd" :value="index_addproType" :range="addproType">
  191. <view class=" df fdr aic jcsb">
  192. <view>{{addproType[index_addproType]}}</view>
  193. <view>
  194. <img src="../../../assets/user/pic_user_03.png" />
  195. </view>
  196. </view>
  197. </picker>
  198. </th>
  199. </tr>
  200. </tbody>
  201. </table>
  202. <view class="layout">
  203. <button type="default" size="mini" @click="addMemberData(index)" class="m_edit">添加</button>
  204. <button type="default" size="mini" @click="addMemberDataCancel(index)" class="m_delete">取消</button>
  205. </view>
  206. </view>
  207. <!--修改文件对话框-->
  208. <view class="pop_view" @touchmove.stop.prevent = "stopPenetrate" @click="shut_down_pop_view()" v-if='bShowPopView'>
  209. <view class="edit_form" @touchmove.stop.prevent = "stopPenetrate">
  210. <view class="edit_BG">
  211. <view class="edit_title">修改</view>
  212. <view class="edit_row">
  213. <text class="edit_text">名称</text>
  214. <view class="input_frame">
  215. <input class="edit_input" type="string" v-model="projectName" placeholder="" @input="onInputProjectName"/>
  216. </view>
  217. </view>
  218. <view class="edit_row">
  219. <text class="edit_text">类型</text>
  220. <view class="input_frame">
  221. <input class="edit_input" type="string" v-model="projectType" placeholder="" @input="onInputProjectType"/>
  222. </view>
  223. </view>
  224. <view class="edit_row">
  225. <text class="edit_text">描述</text>
  226. <view class="input_frame">
  227. <input class="edit_input" type="string" v-model="projectDescribe" placeholder="" @input="onInputProjectDescribe"/>
  228. </view>
  229. </view>
  230. <view class="edit_row">
  231. <text class="edit_text">创建人姓名</text>
  232. <view class="input_frame">
  233. <input class="edit_input" type="string" v-model="projectData.CreateUserName" placeholder=""/>
  234. </view>
  235. </view>
  236. <view class='modify_btn'>
  237. <button type="default" size="mini" @click="confirm_modify()" class="modify_confirm">确认</button>
  238. <button type="default" size="mini" @click="cancel_modify()" class="modify_cancel">取消</button>
  239. </view>
  240. </view>
  241. </view>
  242. </view>
  243. <!--上传文件对话框-->
  244. <view class="m_msg" v-show="isShowAddFile">
  245. <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
  246. <thead class="m-table-hander">
  247. <tr>
  248. <th>名字</th>
  249. <th>类型</th>
  250. <!--<th>介绍</th>-->
  251. </tr>
  252. </thead>
  253. <tbody>
  254. <tr>
  255. <th>
  256. <view class="addMember_input_box">
  257. <input class="addMember_input" type="string" v-model="fileDialogData.name" placeholder="文件名字" />
  258. </view>
  259. </th>
  260. <th>
  261. <picker class="form-input" @change="bindPickerChange_fileType" :value="index_FileType" :range="addFileType">
  262. <view class=" df fdr aic jcsb">
  263. <view>{{addFileType[index_FileType]}}</view>
  264. <view>
  265. <img src="../../../assets/user/pic_user_03.png" />
  266. </view>
  267. </view>
  268. </picker>
  269. </th>
  270. </tr>
  271. </tbody>
  272. </table>
  273. <view class="layout">
  274. <button type="default" size="mini" @click="addFileData(index)" class="m_edit">添加</button>
  275. <button type="default" size="mini" @click="addFileDataCancel(index)" class="m_delete">取消</button>
  276. </view>
  277. </view>
  278. </view>
  279. </template>
  280. <script>
  281. import msg from "./msg.vue"
  282. import audit from "./audit.vue"
  283. export default {
  284. name: "home_project",
  285. data() {
  286. return {
  287. index: 1,
  288. title: "",
  289. show: false,
  290. auditshow: false,
  291. callback: "",
  292. arr: [],
  293. data: [],
  294. projectData: [],
  295. ProjectItem: [],
  296. fileData: [],
  297. projectMembers: [],
  298. isShowAddMember: false,
  299. isShowAddFile: false,
  300. addedMemberModel: {
  301. "IlabAccount": '',
  302. "type": ''
  303. },
  304. currentSelect:{section:-1,buttonType:'',index:-1},
  305. Type:'asd',
  306. editDialogshow : false,
  307. editDialogData : {name : "", type :"", Introduction : ""},
  308. proType: ['科幻', '现实', '剧情', '历史', '爱情', '惊悚', '公路', '动画'],
  309. addproType: ['编剧', '摄影师' ,'录音师', '灯光师', '创建人'],
  310. addFileType: ['剧本' ,'拍摄脚本' ,'分镜头脚本' ,'气氛图', '项目简介', '项目报告' ,'场景图'],
  311. index_addproType : 0,
  312. index_proType : 0,
  313. index_FileType : 0,
  314. fileDialogData : {name : "", type :""},
  315. bShowPopView:false,
  316. projectName:'',
  317. projectType:'',
  318. projectDescribe:'',
  319. }
  320. },
  321. components: {
  322. msg,
  323. audit,
  324. },
  325. methods: {
  326. stopPenetrate(){
  327. return;
  328. },
  329. paging(obj) {
  330. this.index = obj;
  331. },
  332. viewIntro(item){
  333. uni.showModal({
  334. title: '简介',
  335. showCancel: false,
  336. content: item.Describe,
  337. success: function (res) {
  338. if (res.confirm) {
  339. console.log('确定');
  340. } else if (res.cancel) {
  341. console.log('取消');
  342. }
  343. }
  344. });
  345. },
  346. editProject(index) {
  347. //修改按钮赋值
  348. this.projectName=this.projectData[0].ProjectName;
  349. this.projectType=this.projectData[0].Type;
  350. this.projectDescribe=this.projectData[0].Describe;
  351. this.bShowPopView = true;
  352. },
  353. //审核状态中文
  354. getShenheText(pass){
  355. let t = "成功"
  356. if (pass == false) {
  357. t = "失败"
  358. }
  359. return t
  360. },
  361. deleteProject(index) {
  362. this.title = "是否删除信息?";
  363. this.arr = ["删除", "取消"]
  364. this.show = true;
  365. this.currentSelect = {section:0,buttonType:'delete',index:index};
  366. },
  367. download(index,item) {
  368. this.title = "下载成功?";
  369. this.arr = ["确认"];
  370. this.show = true;
  371. this.currentSelect = {section:0,buttonType:'downloadIMG',index:index,item:item};
  372. },
  373. deleteFile(index,item) {
  374. this.title = "是否删除文件?";
  375. this.arr = ["删除", "取消"]
  376. this.show = true;
  377. this.currentSelect = {section:0,buttonType:'deleteFile',index:index,item:item};
  378. },
  379. audit(index,item) {
  380. this.title = "是否确认审核?";
  381. this.arr = ["通过", "未通过"]
  382. this.show = true;
  383. this.callback = "audit"
  384. // this.auditshow = true;
  385. this.currentSelect = {section:0,buttonType:'audit',index:index,item:item};
  386. },
  387. editSave() {
  388. if (this.editDialogData.name == "") {
  389. alert("请输入项目名称~");
  390. return false;
  391. }
  392. if (this.editDialogData.type == "") {
  393. alert("请输入项目类型~");
  394. return false;
  395. }
  396. if (this.editDialogData.Introduction == "") {
  397. alert("请输入项目介绍~");
  398. return false;
  399. }
  400. console.log("创建项目自己ID",mydata_userInfo.UserID);
  401. uni.request({
  402. url: this.$Api + "/project/changeprojectinfo",
  403. data: {
  404. "UserID":this.projectData[0].CreateUserID,
  405. "ProjectID" : this.projectData[0].Id,
  406. "ProjectName":this.editDialogData.name,
  407. "Describe":this.editDialogData.Introduction, // 项目描述
  408. "Type":this.editDialogData.type
  409. },
  410. method: "POST",
  411. dataType: "json",
  412. success: res => {
  413. console.log('是否成功',res)
  414. if (res.data.Code == 100) {
  415. this.getlist()
  416. this.editDialogshow = false
  417. return true;
  418. }
  419. }
  420. })
  421. },
  422. editDialogDetermine(){
  423. this.editSave()
  424. },
  425. editDialogCancel(){
  426. this.editDialogshow = false
  427. this.editDialogData = {name : "", type :"", Introduction : ""}
  428. },
  429. determine(obj) {
  430. this.show = false;
  431. this.auditshow = false;
  432. console.log("点了 对话框", obj);
  433. switch (this.currentSelect.section) {
  434. case 0: //項目管理
  435. switch (this.currentSelect.buttonType) {
  436. case 'delete':
  437. console.log("点了 删除", this.currentSelect);
  438. if (obj == 0) {
  439. console.log("点了 确定删除", this.currentSelect);
  440. this.deleteItemProject()
  441. }else if(obj == 1){
  442. console.log("点了 取消删除", this.currentSelect);
  443. }
  444. break;
  445. case 'edit':
  446. console.log("点了 修改", this.currentSelect);
  447. if (obj == 0) {
  448. console.log("点了 确定修改", this.currentSelect,this.projectData[0]);
  449. this.editDialogData = {name : this.projectData[0].ProjectName, type :this.projectData[0].Type, Introduction : this.projectData[0].Describe}
  450. this.editDialogshow = true
  451. console.log("修改数据", this.editDialogData);
  452. }else if(obj == 1){
  453. this.editDialogData = {name : "", type :"", Introduction : ""}
  454. console.log("点了 取消修改", this.currentSelect);
  455. }
  456. break;
  457. case 'downloadIMG':
  458. console.log("点了 下载", this.currentSelect);
  459. if (obj == 0) {
  460. console.log("点了 确定下载", this.currentSelect,this.projectData[0]);
  461. this.DownloadFile()
  462. }else if(obj == 1){
  463. // this.editDialogData = {name : "", type :"", Introduction : ""}
  464. console.log("点了 取消下载", this.currentSelect);
  465. }
  466. break;
  467. case 'deleteFile':
  468. console.log("点了 删除", this.currentSelect);
  469. if (obj == 0) {
  470. console.log("点了 确定删除", this.currentSelect,this.projectData[0]);
  471. this.delFile()
  472. }else if(obj == 1){
  473. // this.editDialogData = {name : "", type :"", Introduction : ""}
  474. console.log("点了 取消删除", this.currentSelect);
  475. }
  476. break;
  477. case 'audit':
  478. console.log("点了 审核", this.currentSelect);
  479. if (obj == 0) {
  480. console.log("点了 确定审核", this.currentSelect,this.projectData[0]);
  481. let data = {
  482. ProjectItemID: this.currentSelect.item,
  483. Pass: true
  484. }
  485. this.auditPost(data);
  486. }else if(obj == 1){
  487. // this.editDialogData = {name : "", type :"", Introduction : ""}
  488. console.log("点了 取消审核", this.currentSelect);
  489. let data = {
  490. ProjectItemID: this.currentSelect.item,
  491. Pass: false
  492. }
  493. this.auditPost(data);
  494. }
  495. break;
  496. default:
  497. break;
  498. }
  499. break;
  500. default:
  501. break;
  502. }
  503. this.currentSelect = {section:-1,buttonType:'',index:-1}
  504. // console.log(obj)
  505. },
  506. auditPost(obj) {
  507. console.log("审核信息", obj.ProjectItemID.ProjectID);
  508. let url = this.$Api + "/project/setfilepass"
  509. let data = {
  510. "ProjectItemID" : obj.ProjectItemID.Id,
  511. "Pass":obj.Pass,
  512. }
  513. console.log('审核 发送数据 '," 地址 ",url," 数据 ",data,"项目数据",this.projectData)
  514. uni.request({
  515. url: url,
  516. data: data,
  517. method: "POST",
  518. dataType: "json",
  519. success: res => {
  520. console.log('审核 返回',res)
  521. if (res.data.Code == 100) {
  522. this.getFileList();
  523. }
  524. }
  525. })
  526. },
  527. getlist() {
  528. uni.request({
  529. url: this.$Api + "/project/getprojectcontent",
  530. data: {
  531. "UserID": this.$UserId,
  532. "ProjectID": this.projectData[0].Id
  533. },
  534. method: "POST",
  535. dataType: "json",
  536. success: res => {
  537. if (res.data.Code == 100) {
  538. this.projectData[0] = null
  539. this.projectData[0] = res.data.Project;
  540. this.$forceUpdate()
  541. }
  542. console.log("获取了什么样子的信息", this.projectData[0]);
  543. }
  544. })
  545. },
  546. getFileList() {
  547. uni.request({
  548. url: this.$Api + "/project/getprojectcontent",
  549. data: {
  550. "UserID": this.$UserId,
  551. "ProjectID": this.projectData[0].Id
  552. },
  553. method: "POST",
  554. dataType: "json",
  555. success: res => {
  556. this.fileData = res.data.ProjectItem;
  557. console.log('this.fileData=',this.fileData)
  558. }
  559. })
  560. },
  561. viewProject(obj) {
  562. console.log('进来的什么信息',obj)
  563. this.projectData = [obj];
  564. this.getFileList();
  565. this.getMemberList();
  566. },
  567. getMemberList() {
  568. var temp = {
  569. "ProjectID": this.projectData[0].Id
  570. }
  571. uni.request({
  572. url: this.$Api + "/project/getmember",
  573. data: temp,
  574. method: "POST",
  575. dataType: "json",
  576. success: res => {
  577. // console.log("请求学生", res);
  578. if (res.data.Code == 100) {
  579. this.projectMembers = res.data.Users;
  580. // console.log();
  581. }
  582. }
  583. })
  584. },
  585. addMember() {
  586. this.isShowAddMember = true;
  587. },
  588. addMemberData(){
  589. console.log("添加学生", this.addedMemberModel,this.projectData[0]);
  590. if (this.addedMemberModel.IlabAccount == "") {
  591. alert("学员id不能为空")
  592. return
  593. }
  594. console.log('删掉成员 ')
  595. let url = this.$Api + "/project/addmember"
  596. let data = {
  597. "UserID" : this.projectData[0].CreateUserID,
  598. "ProjectID":this.projectData[0].Id,
  599. "AddUserID":this.addedMemberModel.IlabAccount,
  600. "Type":this.addedMemberModel.type,
  601. }
  602. console.log('添加成员 发送数据 '," 地址 ",url," 数据 ",data,"项目数据",this.projectData)
  603. uni.request({
  604. url: url,
  605. data: data,
  606. method: "POST",
  607. dataType: "json",
  608. success: res => {
  609. console.log('添加成员 返回',res)
  610. if (res.data.Code == 100) {
  611. // this.$refs.table.getList();
  612. this.$forceUpdate()
  613. this.isShowAddMember = false
  614. }
  615. this.getMemberList();
  616. this.$forceUpdate()
  617. this.isShowAddMember = false
  618. // this.projectData.splice(index,index);
  619. }
  620. })
  621. },
  622. addFileData(){
  623. uni.chooseImage({
  624. success: (chooseImageRes) => {
  625. const tempFilePaths = chooseImageRes.tempFilePaths;
  626. uni.uploadFile({
  627. url: this.$Api+'/project/uploadprojectfile', //仅为示例,非真实的接口地址
  628. filePath: tempFilePaths[0],
  629. name: 'file',
  630. formData: {
  631. "UserID": this.projectData[0].CreateUserID,
  632. "Name": this.fileDialogData.name,
  633. "Type": this.fileDialogData.type,
  634. "ProjectID": this.projectData[0].Id,
  635. },
  636. success: (uploadFileRes) => {
  637. console.log('upload ok=', uploadFileRes.data);
  638. this.isShowAddFile = false
  639. this.fileDialogData = {name : "", type :""}
  640. this.getFileList();
  641. alert("创建成功");
  642. }
  643. });
  644. }
  645. });
  646. },
  647. addFileDataCancel(){
  648. this.isShowAddFile = false
  649. },
  650. addMemberDataCancel(){
  651. this.isShowAddMember = false;
  652. },
  653. onClick_addMember_ok() {
  654. console.log("添加学生", this.addedMemberModel);
  655. var temp = {
  656. "UserID": this.projectData[0].CreateUserID, //项目创建人ID
  657. "ProjectID": this.projectData[0].Id, //项目ID
  658. "AddUserID": mydata_userInfo.UserID, //添加人员ID 支持ilabID UserID
  659. "Type": "美术师" //编剧 摄影师 录音师 灯光师 创建人
  660. }
  661. uni.request({
  662. url: this.$Api + "/project/getmember",
  663. data: temp,
  664. method: "POST",
  665. dataType: "json",
  666. success: res => {
  667. // console.log("请求学生", res);
  668. if (res.data.Code == 100) {
  669. this.projectMembers = res.data.Users;
  670. console.log();
  671. }
  672. }
  673. })
  674. },
  675. onClick_addFile(){
  676. console.log("项目 点了添加文件")
  677. this.isShowAddFile = true
  678. },
  679. //删除条目
  680. deleteItemProject(){
  681. console.log('UserID=',this.$UserId)
  682. console.log('ProjectID=',this.projectData[0].Id)
  683. var temp = {
  684. "UserID":this.projectData[0].CreateUserID,
  685. "ProjectID" : this.projectData[0].Id,
  686. }
  687. console.log("要删除过去的数据为",temp)
  688. uni.request({
  689. url: this.$Api + "/backstage/deleteproject",
  690. data: temp,
  691. method: "POST",
  692. dataType: "json",
  693. success: res => {
  694. console.log("delete project ok", res);
  695. this.$emit('onBackToProjectList');
  696. this.getlist()
  697. this.$forceUpdate();//强制刷新页面
  698. }
  699. })
  700. },
  701. bindPickerChange_proType: function(e) {
  702. this.index_proType = e.target.value;
  703. this.editDialogData.type = this.proType[this.index_proType];
  704. // console.log(this.model)
  705. },
  706. bindPickerChange_proTypeadd: function(e) {
  707. this.index_addproType = e.target.value;
  708. this.addedMemberModel.type = this.addproType[this.index_addproType];
  709. // console.log(this.model)
  710. },
  711. bindPickerChange_fileType: function(e) {
  712. this.index_FileType = e.target.value;
  713. this.fileDialogData.type = this.addFileType[this.index_FileType];
  714. // console.log(this.model)
  715. },
  716. deleteMember(item){
  717. console.log('删掉成员 ',item)
  718. let url = this.$Api + "/project/deletemember"
  719. let data = {
  720. "userID" : this.projectData[0].CreateUserID,
  721. "DeleteUserID":item.User.Id,
  722. "ProjectID":this.projectData[0].Id,
  723. }
  724. console.log('删掉成员 发送数据 '," 地址 ",url," 数据 ",data)
  725. uni.request({
  726. url: url,
  727. data: data,
  728. method: "POST",
  729. dataType: "json",
  730. success: res => {
  731. console.log('删掉成员 返回',res)
  732. if (res.data.Code == 100) {
  733. // this.$refs.table.getList();
  734. this.getMemberList();
  735. this.$forceUpdate();//强制刷新页面
  736. }
  737. // this.projectData.splice(index,index);
  738. }
  739. })
  740. },
  741. delFile(){
  742. // this.currentSelect
  743. console.log('删除文件', this.currentSelect)
  744. // SetFilePass
  745. let url = this.$Api + "/project/deleteprojectcontent"
  746. // "UserID":"xxxx", //上传人或者项目创建人
  747. // "ProjectItemID" : "123"
  748. let data = {
  749. "UserID" : this.projectData[0].CreateUserID,
  750. "ProjectItemID":this.currentSelect.item.Id
  751. }
  752. console.log('删除文件 发送数据 '," 地址 ",url," 数据 ",data,"项目数据",this.projectData)
  753. uni.request({
  754. url: url,
  755. data: data,
  756. method: "POST",
  757. dataType: "json",
  758. success: res => {
  759. console.log('删除文件 返回',res)
  760. if (res.data.Code == 100) {
  761. this.getFileList();
  762. }
  763. }
  764. })
  765. },
  766. DownloadFile() {
  767. window.location.href = this.currentSelect.item.URL;
  768. },
  769. shut_down_pop_view(){
  770. // this.bShowPopView = false;
  771. },
  772. confirm_modify(){
  773. this.bShowPopView = false;
  774. this.projectData[0].ProjectName = this.projectName;
  775. this.projectData[0].Type = this.projectType;
  776. this.projectData[0].Describe = this.projectDescribe;
  777. uni.request({
  778. url: this.$Api + "/project/changeprojectinfo",
  779. data: {
  780. "UserID":this.projectData[0].CreateUserID,
  781. "ProjectID" : this.projectData[0].Id,
  782. "ProjectName":this.projectName,
  783. "Describe":this.projectDescribe, // 项目描述
  784. "Type":this.projectType
  785. },
  786. method: "POST",
  787. dataType: "json",
  788. success: res => {
  789. console.log('是否成功',res)
  790. if (res.data.Code == 100) {
  791. this.getlist()
  792. }
  793. }
  794. })
  795. },
  796. cancel_modify(){
  797. this.bShowPopView = false;
  798. this.projectName=this.projectData[0].ProjectName;
  799. this.projectType=this.projectData[0].Type;
  800. this.projectDescribe=this.projectData[0].Describe;
  801. },
  802. onInputProjectName(e){
  803. this.projectName=e.detail.value;
  804. },
  805. onInputProjectType(e){
  806. this.projectType=e.detail.value;
  807. },
  808. onInputProjectDescribe(e){
  809. this.projectDescribe=e.detail.value;
  810. }
  811. }
  812. }
  813. </script>
  814. <style lang="scss">
  815. .m_right {
  816. width: 100%;
  817. margin-top: 5rpx;
  818. // padding: 0 150rpx;
  819. background-color: #fff;
  820. box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
  821. .m_right_container {
  822. padding: 150rpx;
  823. }
  824. .s_logo {
  825. width: 100%;
  826. height: 800rpx;
  827. }
  828. .m_right_hander {
  829. text-align: right;
  830. height: 250rpx;
  831. position: relative;
  832. .m_btn_red {
  833. position: absolute;
  834. height: 80rpx;
  835. line-height: 80rpx;
  836. padding: 0 40rpx;
  837. right: 0;
  838. top: 50%;
  839. transform: translateY(-50%);
  840. background: #EA252C;
  841. color: #fff;
  842. }
  843. }
  844. }
  845. .m_btn_download {
  846. height: 80rpx;
  847. line-height: 80rpx;
  848. padding: 0 70rpx;
  849. background: #EA252C;
  850. color: #fff;
  851. font-family: MicrosoftYaHei;
  852. }
  853. tbody tr {
  854. border-top: 2rpx solid #DDDDDD !important;
  855. }
  856. tbody tr th:first-child {
  857. position: relative;
  858. }
  859. tbody tr th {
  860. font-weight: 400 !important;
  861. height: 140rpx;
  862. line-height: 140rpx;
  863. }
  864. tbody tr:hover {
  865. // color: #fff;
  866. background: #FDEBEC;
  867. // opacity: 0.08;
  868. }
  869. .form-input {
  870. width: 100%;
  871. border: 1px solid #ece8e8;
  872. line-height: 50rpx;
  873. font-size: 30rpx;
  874. border-radius: 6rpx;
  875. padding: 10rpx 40rpx;
  876. }
  877. .m-table-hander {
  878. background-color: #FFF8F7;
  879. height: 140rpx;
  880. line-height: 140rpx;
  881. font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
  882. font-weight: bold;
  883. }
  884. .m_edit {
  885. position: absolute;
  886. top: 50%;
  887. left: 50%;
  888. transform: translate(-50%, -50%);
  889. background: rgb(67, 127, 250);
  890. color: rgb(255, 255, 255);
  891. min-width: 130rpx;
  892. }
  893. .m_delete {
  894. position: absolute;
  895. top: 50%;
  896. left: 50%;
  897. min-width: 130rpx;
  898. transform: translate(-50%, -50%);
  899. background: rgb(234, 37, 44);
  900. color: rgb(255, 255, 255);
  901. }
  902. .m_edit_1 {
  903. position: absolute;
  904. top: 50%;
  905. left: 50%;
  906. transform: translate(-50%, -50%);
  907. background: rgb(67, 127, 250);
  908. color: rgb(255, 255, 255);
  909. min-width: 110rpx;
  910. }
  911. .m_delete_1 {
  912. position: absolute;
  913. top: 50%;
  914. left: 50%;
  915. min-width: 110rpx;
  916. transform: translate(-50%, -50%);
  917. background: rgb(234, 37, 44);
  918. color: rgb(255, 255, 255);
  919. }
  920. .m_right_footer {
  921. margin-top: 80rpx;
  922. }
  923. .m_logoimg {
  924. width: 80rpx;
  925. height: 80rpx;
  926. position: absolute;
  927. top: 50%;
  928. left: 50%;
  929. transform: translate(-50%, -50%);
  930. }
  931. .m_paging {
  932. text-align: right;
  933. .m_paging_item {
  934. padding: 10rpx 18rpx;
  935. border: 1rpx solid #DDDDDD;
  936. border-radius: 8rpx;
  937. margin-right: 10rpx;
  938. }
  939. .p_act {
  940. background: #EA252C;
  941. color: #fff;
  942. border: inherit;
  943. }
  944. }
  945. .m_paging_item:hover {
  946. background: #EA252C;
  947. color: #fff;
  948. border: inherit;
  949. }
  950. .m_act1 {
  951. color: #FF0019;
  952. }
  953. .m_row {
  954. display: flex;
  955. height: 60rpx;
  956. line-height: 60rpx;
  957. font-size: 30rpx;
  958. color: #ea252c;
  959. padding: 0 0 80rpx 0;
  960. }
  961. .m_audit {
  962. position: absolute;
  963. top: 50%;
  964. left: 50%;
  965. min-width: 65px;
  966. -webkit-transform: translate(-50%, -50%);
  967. transform: translate(-50%, -50%);
  968. color: white;
  969. background-color: #FF791B;
  970. }
  971. .m_audit_1 {
  972. position: absolute;
  973. top: 50%;
  974. left: 50%;
  975. min-width: 55px;
  976. -webkit-transform: translate(-50%, -50%);
  977. transform: translate(-50%, -50%);
  978. color: white;
  979. background-color: #FF791B;
  980. }
  981. .m_row_link {
  982. width: 10rpx;
  983. height: 60rpx;
  984. background-color: #ea252c;
  985. margin-right: 40rpx;
  986. }
  987. .m_row_title {
  988. color: #ea252c;
  989. font-weight: bold;
  990. font-size: 40rpx;
  991. }
  992. /*向下*/
  993. .triangle_border_down {
  994. width: 0;
  995. height: 0;
  996. border-width: 25rpx 25rpx 0;
  997. border-style: solid;
  998. border-color: #ea252c transparent transparent;
  999. /*灰 透明 透明 */
  1000. margin: 20rpx auto;
  1001. position: relative;
  1002. }
  1003. .m_row_class {
  1004. margin-bottom: 60rpx;
  1005. }
  1006. .addMember_box{
  1007. margin-bottom: 50rpx;
  1008. height: 80rpx;
  1009. }
  1010. .addMember_input_box{
  1011. width: 500rpx;
  1012. height: 80rpx;
  1013. }
  1014. .addMember_input {
  1015. width: 100%;
  1016. height: 100%;
  1017. border: 1px solid #ece8e8;
  1018. line-height: 50rpx;
  1019. font-size: 30rpx;
  1020. border-radius: 6rpx;
  1021. padding: 10rpx 40rpx;
  1022. }
  1023. .addMember_btn {
  1024. width: 130rpx;
  1025. height: 80rpx;
  1026. transform: translate(-50%, -50%);
  1027. background: rgb(234, 37, 44);
  1028. color: rgb(255, 255, 255);
  1029. }
  1030. .blank{
  1031. border:1px solid black;
  1032. }
  1033. .table{
  1034. border:1px solid black;
  1035. }
  1036. .input-item {
  1037. border:1px solid black;
  1038. }
  1039. .pop_view{
  1040. position: fixed;
  1041. display: flex;
  1042. justify-content: center;
  1043. align-items:center;/*垂直居中*/
  1044. width: 100%;
  1045. height: 100%;
  1046. top: 0rpx;
  1047. left: 0rpx;
  1048. // z-index: 100;
  1049. background-color:rgba(0,0,0,0.5)
  1050. }
  1051. .edit_form{
  1052. width: 25%;
  1053. height: 50%;
  1054. background-color:rgba(255,255,255,1);
  1055. display: flex;
  1056. justify-content: center;
  1057. // justify-content: space-between;
  1058. align-items:center;
  1059. .edit_BG{
  1060. width: 90%;
  1061. height: 90%;
  1062. display: flex;
  1063. justify-content: space-between;
  1064. align-items:center;
  1065. flex-direction:column;
  1066. // border:1rpx solid #000000;
  1067. .edit_row{
  1068. width: 90%;
  1069. height: 50%;
  1070. // border:1rpx solid #000000;
  1071. display: flex;
  1072. // justify-content: space-between;
  1073. align-items:center;
  1074. flex-direction:row;
  1075. }
  1076. }
  1077. }
  1078. .edit_title
  1079. {
  1080. width: 80%;
  1081. height: 100%;
  1082. font-size: 70rpx;
  1083. color: #000000;
  1084. // border:1rpx solid #000000;
  1085. display: flex;
  1086. justify-content: center;
  1087. align-items:center;
  1088. margin-bottom:10%;
  1089. }
  1090. .edit_text{
  1091. width: 50%;
  1092. height: 50%;
  1093. font-size: 30rpx;
  1094. color: #000000;
  1095. // border:1rpx solid #000000;
  1096. }
  1097. .input_frame{
  1098. width: 100%;
  1099. height: 80%;
  1100. border:1rpx solid #000000;
  1101. border-radius: 25rpx;
  1102. display: flex;
  1103. justify-content: center;
  1104. align-items:center;
  1105. }
  1106. .edit_input{
  1107. font-size: 30rpx;
  1108. color: #000000;
  1109. width: 80%;
  1110. height: 100%;
  1111. // border:1rpx solid #000000;
  1112. }
  1113. .modify_btn
  1114. {
  1115. width: 90%;
  1116. height: 50%;
  1117. // border:1rpx solid #000000;
  1118. display: flex;
  1119. align-items:center;
  1120. flex-direction:row;
  1121. margin-top:10%;
  1122. }
  1123. .modify_confirm
  1124. {
  1125. background: rgb(67, 127, 250);
  1126. color: rgb(255, 255, 255);
  1127. min-width: 30%;
  1128. }
  1129. .modify_cancel
  1130. {
  1131. min-width: 30%;
  1132. background: rgb(234, 37, 44);
  1133. color: rgb(255, 255, 255);
  1134. }
  1135. .m_msg {
  1136. width: 1500rpx;
  1137. height: 900rpx;
  1138. padding: 0rpx 0 40rpx 0;
  1139. position: fixed;
  1140. top: 50%;
  1141. left: 50%;
  1142. border-radius: 10rpx;
  1143. transform: translate(-50%, -50%);
  1144. z-index: 100;
  1145. background-color: #fff;
  1146. opacity: 1;
  1147. .layout{
  1148. position: absolute;
  1149. left: 50%;
  1150. bottom: 2%;
  1151. }
  1152. .m_edit {
  1153. position: relative;
  1154. left: 20%;
  1155. transform: translate(-50%, -50%);
  1156. background: rgb(67, 127, 250);
  1157. color: rgb(255, 255, 255);
  1158. min-width: 130rpx;
  1159. }
  1160. .m_delete {
  1161. position: relative;
  1162. left: 50%;
  1163. min-width: 130rpx;
  1164. transform: translate(-50%, -50%);
  1165. background: rgb(234, 37, 44);
  1166. color: rgb(255, 255, 255);
  1167. }
  1168. }
  1169. </style>