| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441 |
- <template>
- <view class="m_right">
- <image src="../../../assets/home/homeBG.png" 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">
- <!-- <t-table @change="change">
- <t-tr> </t-tr>
- <t-tr>{{item.ProjectName}}</t-tr>
- <t-tr>{{item.Type}}</t-tr>
- <t-tr>{{item.Describe}}</t-tr>
- <t-tr>{{item.CreateUserName}}</t-tr>
- <t-tr style="position: relative;"><button type="default" size="mini" @click="edit(index)" class="m_edit">修改</button></t-tr>
- <t-tr style="position: relative;"><button type="default" size="mini" @click="delete1(index)" class="m_delete">删除</button></t-tr>
- </t-table> -->
- <th>{{item.ProjectName}}</th>
- <th>{{item.Type}}</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>
- <!-- <th class='blank'><input type="text" :value='item.ProjectName' class='input-item'/></th>
- <th class='blank'><input type="text" :value='item.Type' class='input-item'/></th>
- <th class='blank'><input type="text" :value='item.Type' class='input-item'/></th>
- <th class='blank'><input type="text" :value='item.CreateUserName' class='input-item'/></th>
- <th style="position:relative;" class='blank'><button type="default" size="mini" @click="editProject(index)" class="m_edit">修改</button></th>
- <th style="position:relative;" class='blank'><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">下载</button></th>
- <th style="position: relative;"><button type="default" size="mini" @click="deleteFile(index,item)" class="m_delete">删除</button></th>
- <th style="position: relative;"><button type="default" size="mini" @click="audit(index,item)" class="m_audit">审核</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>
- <!--<view class="df fdr aic addMember_box showboder" v-show="isShowAddMember">-->
- <!--<view class="addMember_input_box">-->
- <!--<input class="addMember_input" type="string" v-model="addedMemberModel.IlabAccount" />-->
- <!--</view>-->
- <!--<view class="addMember_btn df aic jcc" @click="addMemberData">添加</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>
- <!-- <input type="number" value="" /> -->
- {{item.User.Type}}
- </div>
- </th>
- <th>{{item.User.PhoneNum}}</th>
- <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>
- </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 class='table'> -->
- <tbody>
- <tr>
- <!-- <t-table @change="change">
- <t-tr> </t-tr>
- <t-tr>{{item.ProjectName}}</t-tr>
- <t-tr>{{item.Type}}</t-tr>
- <t-tr>{{item.Describe}}</t-tr>
- <t-tr>{{item.CreateUserName}}</t-tr>
- <t-tr style="position: relative;"><button type="default" size="mini" @click="edit(index)" class="m_edit">修改</button></t-tr>
- <t-tr style="position: relative;"><button type="default" size="mini" @click="delete1(index)" class="m_delete">删除</button></t-tr>
- </t-table> -->
- <th>
- <input class="uni-input" placeholder-style="color:#F76260" placeholder="名称" v-model="editDialogData.name"/>
- </th>
- <!--<th>-->
- <!--<input class="uni-input" placeholder-style="color:#F76260" placeholder="类型" v-model="editDialogData.type"/>-->
- <!--</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>
- <!-- <th class='blank'><input type="text" :value='item.ProjectName' class='input-item'/></th>
- <th class='blank'><input type="text" :value='item.Type' class='input-item'/></th>
- <th class='blank'><input type="text" :value='item.Type' class='input-item'/></th>
- <th class='blank'><input type="text" :value='item.CreateUserName' class='input-item'/></th>
- <th style="position:relative;" class='blank'><button type="default" size="mini" @click="editProject(index)" class="m_edit">修改</button></th>
- <th style="position:relative;" class='blank'><button type="default" size="mini" @click="deleteProject(index)" class="m_delete">删除</button></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>
- <!--<th>介绍</th>-->
- </tr>
- </thead>
- <!-- <tbody class='table'> -->
- <tbody>
- <tr>
- <!-- <t-table @change="change">
- <t-tr> </t-tr>
- <t-tr>{{item.ProjectName}}</t-tr>
- <t-tr>{{item.Type}}</t-tr>
- <t-tr>{{item.Describe}}</t-tr>
- <t-tr>{{item.CreateUserName}}</t-tr>
- <t-tr style="position: relative;"><button type="default" size="mini" @click="edit(index)" class="m_edit">修改</button></t-tr>
- <t-tr style="position: relative;"><button type="default" size="mini" @click="delete1(index)" class="m_delete">删除</button></t-tr>
- </t-table> -->
- <th>
- <!--<input class="uni-input" placeholder-style="color:#F76260" placeholder="名称" v-model="editDialogData.name"/>-->
- <view class="addMember_input_box">
- <input class="addMember_input" type="string" v-model="addedMemberModel.IlabAccount" placeholder="学员id" />
- </view>
- </th>
- <!--<th>-->
- <!--<input class="uni-input" placeholder-style="color:#F76260" placeholder="类型" v-model="editDialogData.type"/>-->
- <!--</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>
- <!--<th>-->
- <!--<input class="uni-input" placeholder-style="color:#F76260" placeholder="介绍" v-model="editDialogData.Introduction"/>-->
- <!--</th>-->
- <!-- <th class='blank'><input type="text" :value='item.ProjectName' class='input-item'/></th>
- <th class='blank'><input type="text" :value='item.Type' class='input-item'/></th>
- <th class='blank'><input type="text" :value='item.Type' class='input-item'/></th>
- <th class='blank'><input type="text" :value='item.CreateUserName' class='input-item'/></th>
- <th style="position:relative;" class='blank'><button type="default" size="mini" @click="editProject(index)" class="m_edit">修改</button></th>
- <th style="position:relative;" class='blank'><button type="default" size="mini" @click="deleteProject(index)" class="m_delete">删除</button></th>
- -->
- </tr>
- </tbody>
- </table>
- <view class="layout">
- <!--<view class="addMember_btn df aic jcc" @click="addMemberData">添加</view>-->
- <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="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>
- <!--<th>介绍</th>-->
- </tr>
- </thead>
- <!-- <tbody class='table'> -->
- <tbody>
- <tr>
- <!-- <t-table @change="change">
- <t-tr> </t-tr>
- <t-tr>{{item.ProjectName}}</t-tr>
- <t-tr>{{item.Type}}</t-tr>
- <t-tr>{{item.Describe}}</t-tr>
- <t-tr>{{item.CreateUserName}}</t-tr>
- <t-tr style="position: relative;"><button type="default" size="mini" @click="edit(index)" class="m_edit">修改</button></t-tr>
- <t-tr style="position: relative;"><button type="default" size="mini" @click="delete1(index)" class="m_delete">删除</button></t-tr>
- </t-table> -->
- <th>
- <!--<input class="uni-input" placeholder-style="color:#F76260" placeholder="名称" v-model="editDialogData.name"/>-->
- <view class="addMember_input_box">
- <input class="addMember_input" type="string" v-model="fileDialogData.name" placeholder="文件名字" />
- </view>
- </th>
- <!--<th>-->
- <!--<input class="uni-input" placeholder-style="color:#F76260" placeholder="类型" v-model="editDialogData.type"/>-->
- <!--</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>
- <!--<th>-->
- <!--<input class="uni-input" placeholder-style="color:#F76260" placeholder="介绍" v-model="editDialogData.Introduction"/>-->
- <!--</th>-->
- <!-- <th class='blank'><input type="text" :value='item.ProjectName' class='input-item'/></th>
- <th class='blank'><input type="text" :value='item.Type' class='input-item'/></th>
- <th class='blank'><input type="text" :value='item.Type' class='input-item'/></th>
- <th class='blank'><input type="text" :value='item.CreateUserName' class='input-item'/></th>
- <th style="position:relative;" class='blank'><button type="default" size="mini" @click="editProject(index)" class="m_edit">修改</button></th>
- <th style="position:relative;" class='blank'><button type="default" size="mini" @click="deleteProject(index)" class="m_delete">删除</button></th>
- -->
- </tr>
- </tbody>
- </table>
- <view class="layout">
- <!--<view class="addMember_btn df aic jcc" @click="addMemberData">添加</view>-->
- <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>
- <!-- <locationtemp ref="location_temp"></locationtemp> -->
- </view>
- </template>
- <script>
- import msg from "./msg.vue"
- import audit from "./audit.vue"
- // import locationtemp from "./location_temp.vue"
- // import api from "../../../api/project.js"
- 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: ['科幻', '现实', '剧情', '历史', '爱情', '惊悚', '公路', '动画'],
- addproType: ['编剧', '摄影师' ,'录音师', '灯光师', '创建人'],
- addFileType: ['剧本' ,'拍摄脚本' ,'分镜头脚本' ,'气氛图', '项目简介', '项目报告' ,'场景图'],
- index_addproType : 0,
- index_proType : 0,
- index_FileType : 0,
- fileDialogData : {name : "", type :""},
- }
- },
- components: {
- msg,
- audit,
- // locationtemp
- },
- methods: {
- paging(obj) {
- this.index = obj;
- },
- editProject(index) {
- this.title = "是否修改信息?";
- this.arr = ["修改", "取消"]
- this.show = true;
- this.currentSelect = {section:0,buttonType:'edit',index:index};
- console.log("修改什么", this.currentSelect);
- },
- //审核状态中文
- 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};
- },
- // delete1(index) {
- // this.title = "是否删除信息?";
- // this.arr = ["删除", "取消"]
- // this.show = true;
- // },
- 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};
- },
- // edit(index) {
- // this.title = "是否删除信息?";
- // this.arr = ["删除", "取消"]
- // this.show = true;
- // },
- 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;
- }
- // let data = {
- // "CreateUserID":mydata_userInfo.UserID,
- // "ProjectName":this.model.projectName,
- // "Describe":this.model.describe,
- // "Type":this.model.type
- // }
- // console.log("请求创建项目",data);
- // MyRequest.CreateProjectNew(data,function(res){
- // console.log("创建项目成功",res);
- // },null);
- console.log("创建项目自己ID",mydata_userInfo.UserID);
- uni.request({
- url: this.$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.projectMembers = res.data.Users;
- // console.log();
- // this.$refs.table.getList();
- this.getlist()
- this.editDialogshow = false
- // this.editProject(0)
- // this.show = false;
- return true;
- }
- // this.tabledata = res.data.Projects
- // console.log('res=',this.tabledata)
- }
- })
- // uni.chooseImage({
- // success: (chooseImageRes) => {
- // const tempFilePaths = chooseImageRes.tempFilePaths;
- // uni.uploadFile({
- // url: this.$Api+'/project/uploadprojectfile', //仅为示例,非真实的接口地址
- // filePath: tempFilePaths[0],
- // name: 'file',
- // formData: {
- // // UserID: //上传用户 id
- // // Name: //文件名
- // // Type: //规范文件 剧本 拍摄脚本 分镜头脚本 气氛图 项目简介 项目报告 场景图
- // // ProjectID: //项目ID
- //
- // "UserID": this.projectData[0].CreateUserID,
- // "Name": this.editDialogData.name,
- // "Type": this.editDialogData.type,
- // "ProjectID": this.projectData[0].Id,
- // },
- // success: (uploadFileRes) => {
- // console.log('upload ok=', uploadFileRes.data);
- // alert("创建成功");
- // this.model.projectName='';
- // this.model.describe='';
- // this.model.type='科幻';
- //
- // this.$emit('onBackCreateInfo');
- // }
- // });
- // }
- // });
- },
- editDialogDetermine(){
- this.editSave()
- },
- editDialogCancel(){
- this.editDialogshow = false
- this.editDialogData = {name : "", type :"", Introduction : ""}
- },
- // editDialogName(event){
- // this.editDialogData.name = event.target.value
- // },
- // editDialogType(event){
- // this.editDialogData.type = event.target.value
- // },
- // editDialogIntroduction(event){
- // this.editDialogData.Introduction = event.target.value
- // },
- determine(obj) {
- this.show = false;
- this.auditshow = false;
- // switch (this.callback) {
- // case "audit": //审核
- // const data = {
- // ProjectItemID: "xxxx",
- // Pass: obj == 0
- // }
- // this.auditPost(data);
- // break;
- // default:
- // break;
- // }
- // this.currentSelect = {section:0,buttonType:'delete',index:index};
- 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]);
- // CreateTime: "2021-04-17 11:04:09"
- // CreateUserID: "1e9c969f-8990-40f2-8a8c-ecbafc5720b2"
- // CreateUserName: "李力新"
- // Describe: "999"
- // Id: 28
- // ProjectName: "999"
- // ProjectReviewImage: "http://communication-org-simulation.oss-cn-beijing.aliyuncs.com/project_28_timg.jpeg?Expires=1618634575&OSSAccessKeyId=LTAI4G4obJx7AiUgWThKBL47&Signature=az3xXUG%2F6lmxEBTmRtwZ%2FankjK8%3D"
- // ReviewImageOss: "project_28_timg.jpeg"
- // Type: "科幻"
- 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]);
- // CreateTime: "2021-04-17 11:04:09"
- // CreateUserID: "1e9c969f-8990-40f2-8a8c-ecbafc5720b2"
- // CreateUserName: "李力新"
- // Describe: "999"
- // Id: 28
- // ProjectName: "999"
- // ProjectReviewImage: "http://communication-org-simulation.oss-cn-beijing.aliyuncs.com/project_28_timg.jpeg?Expires=1618634575&OSSAccessKeyId=LTAI4G4obJx7AiUgWThKBL47&Signature=az3xXUG%2F6lmxEBTmRtwZ%2FankjK8%3D"
- // ReviewImageOss: "project_28_timg.jpeg"
- // Type: "科幻"
- // this.editDialogData = {name : this.projectData[0].ProjectName, type :this.projectData[0].Type, Introduction : this.projectData[0].Describe}
- // this.editDialogshow = true
- // console.log("修改数据", this.editDialogData);
- // this.currentSelect.item
- 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]);
- // CreateTime: "2021-04-17 11:04:09"
- // CreateUserID: "1e9c969f-8990-40f2-8a8c-ecbafc5720b2"
- // CreateUserName: "李力新"
- // Describe: "999"
- // Id: 28
- // ProjectName: "999"
- // ProjectReviewImage: "http://communication-org-simulation.oss-cn-beijing.aliyuncs.com/project_28_timg.jpeg?Expires=1618634575&OSSAccessKeyId=LTAI4G4obJx7AiUgWThKBL47&Signature=az3xXUG%2F6lmxEBTmRtwZ%2FankjK8%3D"
- // ReviewImageOss: "project_28_timg.jpeg"
- // Type: "科幻"
- // this.editDialogData = {name : this.projectData[0].ProjectName, type :this.projectData[0].Type, Introduction : this.projectData[0].Describe}
- // this.editDialogshow = true
- // console.log("修改数据", this.editDialogData);
- // this.currentSelect.item
- 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]);
- // CreateTime: "2021-04-17 11:04:09"
- // CreateUserID: "1e9c969f-8990-40f2-8a8c-ecbafc5720b2"
- // CreateUserName: "李力新"
- // Describe: "999"
- // Id: 28
- // ProjectName: "999"
- // ProjectReviewImage: "http://communication-org-simulation.oss-cn-beijing.aliyuncs.com/project_28_timg.jpeg?Expires=1618634575&OSSAccessKeyId=LTAI4G4obJx7AiUgWThKBL47&Signature=az3xXUG%2F6lmxEBTmRtwZ%2FankjK8%3D"
- // ReviewImageOss: "project_28_timg.jpeg"
- // Type: "科幻"
- // this.editDialogData = {name : this.projectData[0].ProjectName, type :this.projectData[0].Type, Introduction : this.projectData[0].Describe}
- // this.editDialogshow = true
- // console.log("修改数据", this.editDialogData);
- // this.currentSelect.item
- 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 = this.$Api + "/project/setfilepass"
- // const data = {
- // // ProjectItemID: "xxxx",
- // // Pass: obj == 0
- // // }
- 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.$refs.table.getList();
- // this.$forceUpdate()
- // this.isShowAddMember = false
- this.getFileList();
- }
- }
- })
- },
- getlist() {
- uni.request({
- url: this.$Api + "/project/getprojectcontent",
- data: {
- "UserID": this.$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;
- // ++this.projectData
- this.$forceUpdate()
- }
- console.log("获取了什么样子的信息", this.projectData[0]);
- }
- })
- },
- getFileList() {
- // console.log("用户id");
- // console.log(this.$UserId);
- // console.log(this.projectData[0].Id);
- uni.request({
- url: this.$Api + "/project/getprojectcontent",
- data: {
- "UserID": this.$UserId,
- "ProjectID": this.projectData[0].Id
- },
- method: "POST",
- dataType: "json",
- success: res => {
- this.fileData = res.data.ProjectItem;
- console.log('this.fileData=',this.fileData)
- }
- })
- },
- viewProject(obj) {
- console.log('进来的什么信息',obj)
- this.projectData = [obj];
- this.getFileList();
- this.getMemberList();
- },
- getMemberList() {
- var temp = {
- "ProjectID": this.projectData[0].Id
- }
- uni.request({
- url: this.$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;
- },
- addMemberData(){
- console.log("添加学生", this.addedMemberModel,this.projectData[0]);
- // "userID" : "12eqwed12",
- // "ProjectID":1,
- // "DeleteUserID":"12eqwe12"
- // userID User.Id
- // ProjectID this.projectData[0].Id,
- // "UserID" : "12eqwed12", //项目创建人ID
- // "ProjectID": 10001, //项目ID
- // "AddUserID":"12eqwe12" //添加人员ID 支持ilabID UserID
- // "Type":"美术师" //编剧 摄影师 录音师 灯光师 创建人
- if (this.addedMemberModel.IlabAccount == "") {
- alert("学员id不能为空")
- return
- }
- console.log('删掉成员 ')
- let url = this.$Api + "/project/addmember"
- let data = {
- "UserID" : this.projectData[0].CreateUserID,
- "ProjectID":this.projectData[0].Id,
- "AddUserID":this.addedMemberModel.IlabAccount,
- "Type":this.addedMemberModel.type,
- }
- 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.$forceUpdate()
- this.isShowAddMember = false
- }
- this.getMemberList();
- this.$forceUpdate()
- this.isShowAddMember = false
- // this.projectData.splice(index,index);
- }
- })
- },
- addFileData(){
- // console.log("添加学生", this.addedMemberModel,this.projectData[0]);
- // // "userID" : "12eqwed12",
- // // "ProjectID":1,
- // // "DeleteUserID":"12eqwe12"
- // // userID User.Id
- // // ProjectID this.projectData[0].Id,
- //
- // // "UserID" : "12eqwed12", //项目创建人ID
- // // "ProjectID": 10001, //项目ID
- // // "AddUserID":"12eqwe12" //添加人员ID 支持ilabID UserID
- // // "Type":"美术师" //编剧 摄影师 录音师 灯光师 创建人
- // if (this.addedMemberModel.IlabAccount == "") {
- // alert("学员id不能为空")
- // return
- // }
- //
- //
- // console.log('删掉成员 ')
- //
- // let url = this.$Api + "/project/addmember"
- //
- //
- // let data = {
- // "UserID" : this.projectData[0].CreateUserID,
- // "ProjectID":this.projectData[0].Id,
- // "AddUserID":this.addedMemberModel.IlabAccount,
- // "Type":this.addedMemberModel.type,
- // }
- // 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.$forceUpdate()
- // this.isShowAddMember = false
- // }
- // this.getMemberList();
- // this.$forceUpdate()
- // this.isShowAddMember = false
- // // this.projectData.splice(index,index);
- // }
- // })
- // parameter:
- // UserID: //上传用户 id
- // Name: //文件名
- // Type: //规范文件 剧本 拍摄脚本 分镜头脚本 气氛图 项目简介 项目报告 场景图
- // ProjectID: //项目ID
- // files:
- // file: 文件
- uni.chooseImage({
- success: (chooseImageRes) => {
- const tempFilePaths = chooseImageRes.tempFilePaths;
- uni.uploadFile({
- url: this.$Api+'/project/uploadprojectfile', //仅为示例,非真实的接口地址
- filePath: tempFilePaths[0],
- name: 'file',
- formData: {
- // UserID: //上传用户 id
- // Name: //文件名
- // Type: //规范文件 剧本 拍摄脚本 分镜头脚本 气氛图 项目简介 项目报告 场景图
- // ProjectID: //项目ID
- "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("创建成功");
- // this.model.projectName='';
- // this.model.describe='';
- // this.model.type='科幻';
- // this.$emit('onBackCreateInfo');
- }
- });
- }
- });
- },
- 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: this.$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
- },
- //删除条目
- deleteItemProject(){
- console.log('UserID=',this.$UserId)
- console.log('ProjectID=',this.projectData[0].Id)
- var temp = {
- "UserID":this.projectData[0].CreateUserID,
- "ProjectID" : this.projectData[0].Id,
- }
- console.log("要删除过去的数据为",temp)
- uni.request({
- url: this.$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){
- // "userID" : "12eqwed12",
- // "ProjectID":1,
- // "DeleteUserID":"12eqwe12"
- // userID User.Id
- // ProjectID this.projectData[0].Id,
- console.log('删掉成员 ',item)
- let url = this.$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 = this.$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.$refs.table.getList();
- // this.$forceUpdate()
- // this.isShowAddMember = false
- this.getFileList();
- }
- // this.getMemberList();
- // this.$forceUpdate()
- // this.isShowAddMember = false
- // this.projectData.splice(index,index);
- }
- })
- },
- DownloadFile() {
- window.location.href = this.currentSelect.item.URL;
- // uni.downloadFile({
- // // url: 'http://192.168.0.200:8058/files/200200711.doc',//下载地址接口返回
- // url: this.currentSelect.item.URL,//下载地址接口返回
- // success: (data) => {
- // if (data.statusCode === 200) {
- // uni.showToast({
- // icon: 'none',
- // mask: true,
- // title: '下载成功' , //保存路径
- // duration: 3000,
- // });
- //
- //
- // //文件保存到本地
- // // uni.saveFile({
- // // tempFilePath: data.tempFilePath, //临时路径
- // // success: function(res) {
- // // uni.showToast({
- // // icon: 'none',
- // // mask: true,
- // // title: '文件已保存:' + res.savedFilePath, //保存路径
- // // duration: 3000,
- // // });
- // // // setTimeout(() => {
- // // // //打开文档查看
- // // // uni.openDocument({
- // // // filePath: res.savedFilePath,
- // // // success: function(res) {
- // // // // console.log('打开文档成功');
- // // // }
- // // // });
- // // // }, 3000)
- // // }
- // // });
- // }
- // },
- // fail: (err) => {
- // console.log(err);
- // uni.showToast({
- // icon: 'none',
- // mask: true,
- // title: '失败请重新下载',
- // });
- // },
- // });
- },
- }
- }
- </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_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_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{
- // display: flex;
- // align-items:center;
- // justify-content:center;
- border:1px solid black;
- }
- .table{
- // display: flex;
- // display: -webkit-flex;
- // align-items:center;
- // justify-content:center;
- border:1px solid black;
- }
- .input-item {
- // height: 110rpx;
- // font-size: 40rpx;
- // background: #000000;
- // text-align: center;
- // border-radius: 5%;
- // margin-left: 40rpx;
- // margin-right: 40rpx;
- // color: #00F6FF;
- // width: 50%;
- // display: flex;
- // display: -webkit-flex;
- // align-items:center;
- // justify-content:center;
- border:1px solid black;
- }
- .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>
|