ソースを参照

增加删除事项数据

SunZehao 1 年間 前
コミット
8e9d0a5bd0

+ 7 - 0
src/api/api.js

@@ -897,6 +897,13 @@ export function apiGetorganizationevaluationcommoninfo(params) {
 export function apiPostsaveEvaluationCommonInfo(params) {
     return httpRequest.post('organization-evaluation-common-info/addEvaluationCommonInfo', params)
 }
+//删除
+export function apiPostremoveEvaluationCommonInfo(params) {
+    return httpRequest({
+        url: `organization-evaluation-common-info/remove/${params}`,
+        method: 'post'
+    })
+}
 
 
 

+ 29 - 1
src/components/assessment/monthQuarterYearFrom.vue

@@ -201,6 +201,11 @@
                         </template>
                     </el-table-column>
                 </el-table-column>
+                <el-table-column label="操作" width="100">
+                    <template #default="scope">
+                        <span class="indicitem" @click="removeDetailData(scope.row)">详情</span>
+                    </template>
+                </el-table-column>
             </el-table>
         </el-dialog>
         <import-dailog ref="importPage" @successImport="successImport"></import-dailog>
@@ -575,6 +580,9 @@ export default {
         changeDetail(row) {
             this.detailVisible = true
             this.detailMsg = row
+            this.changeDetailList(row)
+        },
+        changeDetailList(row) {
             let that = this
             let params = {
                 organizationEvaluationId: that.rowMsg.id,
@@ -607,7 +615,7 @@ export default {
 
                 let obj = {
                     isAdd: true,
-                    deptName: '组织人事部'
+                    deptName: this.userMes.deptName
                 }
                 headerArr.forEach(it =>{
                     if (it.flag === '1') {
@@ -637,6 +645,26 @@ export default {
                     that.responseData(datas)
                 }
             })
+        },
+        removeDetailData(row) {
+            this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                let that = this
+                let parArr = []
+                for(let i in row) {
+                    if (i.indexOf('ID_')) {
+                        parArr.push(row[i])
+                    }
+                }
+                apiPostremoveEvaluationCommonInfo(parArr.join(',')).then(datas =>{
+                    if (datas) {
+                        that.changeDetailList(that.detailMsg)
+                    }
+                })
+            })
         }
     }
 }

+ 23 - 0
src/components/taskCenter/taskApplicationFrom.vue

@@ -550,6 +550,29 @@ export default {
                 }
             })
         },
+        handleDelete() {
+            this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                let that = this
+                let paramsArr = []
+                that.changeDateSelect.forEach(it =>{
+                    paramsArr.push(it.id)
+                })
+                apiGetevaluationdeptadDelete(paramsArr.join(',')).then(datas =>{
+                    if (datas) {
+                        that.$message({
+                            type: 'success',
+                            message: '删除成功!'
+                        });
+                        that.changeDateSelect = []
+                        that.getDetails(that.keyId)
+                    }
+                })
+            })
+        },
         deleteRowFn(row) {
             let that = this
             this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {