| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412 |
- <template>
- <view class="m_right">
- <!-- <image src="../../../assets/home/homeBG.jpg" class="s_logo" mode=""></image> -->
- <view class="m_right_container">
-
- <view class="m_row_class">
- <view class="m_row">
- <view class="m_row_link">
- </view>
- <view class="m_row_title" v-text="'项目管理'">
- </view>
- <view style="position: relative;margin-left: 40rpx;">
- <div class="triangle_border_down">
- <span></span>
- </div>
- </view>
- </view>
- <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
- <thead class="m-table-hander">
- <tr>
- <th>名称</th>
- <th>类型</th>
- <th>介绍</th>
- <th>创始人</th>
- <th>修改</th>
- <th>删除</th>
- </tr>
- </thead>
- <!-- <tbody class='table'> -->
- <tbody>
- <tr v-for="(item,index) in projectData" :key="index">
- <th>{{item.ProjectName}}</th>
- <th>{{item.Type}}</th>
- <th style="position: relative;"><button type="default" size="mini" @click="viewIntro(item)" class="m_edit">简介</button></th>
- <!-- <th>{{item.Describe}}</th> -->
- <th>{{item.CreateUserName}}</th>
- <th style="position: relative;"><button type="default" size="mini" @click="editProject(index)" class="m_edit">修改</button></th>
- <th style="position: relative;"><button type="default" size="mini" @click="deleteProject(index)" class="m_delete">删除</button></th>
- </tr>
- </tbody>
- </table>
- </view>
- <view class="m_row_class">
- <view class="" style="display: flex;justify-content: space-between;">
- <view class="m_row">
- <view class="m_row_link">
- </view>
- <view class="m_row_title" v-text="'文件管理'">
- </view>
- <view style="position: relative;margin-left: 40rpx;">
- <div class="triangle_border_down">
- <span></span>
- </div>
- </view>
- </view>
- <view class="">
- <button type="default" class="m_btn_download" size="mini" @click="onClick_addFile">添加文件</button>
- </view>
- </view>
- <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
- <thead class="m-table-hander">
- <tr>
- <th>文件</th>
- <th>文件名</th>
- <th>文件类型</th>
- <th>上传人</th>
- <th>上传日期</th>
- <th>下载</th>
- <th>删除</th>
- <th>审核</th>
- <th>审核状态</th>
- </tr>
- </thead>
- <tbody>
- <tr v-for="(item,index) in fileData" :key="index">
- <th>{{index+1}}</th>
- <th>{{item.Name}}</th>
- <th>{{item.Type}}</th>
- <th>{{item.UploadUserName}}</th>
- <th>{{item.UPloadTime.substring(0,9)}}</th>
- <th style="position: relative;"><button type="default" size="mini" @click="download(index,item)" class="m_edit_1">下载</button></th>
- <th style="position: relative;"><button type="default" size="mini" @click="deleteFile(index,item)" class="m_delete_1">删除</button></th>
- <th style="position: relative;"><button type="default" size="mini" @click="audit(index,item)" class="m_audit_1">审核</button></th>
- <th>{{getShenheText(item.Pass)}}</th>
- </tr>
- </tbody>
- </table>
- </view>
- <view class="m_row_class">
- <view class="" style="display: flex;justify-content: space-between;">
- <view class="m_row">
- <view class="m_row_link">
- </view>
- <view class="m_row_title" v-text="'成员管理'">
- </view>
- <view style="position: relative;margin-left: 40rpx;">
- <div class="triangle_border_down">
- <span></span>
- </div>
- </view>
- </view>
- <view class="">
- <button type="default" class="m_btn_download" size="mini" @click="addMember">添加学生</button>
- </view>
- </view>
- <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
- <thead class="m-table-hander">
- <tr>
- <th>用户名</th>
- <th>姓名</th>
- <th>专业</th>
- <th>班级</th>
- <th>职务</th>
- <th>电话</th>
- <th>删除</th>
- </tr>
- </thead>
- <tbody>
- <tr v-for="(item,index) in projectMembers" :key="index">
- <th>{{item.User.IlabAccount}}</th>
- <th>{{item.User.Name}}</th>
- <th>{{item.User.Profession}}</th>
- <th>{{item.User.Class}}</th>
- <th>
- <div>
- {{item.User.Type}}
- </div>
- </th>
- <th>{{item.User.PhoneNum}}</th>
- <th><button type="default" size="mini" class="m_delete2" @click="deleteMember(item)" v-show="item.User.Id != projectData[0].CreateUserID">删除</button></th>
- </tr>
- </tbody>
- </table>
- </view>
- </view>
- <msg ref="msg" :title="title" @determine="determine" :btnArr="arr" v-show="show"></msg>
- <audit ref="audit" v-show="auditshow" @determine="determine"></audit>
- <!--修改对话框-->
- <view class="m_msg" v-show="editDialogshow">
- <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
- <thead class="m-table-hander">
- <tr>
- <th>名称</th>
- <th>类型</th>
- <th>介绍</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <th>
- <input class="uni-input" placeholder-style="color:#F76260" placeholder="名称" v-model="editDialogData.name"/>
- </th>
- <th>
- <picker class="form-input" @change="bindPickerChange_proType" :value="index_proType" :range="proType">
- <view class=" df fdr aic jcsb">
- <view>{{proType[index_proType]}}</view>
- <view>
- <img src="../../../assets/user/pic_user_03.png" />
- </view>
- </view>
- </picker>
- </th>
- <th>
- <input class="uni-input" placeholder-style="color:#F76260" placeholder="介绍" v-model="editDialogData.Introduction"/>
- </th>
- </tr>
- </tbody>
- </table>
- <view class="layout">
- <button type="default" size="mini" @click="editDialogDetermine(index)" class="m_edit">修改</button>
- <button type="default" size="mini" @click="editDialogCancel(index)" class="m_delete">取消</button>
- </view>
- </view>
- <!--添加用户对话框-->
-
- <view class="m_msg" v-show="isShowAddMember">
- <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
- <thead class="m-table-hander">
- <tr>
- <th>名称</th>
- <th>类型</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <th>
- <view class="addMember_input_box">
- <input class="addMember_input" type="string" v-model="addedMemberModel.IlabAccount" placeholder="学员id" />
- </view>
- </th>
- <th>
- <picker class="form-input" @change="bindPickerChange_proTypeadd" :value="index_addproType" :range="addproType">
- <view class=" df fdr aic jcsb">
- <view>{{addproType[index_addproType]}}</view>
- <view>
- <img src="../../../assets/user/pic_user_03.png" />
- </view>
- </view>
- </picker>
- </th>
- </tr>
- </tbody>
- </table>
- <view class="layout">
- <button type="default" size="mini" @click="addMemberData(index)" class="m_edit">添加</button>
- <button type="default" size="mini" @click="addMemberDataCancel(index)" class="m_delete">取消</button>
- </view>
- </view>
- <!--修改文件对话框-->
- <view class="pop_view" @touchmove.stop.prevent = "stopPenetrate" @click="shut_down_pop_view()" v-if='bShowEdit'>
- <view class="edit_form" @touchmove.stop.prevent = "stopPenetrate">
- <view class="edit_BG">
- <view class="edit_title">修改</view>
-
- <view class="edit_row">
- <text selectable="true"class="edit_text">名称</text>
- <view class="input_frame">
- <input class="edit_input" type="string" v-model="projectName" placeholder="" @input="onInputProjectName"/>
- </view>
- </view>
- <view class="edit_row">
- <text selectable="true"class="edit_text">类型</text>
- <view class="input_frame">
- <!-- <input class="edit_input" type="string" v-model="projectType" placeholder="" @input="onInputProjectType"/> -->
-
- <picker class="form-input" @change="onInputProjectType" :value="projectType" :range="proType">
- <view class=" df fdr aic jcsb">
- <view>{{proType[projectType]}}</view>
- <view>
- <img src="../../../assets/user/pic_user_03.png" />
- </view>
- </view>
- </picker>
- </view>
- </view>
- <view class="edit_row">
- <text selectable="true"class="edit_text">描述</text>
- <view class="input_frame">
- <input class="edit_input" type="string" v-model="projectDescribe" placeholder="" @input="onInputProjectDescribe"/>
- </view>
- </view>
-
- <view class='modify_btn'>
- <button type="default" size="mini" @click="confirm_modify()" class="modify_confirm">确认</button>
- <button type="default" size="mini" @click="cancel_modify()" class="modify_cancel">取消</button>
- </view>
- </view>
- </view>
- </view>
- <!--上传文件对话框-->
- <view class="pop_view" @touchmove.stop.prevent = "stopPenetrate" @click="shut_down_pop_view()" v-if='bShowUpLoadFile'>
- <view class="edit_form" @touchmove.stop.prevent = "stopPenetrate">
- <view class="edit_BG">
- <view class="edit_title">上传文件</view>
- <view class="edit_row">
- <text selectable="true"class="edit_text">名称</text>
- <view class="input_frame">
- <input class="edit_input" type="string" placeholder="文件名" @input="onSelectFileName"/>
- </view>
- </view>
- <view class="edit_row">
- <text selectable="true"class="edit_text">类型</text>
- <view class="input_frame">
- <picker class="form-input" @change="onSelectFileType" :value="fileType" :range="addFileType">
- <view class=" df fdr aic jcsb">
- <view>{{addFileType[fileType]}}</view>
- <view>
- <img src="../../../assets/user/pic_user_03.png" />
- </view>
- </view>
- </picker>
- </view>
- </view>
- <view class='modify_btn'>
- <button type="default" size="mini" @click="confirm_file_upload()" class="modify_confirm">确认</button>
- <button type="default" size="mini" @click="cancel_file_upload()" class="modify_cancel">取消</button>
- </view>
- </view>
- </view>
- </view>
- <!--添加学生-->
- <view class="pop_view" @touchmove.stop.prevent = "stopPenetrate" @click="shut_down_pop_view()" v-if='bShowAddStu'>
- <view class="edit_form" @touchmove.stop.prevent = "stopPenetrate">
- <view class="edit_BG">
- <view class="edit_title">添加学生</view>
- <view class="edit_row">
- <text selectable="true"class="edit_text">姓名</text>
- <view class="input_frame">
- <input class="edit_input" type="string" placeholder="姓名" @input="onInputStuName"/>
- </view>
- </view>
- <view class="edit_row">
- <text selectable="true"class="edit_text">类型</text>
- <view class="input_frame">
- <picker class="form-input" @change="onSelectStuType" :value="stuType" :range="addproType">
- <view class=" df fdr aic jcsb">
- <view>{{addproType[stuType]}}</view>
- <view>
- <img src="../../../assets/user/pic_user_03.png" />
- </view>
- </view>
- </picker>
- </view>
- </view>
- <view class='modify_btn'>
- <button type="default" size="mini" @click="confirm_add_stu()" class="modify_confirm">确认</button>
- <button type="default" size="mini" @click="cancel_add_stu()" class="modify_cancel">取消</button>
- </view>
- </view>
- </view>
- </view>
- <!--上传文件对话框-->
- <view class="m_msg" v-show="isShowAddFile">
- <table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
- <thead class="m-table-hander">
- <tr>
- <th>名字</th>
- <th>类型</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <th>
- <view class="addMember_input_box">
- <input class="addMember_input" type="string" v-model="fileDialogData.name" placeholder="文件名字" />
- </view>
- </th>
- <th>
- <picker class="form-input" @change="bindPickerChange_fileType" :value="index_FileType" :range="addFileType">
- <view class=" df fdr aic jcsb">
- <view>{{addFileType[index_FileType]}}</view>
- <view>
- <img src="../../../assets/user/pic_user_03.png" />
- </view>
- </view>
- </picker>
- </th>
- </tr>
- </tbody>
- </table>
- <view class="layout">
- <button type="default" size="mini" @click="addFileData(index)" class="m_edit">添加</button>
- <button type="default" size="mini" @click="addFileDataCancel(index)" class="m_delete">取消</button>
- </view>
- </view>
- </view>
- </template>
- <script>
- import msg from "./msg.vue"
- import audit from "./audit.vue"
- export default {
- name: "home_project",
- data() {
- return {
- index: 1,
- title: "",
- show: false,
- auditshow: false,
- callback: "",
- arr: [],
- data: [],
- projectData: [],
- ProjectItem: [],
- fileData: [],
- projectMembers: [],
- isShowAddMember: false,
- isShowAddFile: false,
- addedMemberModel: {
- "IlabAccount": '',
- "type": ''
- },
- currentSelect:{section:-1,buttonType:'',index:-1},
- Type:'asd',
- editDialogshow : false,
- editDialogData : {name : "", type :"", Introduction : ""},
- // proType: ['科幻', '现实', '剧情', '历史', '爱情', '惊悚', '公路', '动画'],
- proType: ['科幻', '现实', 'XR', '主旋律', 'VR'],
- addproType: ['编剧', '摄影师' ,'录音师', '灯光师', '创建人','美术师'],
- addFileType: ['剧本' ,'拍摄脚本' ,'分镜头脚本' ,'气氛图', '项目简介', '项目报告' ,'场景图'],
- index_addproType : 0,
- index_proType : 0,
- index_FileType : 0,
- fileDialogData : {name : "", type :""},
- //修改项目信息
- bShowEdit:false,
- projectName:'',
- projectType:0,
- projectDescribe:'',
- //上传文件
- bShowUpLoadFile:false,
- fileName:'',
- fileType:0,
- filePath:null,
- //添加学生
- bShowAddStu:false,
- stuName:'',
- stuType:0,
- }
- },
- components: {
- msg,
- audit,
- },
- methods: {
- stopPenetrate(){
- return;
- },
- paging(obj) {
- this.index = obj;
- },
- viewIntro(item){
- uni.showModal({
- title: '简介',
- showCancel: false,
- content: item.Describe,
- success: function (res) {
- if (res.confirm) {
- console.log('确定');
- } else if (res.cancel) {
- console.log('取消');
- }
- }
- });
- },
- editProject(index) {
- //修改按钮赋值
- this.projectName=this.projectData[0].ProjectName;
-
- for(let i=0;i<this.proType.length;i++)
- {
- let item = this.proType[i];
- if(item == this.projectData[0].Type)
- {
- this.projectType = i;
- }
- }
- // this.projectType=this.projectData[0].Type;
- this.projectDescribe=this.projectData[0].Describe;
- this.bShowEdit = true;
- },
- //审核状态中文
- getShenheText(pass){
- let t = "成功"
- if (pass == false) {
- t = "失败"
- }
- return t
- },
- deleteProject(index) {
- this.title = "是否删除信息?";
- this.arr = ["删除", "取消"]
- this.show = true;
- this.currentSelect = {section:0,buttonType:'delete',index:index};
- },
- download(index,item) {
- this.title = "是否确定下载?";
- this.arr = ["确认"];
- this.show = true;
- this.currentSelect = {section:0,buttonType:'downloadIMG',index:index,item:item};
- },
- deleteFile(index,item) {
- this.title = "是否删除文件?";
- this.arr = ["删除", "取消"]
- this.show = true;
- this.currentSelect = {section:0,buttonType:'deleteFile',index:index,item:item};
- },
- audit(index,item) {
- this.title = "是否确认审核?";
- this.arr = ["通过", "未通过"]
- this.show = true;
- this.callback = "audit"
- // this.auditshow = true;
- this.currentSelect = {section:0,buttonType:'audit',index:index,item:item};
- },
- editSave() {
- if (this.editDialogData.name == "") {
- alert("请输入项目名称~");
- return false;
- }
- if (this.editDialogData.type == "") {
- alert("请输入项目类型~");
- return false;
- }
- if (this.editDialogData.Introduction == "") {
- alert("请输入项目介绍~");
- return false;
- }
- console.log("创建项目的用户ID",mydata_userInfo.UserID);
- uni.request({
- url: mydata_api + "/project/changeprojectinfo",
- data: {
- "UserID":this.projectData[0].CreateUserID,
- "ProjectID" : this.projectData[0].Id,
- "ProjectName":this.editDialogData.name,
- "Describe":this.editDialogData.Introduction, // 项目描述
- "Type":this.editDialogData.type
- },
- method: "POST",
- dataType: "json",
- success: res => {
- console.log('是否成功',res)
- if (res.data.Code == 100) {
- this.getlist()
- this.editDialogshow = false
- return true;
- }
- }
- })
- },
- editDialogDetermine(){
- this.editSave()
- },
- editDialogCancel(){
- this.editDialogshow = false
- this.editDialogData = {name : "", type :"", Introduction : ""}
- },
- determine(obj) {
- this.show = false;
- this.auditshow = false;
- // console.log("点了 对话框", obj);
- switch (this.currentSelect.section) {
- case 0: //項目管理
- switch (this.currentSelect.buttonType) {
- case 'delete':
- // console.log("点了 删除", this.currentSelect);
- if (obj == 0) {
- // console.log("点了 确定删除", this.currentSelect);
- this.deleteItemProject()
- }else if(obj == 1){
- // console.log("点了 取消删除", this.currentSelect);
- }
- break;
- case 'edit':
- // console.log("点了 修改", this.currentSelect);
- if (obj == 0) {
- // console.log("点了 确定修改", this.currentSelect,this.projectData[0]);
- this.editDialogData = {name : this.projectData[0].ProjectName, type :this.projectData[0].Type, Introduction : this.projectData[0].Describe}
- this.editDialogshow = true
- // console.log("修改数据", this.editDialogData);
- }else if(obj == 1){
- this.editDialogData = {name : "", type :"", Introduction : ""}
- // console.log("点了 取消修改", this.currentSelect);
- }
- break;
- case 'downloadIMG':
- // console.log("点了 下载", this.currentSelect);
- if (obj == 0) {
- // console.log("点了 确定下载", this.currentSelect,this.projectData[0]);
- this.DownloadFile()
- }else if(obj == 1){
- // this.editDialogData = {name : "", type :"", Introduction : ""}
- // console.log("点了 取消下载", this.currentSelect);
- }
- break;
- case 'deleteFile':
- // console.log("点了 删除", this.currentSelect);
- if (obj == 0) {
- // console.log("点了 确定删除", this.currentSelect,this.projectData[0]);
- this.delFile()
- }else if(obj == 1){
- // this.editDialogData = {name : "", type :"", Introduction : ""}
- // console.log("点了 取消删除", this.currentSelect);
- }
- break;
- case 'audit':
- // console.log("点了 审核", this.currentSelect);
- if (obj == 0) {
- // console.log("点了 确定审核", this.currentSelect,this.projectData[0]);
- let data = {
- ProjectItemID: this.currentSelect.item,
- Pass: true
- }
- this.auditPost(data);
- }else if(obj == 1){
- // this.editDialogData = {name : "", type :"", Introduction : ""}
- // console.log("点了 取消审核", this.currentSelect);
- let data = {
- ProjectItemID: this.currentSelect.item,
- Pass: false
- }
- this.auditPost(data);
- }
- break;
- default:
- break;
- }
- break;
- default:
- break;
- }
- this.currentSelect = {section:-1,buttonType:'',index:-1}
- // console.log(obj)
- },
- auditPost(obj) {
- console.log("审核信息", obj.ProjectItemID.ProjectID);
- let url = mydata_api + "/project/setfilepass"
- let data = {
- "ProjectItemID" : obj.ProjectItemID.Id,
- "Pass":obj.Pass,
- }
- console.log('审核 发送数据 '," 地址 ",url," 数据 ",data,"项目数据",this.projectData)
- uni.request({
- url: url,
- data: data,
- method: "POST",
- dataType: "json",
- success: res => {
- console.log('审核 返回',res)
- if (res.data.Code == 100) {
- this.getFileList();
- }
- }
- })
- },
- getlist() {
- uni.request({
- url: mydata_api + "/project/getprojectcontent",
- data: {
- "UserID": mydata_userInfo.UserID,
- "ProjectID": this.projectData[0].Id
- },
- method: "POST",
- dataType: "json",
- success: res => {
- if (res.data.Code == 100) {
- // this.projectData[0] = null
- this.projectData[0] = res.data.Project;
- // console.log('projectData=',this.projectData[0])
- this.$forceUpdate()
- }
- // console.log("获取了什么样子的信息", this.projectData[0]);
- }
- })
- },
- getFileList() {
- uni.request({
- url: mydata_api + "/project/getprojectcontent",
- data: {
- "UserID": mydata_userInfo.UserID,
- "ProjectID": this.projectData[0].Id
- },
- method: "POST",
- dataType: "json",
- success: res => {
- this.fileData = res.data.ProjectItem;
- // console.log('刷新所有文件=',this.fileData)
- }
- })
- },
- viewProject(obj,index) {
- // console.log('进来的什么信息',obj)
- this.projectData = [obj];
- // if(index==0){
- // this.fileData = [
- // {
- // "AliyunOssName": "_59458299-3b84-4895-98f6-b990cdaedc72_chrome_elf.dll",
- // "Id": "0b0d8876-71de-43e6-a3dd-59a3c8f6d069",
- // "Name": "《火星计划》气氛图",
- // "Pass": false,
- // "ProjectID": 30,
- // "ProjectName": "《火星计划》",
- // "Type": "气氛图",
- // "UPloadTime": "2021-05-13 18:19:12",
- // "URL": "https://www.yuyekeji.cn/H5/ZhongChuang/《火星计划》气氛图.jpeg",
- // "UpLoadUserID": "59458299-3b84-4895-98f6-b990cdaedc72",
- // "UploadUserDuty": "创建人",
- // "UploadUserName": "朱峰",
- // },
- // {
- // "AliyunOssName": "_59458299-3b84-4895-98f6-b990cdaedc72_chrome_elf.dll",
- // "Id": "0b0d8876-71de-43e6-a3dd-59a3c8f6d069",
- // "Name": "《火星计划》气氛图2",
- // "Pass": false,
- // "ProjectID": 30,
- // "ProjectName": "《火星计划》",
- // "Type": "气氛图",
- // "UPloadTime": "2021-05-13 18:19:12",
- // "URL": "https://www.yuyekeji.cn/H5/ZhongChuang/《火星计划》气氛图2.jpg",
- // "UpLoadUserID": "59458299-3b84-4895-98f6-b990cdaedc72",
- // "UploadUserDuty": "创建人",
- // "UploadUserName": "朱峰",
- // }
- // ]
- // return;
- // }
-
- this.getFileList();
- this.getMemberList();
- },
- getMemberList() {
- var temp = {
- "ProjectID": this.projectData[0].Id
- }
- uni.request({
- url: mydata_api + "/project/getmember",
- data: temp,
- method: "POST",
- dataType: "json",
- success: res => {
- console.log("请求学生", res);
- if (res.data.Code == 100) {
- this.projectMembers = res.data.Users;
- // console.log();
- }
- }
- })
- },
- addMember() {
- // this.isShowAddMember = true;
- this.bShowAddStu = true;
- },
- addFileData(){
- uni.chooseImage({
- success: (chooseImageRes) => {
- console.log('选择文件成功')
- const tempFilePaths = chooseImageRes.tempFilePaths;
- uni.uploadFile({
- url: mydata_api+'/project/uploadprojectfile',
- filePath: tempFilePaths[0],
- name: 'file',
- formData: {
- "UserID": this.projectData[0].CreateUserID,
- "Name": this.fileDialogData.name,
- "Type": this.fileDialogData.type,
- "ProjectID": this.projectData[0].Id,
- },
- success: (uploadFileRes) => {
- console.log('upload ok=', uploadFileRes.data);
- this.isShowAddFile = false
- this.fileDialogData = {name : "", type :""}
- this.getFileList();
- // alert("创建成功");
- }
- });
- }
- });
- },
- addFileDataCancel(){
- this.isShowAddFile = false
- },
- addMemberDataCancel(){
- this.isShowAddMember = false;
- },
- onClick_addMember_ok() {
- console.log("添加学生", this.addedMemberModel);
- var temp = {
- "UserID": this.projectData[0].CreateUserID, //项目创建人ID
- "ProjectID": this.projectData[0].Id, //项目ID
- "AddUserID": mydata_userInfo.UserID, //添加人员ID 支持ilabID UserID
- "Type": "美术师" //编剧 摄影师 录音师 灯光师 创建人
- }
- uni.request({
- url: mydata_api + "/project/getmember",
- data: temp,
- method: "POST",
- dataType: "json",
- success: res => {
- // console.log("请求学生", res);
- if (res.data.Code == 100) {
- this.projectMembers = res.data.Users;
- console.log();
- }
- }
- })
- },
- onClick_addFile(){
- // console.log("项目 点了添加文件")
- // this.isShowAddFile = true
-
- uni.chooseFile({
- success: (chooseImageRes) => {
- this.filePath = chooseImageRes.tempFilePaths;
- this.bShowUpLoadFile = true;
- }
- });
- },
- //删除项目
- deleteItemProject(){
- // console.log('mydata_api=',mydata_api)
- // console.log('UserID=',mydata_userInfo.UserID)
- // console.log('ProjectID=',this.projectData[0].Id)
- var temp = {
- "UserID":this.projectData[0].CreateUserID,
- "ProjectID" : (this.projectData[0].Id).toString(),
- }
- console.log("删除项目为",temp)
- uni.request({
- url: mydata_api + "/backstage/deleteproject",
- data: temp,
- method: "POST",
- dataType: "json",
- success: res => {
- console.log("delete project ok", res);
- this.$emit('onBackToProjectList');
- this.getlist()
- this.$forceUpdate();//强制刷新页面
- }
- })
- },
- bindPickerChange_proType: function(e) {
- this.index_proType = e.target.value;
- this.editDialogData.type = this.proType[this.index_proType];
- // console.log(this.model)
- },
- bindPickerChange_proTypeadd: function(e) {
- this.index_addproType = e.target.value;
- this.addedMemberModel.type = this.addproType[this.index_addproType];
- // console.log(this.model)
- },
- bindPickerChange_fileType: function(e) {
- this.index_FileType = e.target.value;
- this.fileDialogData.type = this.addFileType[this.index_FileType];
- // console.log(this.model)
- },
- deleteMember(item){
- console.log('删掉成员 ',item)
- let url = mydata_api + "/project/deletemember"
- let data = {
- "userID" : this.projectData[0].CreateUserID,
- "DeleteUserID":item.User.Id,
- "ProjectID":this.projectData[0].Id,
- }
- console.log('删掉成员 发送数据 '," 地址 ",url," 数据 ",data)
- uni.request({
- url: url,
- data: data,
- method: "POST",
- dataType: "json",
- success: res => {
- console.log('删掉成员 返回',res)
- if (res.data.Code == 100) {
- // this.$refs.table.getList();
- this.getMemberList();
- this.$forceUpdate();//强制刷新页面
- }
- // this.projectData.splice(index,index);
- }
- })
- },
- delFile(){
- // this.currentSelect
- console.log('删除文件', this.currentSelect)
- // SetFilePass
- let url = mydata_api + "/project/deleteprojectcontent"
- // "UserID":"xxxx", //上传人或者项目创建人
- // "ProjectItemID" : "123"
- let data = {
- "UserID" : this.projectData[0].CreateUserID,
- "ProjectItemID":this.currentSelect.item.Id
- }
- console.log('删除文件 发送数据 '," 地址 ",url," 数据 ",data,"项目数据",this.projectData)
- uni.request({
- url: url,
- data: data,
- method: "POST",
- dataType: "json",
- success: res => {
- console.log('删除文件 返回',res)
- if (res.data.Code == 100) {
- this.getFileList();
- }
- }
- })
- },
- DownloadFile() {
- window.open(this.currentSelect.item.URL);
- },
- shut_down_pop_view(){
- // this.bShowEdit = false;
- },
- confirm_modify(){
- this.bShowEdit = false;
-
- this.projectData[0].ProjectName = this.projectName;
- this.projectData[0].Type = this.proType[this.projectType];
- this.projectData[0].Describe = this.projectDescribe;
-
- uni.request({
- url: mydata_api + "/project/changeprojectinfo",
- data: {
- "UserID":this.projectData[0].CreateUserID,
- "ProjectID" : this.projectData[0].Id,
- "ProjectName":this.projectData[0].ProjectName,
- "Describe":this.projectData[0].Describe, // 项目描述
- "Type":this.projectData[0].Type
- },
- method: "POST",
- dataType: "json",
- success: res => {
- console.log('是否成功',res)
- if (res.data.Code == 100) {
- this.getlist()
- }
- }
- })
- },
- cancel_modify(){
- this.bShowEdit = false;
- this.projectName=this.projectData[0].ProjectName;
- this.projectType=this.projectData[0].Type;
- this.projectDescribe=this.projectData[0].Describe;
- },
- onInputProjectName(e){
- this.projectName=e.detail.value;
- },
- onInputProjectType(e){
- this.projectType=e.detail.value;
- },
- onInputProjectDescribe(e){
- this.projectDescribe=e.detail.value;
- },
- //添加文件
- onSelectFileName(e){
- this.fileName=e.detail.value;
- },
- onSelectFileType(e){
- this.fileType=e.detail.value;
- },
- confirm_file_upload(){
-
- uni.showLoading({
- title: '上传中'
- });
- let fileType = this.addFileType[this.fileType];
- uni.uploadFile({
- url: mydata_api+'/project/uploadprojectfile', //仅为示例,非真实的接口地址
- filePath: this.filePath[0],
- name: 'file',
- formData: {
- "UserID": this.projectData[0].CreateUserID,
- "Name": this.fileName,
- "Type": fileType,
- "ProjectID": this.projectData[0].Id,
- },
- success: (uploadFileRes) => {
- // console.log('upload ok=', uploadFileRes.data);
- uni.hideLoading();
- this.bShowUpLoadFile = false;
- this.getFileList();
- // setTimeout(function(){
- // alert("创建成功");
- // },500)
- }
- });
- },
- cancel_file_upload(){
- this.bShowUpLoadFile = false;
- this.fileName = '';
- this.fileType = '';
- this.filePath = null;
- },
- // 添加学生
- onInputStuName(e){
- this.stuName=e.detail.value;
- },
- onSelectStuType(e){
- // addproType[stuType]
- this.stuType=e.detail.value;
- },
- confirm_add_stu(){
- console.log("添加学生", this.stuName,this.projectData[0]);
- if (this.stuName == "") {
- alert("学员id不能为空")
- return
- }
-
- let url = mydata_api + "/project/addmember"
- let data = {
- "UserID" : this.projectData[0].CreateUserID,
- "ProjectID":this.projectData[0].Id,
- "AddUserID":this.stuName,
- "Type":this.addproType[this.stuType],
- }
- // console.log('添加成员 发送数据 '," 地址 ",url," 数据 ",data,"项目数据",this.projectData)
-
- uni.request({
- url: url,
- data: data,
- method: "POST",
- dataType: "json",
- success: res => {
- console.log('添加成员 返回',res)
- if (res.data.Code == 100) {
- // this.$refs.table.getList();
- this.getMemberList();
- this.$forceUpdate();
- this.bShowAddStu = false;
-
- // setTimeout(function(){
- // alert("添加成功");
- // },500)
- return;
- }
-
- this.bShowAddStu = false;
- setTimeout(function(){
- alert("添加有误,请检查该学生是否存在");
- },500)
- }
- })
- },
- cancel_add_stu(){
- this.bShowAddStu = false;
- this.stuName = '';
- this.stuType = 0;
- }
- },
- }
- </script>
- <style lang="scss">
- .m_right {
- width: 100%;
- margin-top: 5rpx;
- // padding: 0 150rpx;
- background-color: #fff;
- box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
- .m_right_container {
- padding: 150rpx;
- }
- .s_logo {
- width: 100%;
- height: 800rpx;
- }
- .m_right_hander {
- text-align: right;
- height: 250rpx;
- position: relative;
- .m_btn_red {
- position: absolute;
- height: 80rpx;
- line-height: 80rpx;
- padding: 0 40rpx;
- right: 0;
- top: 50%;
- transform: translateY(-50%);
- background: #EA252C;
- color: #fff;
- }
- }
- }
- .m_btn_download {
- height: 80rpx;
- line-height: 80rpx;
- padding: 0 70rpx;
- background: #EA252C;
- color: #fff;
- font-family: MicrosoftYaHei;
- }
- tbody tr {
- border-top: 2rpx solid #DDDDDD !important;
- }
- tbody tr th:first-child {
- position: relative;
- }
- tbody tr th {
- font-weight: 400 !important;
- height: 140rpx;
- line-height: 140rpx;
- }
- tbody tr:hover {
- // color: #fff;
- background: #FDEBEC;
- // opacity: 0.08;
- }
- .form-input {
- width: 100%;
- border: 1px solid #ece8e8;
- line-height: 50rpx;
- font-size: 30rpx;
- border-radius: 6rpx;
- padding: 10rpx 40rpx;
- }
- .m-table-hander {
- background-color: #FFF8F7;
- height: 140rpx;
- line-height: 140rpx;
- font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
- font-weight: bold;
- }
- .m_edit {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- background: rgb(67, 127, 250);
- color: rgb(255, 255, 255);
- min-width: 130rpx;
- }
- .m_delete {
- position: absolute;
- top: 50%;
- left: 50%;
- min-width: 130rpx;
- transform: translate(-50%, -50%);
- background: rgb(234, 37, 44);
- color: rgb(255, 255, 255);
- }
-
- .m_delete2 {
- // position: absolute;
- // top: 50%;
- // left: 50%;
- // width: 80%;
- // transform: translate(-50%, -50%);
- background: rgb(234, 37, 44);
- color: rgb(255, 255, 255);
- // z-index: 3;
- }
-
- .m_edit_1 {
- // position: absolute;
- // top: 50%;
- // left: 50%;
- // transform: translate(-50%, -50%);
- background: rgb(67, 127, 250);
- color: rgb(255, 255, 255);
- // min-width: 110rpx;
- }
- .m_delete_1 {
- // position: absolute;
- // top: 50%;
- // left: 50%;
- // min-width: 110rpx;
- // transform: translate(-50%, -50%);
- background: rgb(234, 37, 44);
- color: rgb(255, 255, 255);
- }
- .m_right_footer {
- margin-top: 80rpx;
- }
- .m_logoimg {
- width: 80rpx;
- height: 80rpx;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- .m_paging {
- text-align: right;
- .m_paging_item {
- padding: 10rpx 18rpx;
- border: 1rpx solid #DDDDDD;
- border-radius: 8rpx;
- margin-right: 10rpx;
- }
- .p_act {
- background: #EA252C;
- color: #fff;
- border: inherit;
- }
- }
- .m_paging_item:hover {
- background: #EA252C;
- color: #fff;
- border: inherit;
- }
- .m_act1 {
- color: #FF0019;
- }
- .m_row {
- display: flex;
- height: 60rpx;
- line-height: 60rpx;
- font-size: 30rpx;
- color: #ea252c;
- padding: 0 0 80rpx 0;
- }
- .m_audit {
- position: absolute;
- top: 50%;
- left: 50%;
- min-width: 65px;
- -webkit-transform: translate(-50%, -50%);
- transform: translate(-50%, -50%);
- color: white;
- background-color: #FF791B;
- }
- .m_audit_1 {
- // position: absolute;
- // top: 50%;
- // left: 50%;
- // min-width: 55px;
- // -webkit-transform: translate(-50%, -50%);
- // transform: translate(-50%, -50%);
- color: white;
- background-color: #FF791B;
- }
- .m_row_link {
- width: 10rpx;
- height: 60rpx;
- background-color: #ea252c;
- margin-right: 40rpx;
- }
- .m_row_title {
- color: #ea252c;
- font-weight: bold;
- font-size: 40rpx;
- }
- /*向下*/
- .triangle_border_down {
- width: 0;
- height: 0;
- border-width: 25rpx 25rpx 0;
- border-style: solid;
- border-color: #ea252c transparent transparent;
- /*灰 透明 透明 */
- margin: 20rpx auto;
- position: relative;
- }
- .m_row_class {
- margin-bottom: 60rpx;
- }
- .addMember_box{
- margin-bottom: 50rpx;
- height: 80rpx;
- }
- .addMember_input_box{
- width: 500rpx;
- height: 80rpx;
- }
- .addMember_input {
- width: 100%;
- height: 100%;
- border: 1px solid #ece8e8;
- line-height: 50rpx;
- font-size: 30rpx;
- border-radius: 6rpx;
- padding: 10rpx 40rpx;
- }
- .addMember_btn {
- width: 130rpx;
- height: 80rpx;
- transform: translate(-50%, -50%);
- background: rgb(234, 37, 44);
- color: rgb(255, 255, 255);
- }
- .blank{
- border:1px solid black;
- }
- .table{
- border:1px solid black;
- }
- .input-item {
- border:1px solid black;
- }
- .pop_view{
- position: fixed;
-
- display: flex;
- justify-content: center;
- align-items:center;/*垂直居中*/
-
- width: 100%;
- height: 100%;
- top: 0rpx;
- left: 0rpx;
- // z-index: 100;
- background-color:rgba(0,0,0,0.5)
- }
- .edit_form{
- width: 25%;
- height: 50%;
- background-color:rgba(255,255,255,1);
-
- display: flex;
- justify-content: center;
- // justify-content: space-between;
- align-items:center;
-
- .edit_BG{
- width: 90%;
- height: 90%;
-
- display: flex;
- justify-content: space-between;
- align-items:center;
- flex-direction:column;
- // border:1rpx solid #000000;
-
- .edit_row{
-
- width: 90%;
- height: 50%;
- // border:1rpx solid #000000;
-
- display: flex;
- // justify-content: space-between;
- align-items:center;
- flex-direction:row;
- }
- }
- }
- .edit_title
- {
- width: 80%;
- height: 100%;
- font-size: 70rpx;
- color: #000000;
- // border:1rpx solid #000000;
-
- display: flex;
- justify-content: center;
- align-items:center;
-
- margin-bottom:10%;
- }
- .edit_text{
- width: 50%;
- height: 50%;
-
- font-size: 30rpx;
- color: #000000;
- // border:1rpx solid #000000;
- }
-
- .input_frame{
- width: 100%;
- height: 80%;
-
- border:1rpx solid #000000;
- border-radius: 25rpx;
-
- display: flex;
- justify-content: center;
- align-items:center;
-
- }
- .edit_input{
- font-size: 30rpx;
- color: #000000;
- width: 80%;
- height: 100%;
- // border:1rpx solid #000000;
- }
-
-
- .modify_btn
- {
- width: 90%;
- height: 50%;
- // border:1rpx solid #000000;
-
- display: flex;
- align-items:center;
- flex-direction:row;
-
- margin-top:10%;
- }
- .modify_confirm
- {
- background: rgb(67, 127, 250);
- color: rgb(255, 255, 255);
- min-width: 30%;
- }
- .modify_cancel
- {
- min-width: 30%;
- background: rgb(234, 37, 44);
- color: rgb(255, 255, 255);
- }
-
- .m_msg {
- width: 1500rpx;
- height: 900rpx;
- padding: 0rpx 0 40rpx 0;
- position: fixed;
- top: 50%;
- left: 50%;
- border-radius: 10rpx;
- transform: translate(-50%, -50%);
- z-index: 100;
- background-color: #fff;
- opacity: 1;
- .layout{
- position: absolute;
- left: 50%;
- bottom: 2%;
- }
- .m_edit {
- position: relative;
- left: 20%;
- transform: translate(-50%, -50%);
- background: rgb(67, 127, 250);
- color: rgb(255, 255, 255);
- min-width: 130rpx;
- }
- .m_delete {
- position: relative;
- left: 50%;
- min-width: 130rpx;
- transform: translate(-50%, -50%);
- background: rgb(234, 37, 44);
- color: rgb(255, 255, 255);
- }
- }
- </style>
|