|
|
@@ -128,12 +128,12 @@
|
|
|
<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">添加</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>
|
|
|
@@ -159,7 +159,7 @@
|
|
|
</div>
|
|
|
</th>
|
|
|
<th>{{item.User.PhoneNum}}</th>
|
|
|
- <th style="position: relative;"><button type="default" size="mini" class="m_delete" @click="delete1(item)">删除</button></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>
|
|
|
@@ -228,6 +228,72 @@
|
|
|
</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>
|
|
|
+
|
|
|
+
|
|
|
<!-- <locationtemp ref="location_temp"></locationtemp> -->
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -255,7 +321,7 @@
|
|
|
isShowAddMember: false,
|
|
|
addedMemberModel: {
|
|
|
"IlabAccount": '',
|
|
|
- "AddUserID": ''
|
|
|
+ "type": ''
|
|
|
},
|
|
|
currentSelect:{section:-1,buttonType:'',index:-1},
|
|
|
Type:'asd',
|
|
|
@@ -263,6 +329,8 @@
|
|
|
|
|
|
editDialogData : {name : "", type :"", Introduction : ""},
|
|
|
proType: ['科幻', '现实', '剧情', '历史', '爱情', '惊悚', '公路', '动画'],
|
|
|
+ addproType: ['编剧', '摄影师' ,'录音师', '灯光师', '创建人'],
|
|
|
+ index_addproType : 0,
|
|
|
index_proType : 0,
|
|
|
}
|
|
|
},
|
|
|
@@ -531,7 +599,7 @@
|
|
|
dataType: "json",
|
|
|
success: res => {
|
|
|
this.fileData = res.data.ProjectItem;
|
|
|
- // console.log('this.fileData=',this.fileData)
|
|
|
+ console.log('this.fileData=',this.fileData)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -562,6 +630,59 @@
|
|
|
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.$forceUpdate()
|
|
|
+ this.isShowAddMember = false
|
|
|
+ // this.projectData.splice(index,index);
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ addMemberDataCancel(){
|
|
|
+ this.isShowAddMember = false;
|
|
|
+ },
|
|
|
onClick_addMember_ok() {
|
|
|
console.log("添加学生", this.addedMemberModel);
|
|
|
var temp = {
|
|
|
@@ -585,7 +706,7 @@
|
|
|
})
|
|
|
},
|
|
|
onClick_addFile(){
|
|
|
-
|
|
|
+ console.log("项目 点了添加文件")
|
|
|
},
|
|
|
//删除条目
|
|
|
deleteItemProject(){
|
|
|
@@ -595,6 +716,7 @@
|
|
|
"UserID":this.projectData[0].CreateUserID,
|
|
|
"ProjectID" : this.projectData[0].Id,
|
|
|
}
|
|
|
+ console.log("要删除过去的数据为",temp)
|
|
|
uni.request({
|
|
|
url: this.$Api + "/backstage/deleteproject",
|
|
|
data: temp,
|
|
|
@@ -612,7 +734,44 @@
|
|
|
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)
|
|
|
+ },
|
|
|
+ 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.$forceUpdate();//强制刷新页面
|
|
|
+ }
|
|
|
+ // this.projectData.splice(index,index);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|