qianlishi 3 years ago
parent 04472426f2
commit 95fd2b0b27

@ -5,7 +5,7 @@
<el-select
v-model.trim="countryCode"
filterable
:placeholder="$lang('GLOBAL.countryName')"
placeholder="请选择国家"
:disabled="disabled"
clearable
@change="countryChange"
@ -22,7 +22,7 @@
<el-select
v-model.trim="provinceCode"
filterable
:placeholder="$lang('GLOBAL.provinceName')"
placeholder="请选择省"
:disabled="disabled"
clearable
@change="provinceChange"
@ -39,7 +39,7 @@
<el-select
v-model.trim="cityCode"
filterable
:placeholder="$lang('GLOBAL.cityName')"
placeholder="请选择市"
:disabled="disabled"
clearable
@change="cityChange"
@ -56,7 +56,7 @@
<el-select
v-model.trim="areaCode"
filterable
:placeholder="$lang('GLOBAL.districtName')"
placeholder="请选择区"
:disabled="disabled"
clearable
@change="districtChange"

@ -55,9 +55,7 @@
<el-input
v-if="item.inputType == 'input'"
v-model.trim="editForm[item.editField]"
:placeholder="
item.placeholder || $lang('placeholder_input')
"
:placeholder="item.placeholder || '请输入'"
:clearable="item.clearable !== false"
:disabled="fieldIsDisable(item.disabled)"
@change="value => formChange(item.editField, value, null)"
@ -78,9 +76,7 @@
v-model.trim="editForm[item.editField]"
:min="item.inputNumberOption.min"
:max="item.inputNumberOption.max"
:placeholder="
item.placeholder || $lang('placeholder_input')
"
:placeholder="item.placeholder || '请输入'"
:clearable="item.clearable !== false"
:disabled="fieldIsDisable(item.disabled)"
@change="value => formChange(item.editField, value, null)"
@ -91,9 +87,7 @@
v-model.trim="editForm[item.editField]"
:unit="item.anjiInput.unit"
:default-unit="item.anjiInput.defaultUnit"
:placeholder="
item.placeholder || $lang('placeholder_input')
"
:placeholder="item.placeholder || '请输入'"
:clearable="item.clearable !== false"
:disabled="fieldIsDisable(item.disabled)"
@change="value => formChange(item.editField, value, null)"
@ -126,9 +120,7 @@
v-else-if="item.inputType.indexOf('date') >= 0"
v-model="editForm[item.editField]"
style="width: 100%"
:placeholder="
item.placeholder || $lang('placeholder_select')
"
:placeholder="item.placeholder || '请选择'"
:type="item.inputType"
:format="item.format"
:value-format="item.valueFormat"
@ -186,9 +178,7 @@
<el-input
v-else-if="item.inputType == 'textarea'"
v-model.trim="editForm[item.editField]"
:placeholder="
item.placeholder || $lang('placeholder_input')
"
:placeholder="item.placeholder || '请输入'"
:clearable="item.clearable !== false"
:disabled="fieldIsDisable(item.disabled)"
type="textarea"
@ -300,7 +290,7 @@ export default {
}
//
if (this.isBlank(item["group"])) {
item["group"] = this.$lang("crudEditDialogGroupOther");
item["group"] = "其它";
}
return item;
});

@ -16,11 +16,7 @@
>
<!-- <el-table-column fixed type="selection" width="50" align="center" /> -->
<el-table-column
:label="$lang('GLOBAL.table_index')"
min-width="50"
align="center"
>
<el-table-column label="序号" min-width="50" align="center">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
@ -47,9 +43,7 @@
v-if="item.inputType == 'input'"
v-model="scope.row[item.field]"
size="small"
:placeholder="
item.placeholder || $lang('placeholder_input')
"
:placeholder="item.placeholder || '请输入'"
:clearable="item.clearable !== false"
:disabled="
saveButtonStatus[scope.$index] == 'inShow' ||
@ -82,9 +76,7 @@
size="small"
:min="item.inputNumberOption.min"
:max="item.inputNumberOption.max"
:placeholder="
item.placeholder || $lang('placeholder_input')
"
:placeholder="item.placeholder || '请输入'"
:clearable="item.clearable !== false"
:disabled="
saveButtonStatus[scope.$index] == 'inShow' ||
@ -102,9 +94,7 @@
:default-value="item.defaultValue"
:unit="item.anjiInput.unit"
:conversion="item.anjiInput.conversion"
:placeholder="
item.placeholder || $lang('placeholder_input')
"
:placeholder="item.placeholder || '请输入'"
:clearable="item.clearable !== false"
:disabled="
saveButtonStatus[scope.$index] == 'inShow' ||
@ -142,9 +132,7 @@
v-else-if="item.inputType.indexOf('date') >= 0"
v-model="scope.row[item.field]"
style="width: 100%"
:placeholder="
item.placeholder || $lang('placeholder_select')
"
:placeholder="item.placeholder || '请选择'"
:type="item.inputType"
:clearable="item.clearable !== false"
:disabled="
@ -165,11 +153,7 @@
</template>
</el-table-column>
</template>
<el-table-column
fixed="right"
:label="$lang('GLOBAL.table_operation')"
width="100"
>
<el-table-column fixed="right" label="操作" width="100">
<template slot-scope="scope">
<el-button
type="text"
@ -181,7 +165,7 @@
type="text"
size="small"
@click="handleDelete(scope.row, scope.$index)"
>{{ $lang("btn_delete") }}</el-button
>删除</el-button
>
</template>
</el-table-column>
@ -194,7 +178,7 @@
@click="handleAdd"
>
<i class="el-icon-plus" />
<span>{{ $lang("btn_add") }}</span>
<span>新增</span>
</button>
</div>
</div>
@ -349,11 +333,11 @@ export default {
//
getRowEditButton(index) {
if (this.saveButtonStatus[index] == "inEditing") {
return this.$lang("btn_savetemp");
return "btn_savetemp";
} else if (this.saveButtonStatus[index] == "inAdding") {
return this.$lang("btn_savetemp");
return "btn_savetemp";
} else if (this.saveButtonStatus[index] == "inShow") {
return this.$lang("btn_edit");
return "btn_edit";
} else {
return "not_permission";
}
@ -532,30 +516,6 @@ export default {
row[ROW_DELETE_FLAG] = true;
this.$set(this.form.records, realIndex, row);
this.$emit("input", this.form.records);
// this.form.records.splice(index, 1)
// this.rowIdList.push(row.id)
// this.$emit('input', this.form.records)
// this.$emit('update:valueNew', this.rowIdList)
/*
之前是直接调用接口删除后面统一改成在主表接口中增加更新删除
//
let primaryKey = row[this.primaryKeyFieldName]
this.$confirm(this.$lang('promptMessage_deleteTip'), this.$lang('promptMessage_deleteTipTitle'), {
type: 'warning',
confirmButtonClass: 'delete_sure',
cancelButtonClass: 'el-button--danger is-plain',
})
.then(() => {
this.option.buttons.delete.api(primaryKey).then((res) => {
// {code: "200", message: "", data: true}
this.checkRecords = []
this.handleQueryPageList()
})
})
.catch((e) => {
e
})
*/
}
}
};

@ -9,7 +9,7 @@
@close="handleCloseDialog('close')"
>
<template v-slot:title>
{{ option.title + "--" + $lang(`btn_${modelType}`) }}
{{ option.title + "--" + modelType }}
<button
type="button"
aria-label="Close"
@ -63,15 +63,15 @@
<div slot="footer" style="text-align: center">
<slot v-if="modelType == 'edit'" name="editBtn" :rowData="rowData" />
<el-button type="danger" plain @click="handleCloseDialog('close')">{{
$lang("btn_close")
}}</el-button>
<el-button type="danger" plain @click="handleCloseDialog('close')"
>关闭</el-button
>
<el-button
v-if="modelType != 'view'"
type="primary"
plain
@click="handleValidateAndSave"
>{{ $lang("btn_save") }}</el-button
>保存</el-button
>
</div>
</el-dialog>
@ -415,13 +415,6 @@ export default {
</script>
<style scoped lang="scss">
// /deep/.el-dialog__body {
// background-color: rgb(240, 242, 245);
// padding: 5px;
// max-height: 60vh;
// overflow: auto;
// height: calc(100vh - 100px);
// }
.notfull-screen {
/deep/.el-dialog__body {
background-color: rgb(240, 242, 245);

@ -45,14 +45,14 @@
type="danger"
plain
@click="handleDialogClose"
>{{ dialogConfig.isBtnClose.text || $lang("btn_close") }}</el-button
>{{ dialogConfig.isBtnClose.text || "关闭" }}</el-button
>
<el-button
v-if="isBtnSave"
type="primary"
plain
@click="handleDialogSave"
>{{ dialogConfig.isBtnSave.text || $lang("btn_save") }}</el-button
>{{ dialogConfig.isBtnSave.text || "保存" }}</el-button
>
<slot name="dialogBtn" />
</div>
@ -75,11 +75,11 @@ export default {
isSetColRow: true,
isBtnClose: {
value: true,
text: this.$lang("btn_close")
text: "关闭"
},
isBtnSave: {
value: true,
text: this.$lang("btn_save")
text: "保存"
},
column: 2,
setColumnFn: () => {}
@ -118,16 +118,16 @@ export default {
},
methods: {
getDialogTitle(type) {
let title = this.$lang("btn_add");
let title = "新增";
switch (type) {
case "add":
title = this.$lang("btn_add");
title = "新增";
break;
case "edit":
title = this.$lang("btn_edit");
title = "编辑";
break;
case "view":
title = this.$lang("btn_view");
title = "查看";
break;
default:
title = type;

@ -53,9 +53,9 @@
>
</template>
</el-option>
<el-option v-if="totalPage >= 1" value="" disabled>{{
$lang("GLOBAL.placeholder_select_remote_search")
}}</el-option>
<el-option v-if="totalPage >= 1" value="" disabled
>输入关键词搜索更多</el-option
>
</el-select>
</div>
</template>

Loading…
Cancel
Save