|
@@ -92,6 +92,9 @@
|
|
|
<el-dropdown-item v-if="user.timeType.syncFanwei==1">
|
|
|
<el-link type="primary" :underline="false" @click="syncProjectForFanWei()">{{'同步项目信息'}}</el-link>
|
|
|
</el-dropdown-item>
|
|
|
+ <el-dropdown-item>
|
|
|
+ <el-link type="primary" :underline="false" @click="functionalDivisionDig=true,getFunctionalList()">{{'职能分工设置'}}</el-link>
|
|
|
+ </el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</el-form-item>
|
|
@@ -1404,7 +1407,89 @@
|
|
|
<div >
|
|
|
{{importResultMsg}}
|
|
|
</div>
|
|
|
- </el-dialog>
|
|
|
+ </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"
|
|
|
+ :index="index=>index+1"/>
|
|
|
+ <el-table-column prop="timeType" label="工时类型" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-show="!scope.row.editFlag">{{scope.row.timeType}}</span>
|
|
|
+ <el-select v-show="scope.row.editFlag" v-model="scope.row.timeType" placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in timeTypeList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.label">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="roleId" label="角色" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-show="!scope.row.editFlag">{{scope.row.role}}</span>
|
|
|
+ <el-select v-show="scope.row.editFlag" v-model="scope.row.role" placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in roleList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.label">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="jobRespon" label="工作职责" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-show="!scope.row.editFlag">{{scope.row.jobRespon}}</span>
|
|
|
+ <el-input v-show="scope.row.editFlag"
|
|
|
+ v-model="scope.row.jobRespon">
|
|
|
+ </el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="workContext" label="工作内容" align="center">
|
|
|
+ <template>
|
|
|
+ <a style="color:#409EFF">{{'数据维护'}}</a>
|
|
|
+ </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)">取消
|
|
|
+ </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="functionalDelVersion(scope.row,scope.$index)">删除
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="addFunctional()" 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>
|
|
|
</section>
|
|
|
</template>
|
|
|
<style scoped>
|
|
@@ -1662,6 +1747,28 @@ a {
|
|
|
|
|
|
// 威派格定制(只有管理员才能更改项目名称,编号,级别,合同,大区,经理)
|
|
|
isShowProjectName: false,
|
|
|
+ functionalDivisionDig:false,
|
|
|
+ functionalList:[],
|
|
|
+ timeTypeList:[
|
|
|
+ {
|
|
|
+ value: 1,
|
|
|
+ label: '项目工时'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 2,
|
|
|
+ label: '非项目工时'
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ roleList:[
|
|
|
+ {
|
|
|
+ value: 1,
|
|
|
+ label: 'CRC&LM'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 2,
|
|
|
+ label: 'PM'
|
|
|
+ },
|
|
|
+ ],
|
|
|
};
|
|
|
},
|
|
|
// 过滤器
|
|
@@ -4875,7 +4982,157 @@ a {
|
|
|
//计算预估工时
|
|
|
jisuanEstimatedWorkTime(manDay){
|
|
|
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)
|
|
|
+ },
|
|
|
+ // 确定
|
|
|
+ functionalSubmit(row){
|
|
|
+ row.editFlag = false
|
|
|
+ row.isSubmit = true
|
|
|
+ },
|
|
|
+ // 取消
|
|
|
+ functionalCancel(row, index){
|
|
|
+ console.log("index",index,'row',row)
|
|
|
+ row.editFlag = false
|
|
|
+ if (row.isSubmit) {
|
|
|
+ this.functionalList[index] = row
|
|
|
+ } else {
|
|
|
+ console.log("del-index",index,'del-row',row)
|
|
|
+ this.functionalDelVersion(row,index);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 编辑
|
|
|
+ functionalEditVersion(row){
|
|
|
+ // v.value = JSON.parse(JSON.stringify(row));
|
|
|
+ row.editFlag = true;
|
|
|
+ },
|
|
|
+ // 删除
|
|
|
+ functionalDelVersion (row,index){
|
|
|
+ console.log("index",index,'row',row)
|
|
|
+ if(row.id==null){
|
|
|
+ this.functionalList.splice(index, 1)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.functionalList.splice(index, 1)
|
|
|
+ this.http.post('/project/deleteFunctionalDivision',{
|
|
|
+ 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(){
|
|
|
+ this.http.post('/project/editFunctionalDivision',{
|
|
|
+ json:JSON.stringify(this.functionalList),
|
|
|
+ },
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.$message({
|
|
|
+ message: '操作成功',
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ this.getFunctionalList()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ //获取职能列表
|
|
|
+ getFunctionalList(){
|
|
|
+ this.http.post('/project/getFunctionalDivisionList',{},
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.functionalList=res.data
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ //获取角色列表
|
|
|
+ getRoleList(){
|
|
|
+ this.http.post('/permission/getRoleList',{
|
|
|
+ companyId:this.user.companyId,
|
|
|
+ },
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.roleList=res.data
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
created() {
|
|
|
let height = window.innerHeight;
|
|
@@ -4902,6 +5159,7 @@ a {
|
|
|
this.getClfConfigList()
|
|
|
this.yanjiuzx()
|
|
|
this.getObtain()
|
|
|
+ // this.getRoleList()
|
|
|
|
|
|
// 判断是否有供应商字段
|
|
|
if(this.user.company.packageProvider == 1){
|