|
@@ -76,6 +76,9 @@
|
|
|
<el-dropdown-item v-if="permissions.projectClassification">
|
|
|
<el-link type="primary" :underline="false" @click="showClfDialog = true">{{ $t('classificationmanagement') }}</el-link>
|
|
|
</el-dropdown-item>
|
|
|
+ <el-dropdown-item v-if="permissions.projectClassification">
|
|
|
+ <el-link type="primary" :underline="false" @click="openPlanClassificationPopUpWindow()">计划类型管理</el-link>
|
|
|
+ </el-dropdown-item>
|
|
|
<el-dropdown-item v-if="user.companyId == '7536'">
|
|
|
<el-link type="primary" :underline="false" @click="qrCodeClickEvent()">
|
|
|
二维码管理
|
|
@@ -1011,6 +1014,29 @@
|
|
|
<el-button type="primary" @click="addNewClf()" >{{ $t('newCategoryItem') }}</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 计划分类配置 -->
|
|
|
+ <el-dialog title="计划类型管理" show-header="false" v-if="planClassificationPopUpWindow" :visible.sync="planClassificationPopUpWindow" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
|
+ <el-table :data="planTypeList" highlight-current-row height="400" style="width: 100%;" v-loading="planTypeListLoading">
|
|
|
+ <el-table-column type="index" width="60" :label="$t('headerTop.serialNumber')">
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ {{scope.$index+1}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" :label="$t('names')" ></el-table-column>
|
|
|
+ <el-table-column :label="$t('operation')" :width="user.companyId == '862' ? '300px' : '180px'">
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <el-button size="small" type="primary" @click="auditProcess(scope.row)" v-if="user.companyId == '862'" >{{ $t('AuditProcess') }}</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="newPlanType(scope.row)">{{ $t('bian-ji') }}</el-button>
|
|
|
+ <el-button size="small" type="danger" @click="deleteNewPlanType(scope.row)">{{ $t('btn.delete') }}</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ </el-table>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="planClassificationPopUpWindow = false" >{{ $t('Shutdown') }}</el-button>
|
|
|
+ <el-button type="primary" @click="newPlanType()" >新增计划类型项</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
<!-- 主项目配置 -->
|
|
|
<el-dialog :title="$t('masterprojectmanagement')" show-header="false" v-if="mainProjectDialog" :visible.sync="mainProjectDialog" :close-on-click-modal="false" customClass="customWidth" width="800px">
|
|
|
<el-table :data="mainProjectList" highlight-current-row height="400" style="width: 100%;">
|
|
@@ -1160,6 +1186,26 @@
|
|
|
<el-button type="primary" @click="submitClf" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 新增/编辑 计划类型 -->
|
|
|
+ <el-dialog title="新增/编辑计划类型" v-if="editPlanTypeDialog" :visible.sync="editPlanTypeDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
|
+ <el-form ref="form2" :model="editPlanTypeFrom" :rules="rules" label-width="140px">
|
|
|
+ <el-form-item label="计划类型名称" prop="name">
|
|
|
+ <el-input v-model="editPlanTypeFrom.name" :placeholder="$t('peaseenterthe')" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="计划类型颜色">
|
|
|
+ <el-color-picker v-model="editPlanTypeFrom.color"></el-color-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="是否需要审核">
|
|
|
+ <el-checkbox v-model="editPlanTypeFrom.needAudit">审核</el-checkbox>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click.native="editPlanTypeDialog = false">{{ $t('btn.cancel') }}</el-button>
|
|
|
+ <el-button type="primary" @click="submitPlanType" :loading="editPlanTypeLoading">{{ $t('btn.submit') }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<!-- 分类条目有关审核流程设置 -->
|
|
|
<el-dialog :title="$t('AuditProcess')" v-if="auditProcessDialog" :visible.sync="auditProcessDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
|
<el-form ref="form2" :model="auditProcess" :rules="rules" label-width="150px">
|
|
@@ -2094,7 +2140,15 @@ a {
|
|
|
batchChangeStageLoading: false,
|
|
|
batchProjectTaskParticipantVisible: false,
|
|
|
batchDepartment: [],
|
|
|
- qrCodeManagementVisable: false
|
|
|
+ qrCodeManagementVisable: false,
|
|
|
+
|
|
|
+ // 计划分类
|
|
|
+ planClassificationPopUpWindow: false,
|
|
|
+ planTypeList: [],
|
|
|
+ planTypeListLoading: false,
|
|
|
+ editPlanTypeDialog: false,
|
|
|
+ editPlanTypeFrom: {},
|
|
|
+ editPlanTypeLoading: false
|
|
|
};
|
|
|
},
|
|
|
// 过滤器
|
|
@@ -6253,7 +6307,132 @@ a {
|
|
|
} else {
|
|
|
this.synchronizationInputVal = ''
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ openPlanClassificationPopUpWindow() {
|
|
|
+ this.planClassificationPopUpWindow = true
|
|
|
+ this.getPlanTypeList()
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取计划类型
|
|
|
+ getPlanTypeList() {
|
|
|
+ this.planTypeListLoading = true
|
|
|
+ this.http.post('/task-type/list',{
|
|
|
+ companyId: this.user.companyId,
|
|
|
+ },
|
|
|
+ res => {
|
|
|
+ this.planTypeListLoading = false
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.planTypeList = res.data
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.planTypeListLoading = false
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ // 新增/编辑 分类条目
|
|
|
+ newPlanType(row) {
|
|
|
+ this.editPlanTypeDialog = true;
|
|
|
+ if (row == null) {
|
|
|
+ this.editPlanTypeFrom = {
|
|
|
+ color: '#409eff',
|
|
|
+ needAudit: true,
|
|
|
+ name: ''
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.editPlanTypeFrom = row;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ submitPlanType() {
|
|
|
+ if(!this.editPlanTypeFrom.name) {
|
|
|
+ this.$message({
|
|
|
+ message: '请填写计划类型名称',
|
|
|
+ type: "error"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const { name, id, color, needAudit } = this.editPlanTypeFrom
|
|
|
+ let obj = {
|
|
|
+ name, color, needAudit
|
|
|
+ }
|
|
|
+ if(id) {
|
|
|
+ obj.id = id
|
|
|
+ }
|
|
|
+ this.editPlanTypeLoading = true
|
|
|
+ this.http.post('/task-type/save',{
|
|
|
+ companyId: this.user.companyId,
|
|
|
+ ...obj
|
|
|
+ },
|
|
|
+ res => {
|
|
|
+ this.editPlanTypeLoading = false
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.$message({
|
|
|
+ message: '操作成功',
|
|
|
+ type: "success"
|
|
|
+ })
|
|
|
+ this.editPlanTypeDialog = false
|
|
|
+ this.getPlanTypeList()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.editPlanTypeLoading = false
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ // 删除
|
|
|
+ deleteNewPlanType(row) {
|
|
|
+ this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'), '删除计划类型', {
|
|
|
+ confirmButtonText: this.$t('btn.determine'),
|
|
|
+ cancelButtonText: this.$t('btn.cancel'),
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.http.post('/task-type/delete',{
|
|
|
+ id: row.id
|
|
|
+ },
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.$message({
|
|
|
+ message: this.$t('message.successfullyDeleted'),
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ this.getPlanTypeList();
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
let height = window.innerHeight;
|