From f78233bca776fa978af33a286d33bd0c91860bbd Mon Sep 17 00:00:00 2001
From: luoyb <412940104@qq.com>
Date: 星期六, 06 三月 2021 17:26:55 +0800
Subject: [PATCH] fix(bug修复): 信息录入编辑时不显示[保存并继续新增按钮]
---
src/views/user/inemployees.vue | 10 ----------
src/views/user/Informationinput.vue | 40 ++++++++++++++++++++++++++--------------
2 files changed, 26 insertions(+), 24 deletions(-)
diff --git a/src/views/user/Informationinput.vue b/src/views/user/Informationinput.vue
index 7805176..fe20e8d 100644
--- a/src/views/user/Informationinput.vue
+++ b/src/views/user/Informationinput.vue
@@ -50,7 +50,7 @@
<el-main>
<el-row>
<el-col :span="24">
- <el-button class="commonBtn" @click.native="dialogIsShow()">新增</el-button>
+ <el-button class="commonBtn" @click.native="dialogIsShow('0')">新增</el-button>
<el-button class="commonBtn" style="background-color: #409EFF" @click.native="butDelete()">删除</el-button>
<el-button class="commonBtn" style="float: right" @click.native="showDryg(0)">导入员工信息</el-button>
</el-col>
@@ -77,6 +77,11 @@
<i class="el-icon-edit-outline" style="font-size: 1.9vh;margin-right: 5px;" />
编辑
</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="照片" width="80">
+ <template slot-scope="scope" width="90">
+ <img :src="scope.row.imagePath">
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="empNumb" label="编号" width="80" />
@@ -822,7 +827,7 @@
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="putEmpBase('empBaseInfoForm')">保 存</el-button>
- <el-button type="primary" @click="putEmpBaseContinue('empBaseInfoForm')">保存并继续新增</el-button>
+ <el-button v-if="isAdd" type="primary" @click="putEmpBaseContinue('empBaseInfoForm')">保存并继续新增</el-button>
<el-button @click="dialogIsShow()">取 消</el-button>
</div>
</el-dialog>
@@ -894,6 +899,7 @@
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="putWorkExperience('workExperienceForm')">保 存</el-button>
<el-button
+ v-if="isAdd"
type="primary"
@click="putWorkExperienceContinue('workExperienceForm')"
>保存并继续新增
@@ -990,6 +996,7 @@
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="putPhysicalExam('physicalExamForm')">保 存</el-button>
<el-button
+ v-if="isAdd"
type="primary"
@click="putPhysicalExamContinue('physicalExamForm')"
>保存并继续新增
@@ -1071,6 +1078,7 @@
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="putContractInfo('contractInfoForm')">保 存</el-button>
<el-button
+ v-if="isAdd"
type="primary"
@click="putContractInfoContinue('contractInfoForm')"
>保存并继续新增
@@ -1144,7 +1152,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="putDimissionAttend('dimissionAttendForm')">保 存</el-button>
- <el-button type="primary" @click="putDimissionAttendContinue('dimissionAttendForm')">保存并继续新增</el-button>
+ <el-button v-if="isAdd" type="primary" @click="putDimissionAttendContinue('dimissionAttendForm')">保存并继续新增</el-button>
<el-button @click="dialogIsShow()">取 消</el-button>
</div>
</el-dialog>
@@ -1233,7 +1241,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="putLeaveInfo('leaveInfoForm')">保 存</el-button>
- <el-button type="primary" @click="putLeaveInfoContinue('leaveInfoForm')">保存并继续新增</el-button>
+ <el-button v-if="isAdd" type="primary" @click="putLeaveInfoContinue('leaveInfoForm')">保存并继续新增</el-button>
<el-button @click="dialogIsShow()">取 消</el-button>
</div>
</el-dialog>
@@ -1293,7 +1301,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="putResign('resignForm')">保 存</el-button>
- <el-button type="primary" @click="putResignContinue('resignForm')">保存并继续新增</el-button>
+ <el-button v-if="isAdd" type="primary" @click="putResignContinue('resignForm')">保存并继续新增</el-button>
<el-button @click="dialogIsShow()">取 消</el-button>
</div>
</el-dialog>
@@ -1353,7 +1361,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="putUnemployment('unemploymentForm')">保 存</el-button>
- <el-button type="primary" @click="putUnemploymentContinue('unemploymentForm')">保存并继续新增</el-button>
+ <el-button v-if="isAdd" type="primary" @click="putUnemploymentContinue('unemploymentForm')">保存并继续新增</el-button>
<el-button @click="dialogIsShow()">取 消</el-button>
</div>
</el-dialog>
@@ -1439,7 +1447,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="putInsurance('insuranceForm')">保 存</el-button>
- <el-button type="primary" @click="putInsuranceContinue('insuranceForm')">保存并继续新增</el-button>
+ <el-button v-if="isAdd" type="primary" @click="putInsuranceContinue('insuranceForm')">保存并继续新增</el-button>
<el-button @click="dialogIsShow()">取 消</el-button>
</div>
</el-dialog>
@@ -1579,7 +1587,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="putAccidentCases('accidentCasesForm')">保 存</el-button>
- <el-button type="primary" @click="putAccidentCasesContinue('accidentCasesForm')">保存并继续新增</el-button>
+ <el-button v-if="isAdd" type="primary" @click="putAccidentCasesContinue('accidentCasesForm')">保存并继续新增</el-button>
<el-button @click="dialogIsShow()">取 消</el-button>
</div>
</el-dialog>
@@ -1764,7 +1772,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="putOccupational('occupationalForm')">保 存</el-button>
- <el-button type="primary" @click="putOccupationalContinue('occupationalForm')">保存并继续新增</el-button>
+ <el-button v-if="isAdd" type="primary" @click="putOccupationalContinue('occupationalForm')">保存并继续新增</el-button>
<el-button @click="dialogIsShow()">取 消</el-button>
</div>
</el-dialog>
@@ -1855,7 +1863,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="putLaborTrouble('laborTroubleForm')">保 存</el-button>
- <el-button type="primary" @click="putLaborTroubleContinue('laborTroubleForm')">保存并继续新增</el-button>
+ <el-button v-if="isAdd" type="primary" @click="putLaborTroubleContinue('laborTroubleForm')">保存并继续新增</el-button>
<el-button @click="dialogIsShow()">取 消</el-button>
</div>
</el-dialog>
@@ -1915,7 +1923,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="putBadRecord('badRecordForm')">保 存</el-button>
- <el-button type="primary" @click="putBadRecordContinue('badRecordForm')">保存并继续新增</el-button>
+ <el-button v-if="isAdd" type="primary" @click="putBadRecordContinue('badRecordForm')">保存并继续新增</el-button>
<el-button @click="dialogIsShow()">取 消</el-button>
</div>
</el-dialog>
@@ -1971,7 +1979,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="putRemarkInfo('remarkInfoForm')">保 存</el-button>
- <el-button type="primary" @click="putRemarkInfoContinue('remarkInfoForm')">保存并继续新增</el-button>
+ <el-button v-if="isAdd" type="primary" @click="putRemarkInfoContinue('remarkInfoForm')">保存并继续新增</el-button>
<el-button @click="dialogIsShow()">取 消</el-button>
</div>
</el-dialog>
@@ -2965,8 +2973,12 @@
this[this.tableDataName] = data.rows
})
},
- dialogIsShow() {
- this.isAdd = true
+ dialogIsShow(val) {
+ if (val === '0') {
+ this.isAdd = true
+ } else {
+ this.isAdd = false
+ }
this.dialogshowArr[this.thisShowIndex].show = !this.dialogshowArr[this.thisShowIndex]
.show
},
diff --git a/src/views/user/inemployees.vue b/src/views/user/inemployees.vue
index d073d3e..c383f3d 100644
--- a/src/views/user/inemployees.vue
+++ b/src/views/user/inemployees.vue
@@ -1532,16 +1532,6 @@
this.$refs[formName].validate((valid) => {
if (valid) {
this.submitEmpInfo()
- // if (this.isAdd) {
- // this.$post('hr/empBaseInfo', { ...this.empBaseInfoForm }).then(() => {
- // this.buttonLoading = false
- // this.$message({
- // message: this.$t('tips.createSuccess'),
- // type: 'success'
- // })
- // this.cleanEmpBase()
- // })
- // }
this.cleanEmpBase()
this.fetch({
...this.queryParams,
--
Gitblit v1.8.0