|
@@ -1409,7 +1409,7 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <!-- 项目模块管理 -->
|
|
|
+ <!-- 职能分工设置 -->
|
|
|
<el-dialog :title="'职能分工设置'" v-if="functionalDivisionDig" :visible.sync="functionalDivisionDig" width="80%">
|
|
|
<el-table border :data="functionalList" style="width: 100%">
|
|
|
<el-table-column prop="id" label="序号" width="50" type="index" align="center"
|
|
@@ -1449,8 +1449,9 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="workContext" label="工作内容" align="center">
|
|
|
- <template>
|
|
|
- <a style="color:#409EFF">{{'数据维护'}}</a>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <a v-if="scope.row.id" @click="workContextDig=true,getWorkContextList(scope.row.id)" style="color:#409EFF">{{'数据维护'}}</a>
|
|
|
+ <a v-else>{{'数据维护'}}</a>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="120" align="center">
|
|
@@ -1466,7 +1467,7 @@
|
|
|
type="text"
|
|
|
icon="CircleClose"
|
|
|
v-show="scope.row.editFlag"
|
|
|
- @click="functionalCancel(scope.row,scope.$index)">取消
|
|
|
+ @click="functionalCancel(scope.row,scope.$index,'functional')">取消
|
|
|
</el-button>
|
|
|
<el-button size="small"
|
|
|
icon="Edit"
|
|
@@ -1485,11 +1486,62 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="addFunctional()" type="primary">添加一行</el-button>
|
|
|
+ <el-button @click="addFunctional('functional')" type="primary">添加一行</el-button>
|
|
|
<el-button @click="functionalDivisionDig = false" >{{ $t('btn.cancel') }}</el-button>
|
|
|
<el-button type="primary" @click="submitFunctional()">{{ $t('btn.determine') }}</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 工作内容dig -->
|
|
|
+ <el-dialog :title="'工作内容'" v-if="workContextDig" :visible.sync="workContextDig" width="40%">
|
|
|
+ <el-table border :data="workContextList" style="width: 100%">
|
|
|
+ <el-table-column prop="id" label="序号" width="50" type="index" align="center"
|
|
|
+ :index="index=>index+1"/>
|
|
|
+ <el-table-column prop="workContext" label="工作内容" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-show="!scope.row.editFlag">{{scope.row.workContext}}</span>
|
|
|
+ <el-input v-show="scope.row.editFlag"
|
|
|
+ v-model="scope.row.workContext">
|
|
|
+ </el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="120" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div style="display: flex;">
|
|
|
+ <el-button size="small"
|
|
|
+ type="text"
|
|
|
+ icon="CircleCheck"
|
|
|
+ v-show="scope.row.editFlag"
|
|
|
+ @click="functionalSubmit(scope.row)">确定
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small"
|
|
|
+ type="text"
|
|
|
+ icon="CircleClose"
|
|
|
+ v-show="scope.row.editFlag"
|
|
|
+ @click="functionalCancel(scope.row,scope.$index,'workContext')">取消
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small"
|
|
|
+ icon="Edit"
|
|
|
+ type="text"
|
|
|
+ v-show="!scope.row.editFlag"
|
|
|
+ @click="functionalEditVersion(scope.row)"> 编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small"
|
|
|
+ icon="Delete"
|
|
|
+ type="text"
|
|
|
+ v-show="!scope.row.editFlag"
|
|
|
+ @click="workContextDelVersion(scope.row,scope.$index)">删除
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="addFunctional('workContext')" type="primary">添加一行</el-button>
|
|
|
+ <el-button @click="workContextDig = false" >{{ $t('btn.cancel') }}</el-button>
|
|
|
+ <el-button type="primary" @click="submitWorkContext()">{{ $t('btn.determine') }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</section>
|
|
|
</template>
|
|
|
<style scoped>
|
|
@@ -1747,6 +1799,7 @@ a {
|
|
|
|
|
|
// 威派格定制(只有管理员才能更改项目名称,编号,级别,合同,大区,经理)
|
|
|
isShowProjectName: false,
|
|
|
+ //职能相关字段
|
|
|
functionalDivisionDig:false,
|
|
|
functionalList:[],
|
|
|
timeTypeList:[
|
|
@@ -1769,6 +1822,10 @@ a {
|
|
|
label: 'PM'
|
|
|
},
|
|
|
],
|
|
|
+ //工作内容
|
|
|
+ workContextDig:false,
|
|
|
+ functionalId:null,
|
|
|
+ workContextList:[]
|
|
|
};
|
|
|
},
|
|
|
// 过滤器
|
|
@@ -4984,17 +5041,26 @@ a {
|
|
|
this.estimatedWorkTime=manDay*this.user.timeType.allday
|
|
|
},
|
|
|
//点击添加
|
|
|
- addFunctional(){
|
|
|
- this.functionalList.push({
|
|
|
- "id":null,
|
|
|
- 'timeType': '',
|
|
|
- 'role': '',
|
|
|
- 'jobRespon': '',
|
|
|
- "companyId":this.user.companyId,
|
|
|
- 'editFlag': true, // 可编辑标识
|
|
|
- 'isSubmit': false, // 是否点击确定标识
|
|
|
- })
|
|
|
- console.log("----------",this.functionalList)
|
|
|
+ addFunctional(type){
|
|
|
+ if(type=="functional"){
|
|
|
+ this.functionalList.push({
|
|
|
+ "id":null,
|
|
|
+ 'timeType': '项目工时',
|
|
|
+ 'role': 'CRC&LM',
|
|
|
+ 'jobRespon': '',
|
|
|
+ "companyId":this.user.companyId,
|
|
|
+ 'editFlag': true, // 可编辑标识
|
|
|
+ 'isSubmit': false, // 是否点击确定标识
|
|
|
+ })
|
|
|
+ }else if(type=="workContext"){
|
|
|
+ this.workContextList.push({
|
|
|
+ "id":null,
|
|
|
+ "proFunId":this.functionalId,
|
|
|
+ 'workContext':null,
|
|
|
+ 'editFlag': true, // 可编辑标识
|
|
|
+ 'isSubmit': false, // 是否点击确定标识
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
// 确定
|
|
|
functionalSubmit(row){
|
|
@@ -5002,15 +5068,23 @@ a {
|
|
|
row.isSubmit = true
|
|
|
},
|
|
|
// 取消
|
|
|
- functionalCancel(row, index){
|
|
|
- console.log("index",index,'row',row)
|
|
|
+ functionalCancel(row, index,type){
|
|
|
row.editFlag = false
|
|
|
if (row.isSubmit) {
|
|
|
- this.functionalList[index] = row
|
|
|
- } else {
|
|
|
- console.log("del-index",index,'del-row',row)
|
|
|
- this.functionalDelVersion(row,index);
|
|
|
- }
|
|
|
+ if(type=="functional"){
|
|
|
+ this.functionalList[index] = row
|
|
|
+ }else if(type=="workContext"){
|
|
|
+ this.workContextList[index] = row
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ // else {
|
|
|
+ // if(type=="functional"){
|
|
|
+ // this.functionalDelVersion(row,index);
|
|
|
+ // }else if(type=="workContext"){
|
|
|
+ // this.workContextDelVersion(row,index);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
},
|
|
|
// 编辑
|
|
|
functionalEditVersion(row){
|
|
@@ -5060,6 +5134,49 @@ a {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
+ },
|
|
|
+ // 删除
|
|
|
+ workContextDelVersion (row,index){
|
|
|
+ if(row.id==null){
|
|
|
+ this.workContextList.splice(index, 1)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.workContextList.splice(index, 1)
|
|
|
+ this.http.post('/project/deleteFunWorkContext',{
|
|
|
+ id:row.id,
|
|
|
+ },
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.$message({
|
|
|
+ message: '删除成功',
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
},
|
|
|
//保存职能分工
|
|
|
submitFunctional(){
|
|
@@ -5088,6 +5205,43 @@ a {
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
+ //保存工作内容
|
|
|
+ submitWorkContext(){
|
|
|
+ for(var index in this.workContextList){
|
|
|
+ if(!this.workContextList[index].workContext){
|
|
|
+ this.$message({
|
|
|
+ message: "请填写工作内容",
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.http.post('/project/editFunWorkContext',{
|
|
|
+ json:JSON.stringify(this.workContextList),
|
|
|
+ },
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.$message({
|
|
|
+ message: '操作成功',
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ // this.workContextDig = false
|
|
|
+ this.getWorkContextList()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
//获取职能列表
|
|
|
getFunctionalList(){
|
|
|
this.http.post('/project/getFunctionalDivisionList',{},
|
|
@@ -5109,6 +5263,32 @@ a {
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
+ //获取工作内容
|
|
|
+ getWorkContextList(item){
|
|
|
+ if(item){
|
|
|
+ this.functionalId=item
|
|
|
+ }
|
|
|
+ this.http.post('/project/getFunWorkContextList',{
|
|
|
+ id:this.functionalId
|
|
|
+ },
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.workContextList=res.data
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
//获取角色列表
|
|
|
getRoleList(){
|
|
|
this.http.post('/permission/getRoleList',{
|