|
@@ -52,7 +52,7 @@
|
|
|
</template>
|
|
|
|
|
|
<!-- 新增编辑 -->
|
|
|
- <hc-dialog v-model="addModal" :title="modalTitle" widths="50rem" :loading="addsaveLoading" @save="modalSave">
|
|
|
+ <hc-dialog v-model="addModal" :title="modalTitle" widths="50rem" @close="addsaveClose">
|
|
|
<hc-icon class="font-bold" name="user" style="font-size: 18px;" />
|
|
|
<span class="font-bold">基础信息</span>
|
|
|
<el-divider style="margin-top: 10px;" />
|
|
@@ -86,6 +86,12 @@
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</el-form>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="addsaveClose">取消</el-button>
|
|
|
+ <el-button :loading="addsaveLoading" hc-btn type="primary" @click="modalSave">提交</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</hc-dialog>
|
|
|
</hc-card>
|
|
|
</template>
|
|
@@ -265,7 +271,7 @@ const modalSave = async () => {
|
|
|
addsaveLoading.value = false
|
|
|
if (!error && code === 200) {
|
|
|
window?.$message?.success(msg)
|
|
|
- addModal.value = false
|
|
|
+ addsaveClose()
|
|
|
getTableData()
|
|
|
} else {
|
|
|
window.$message.error(msg ?? '操作失败')
|
|
@@ -279,7 +285,7 @@ const modalSave = async () => {
|
|
|
addsaveLoading.value = false
|
|
|
if (!error && code === 200) {
|
|
|
window?.$message?.success(msg)
|
|
|
- addModal.value = false
|
|
|
+ addsaveClose()
|
|
|
getTableData()
|
|
|
} else {
|
|
|
window.$message.error(msg ?? '操作失败')
|
|
@@ -287,6 +293,12 @@ const modalSave = async () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const addsaveClose = () => {
|
|
|
+ addModal.value = false
|
|
|
+ addsaveLoading.value = false
|
|
|
+ baseForm.value = {}
|
|
|
+}
|
|
|
+
|
|
|
const roleOptions = ref([])
|
|
|
const defaultProps = {
|
|
|
children: 'children',
|