project.vue 30 KB

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