project.vue 33 KB

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