|
@@ -85,6 +85,12 @@
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
+ icon="el-icon-view"
|
|
|
+ @click="handleBrowse(scope.row)"
|
|
|
+ >查看</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
>删除</el-button>
|
|
@@ -102,7 +108,7 @@
|
|
|
|
|
|
<!-- 添加或修改行动对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px" :disabled="this.operatingState == 'Browse'">
|
|
|
<el-divider content-position="left">
|
|
|
<dev style="width: 50px; height: 40px; font-size: 18px">基本信息</dev>
|
|
|
</el-divider>
|
|
@@ -265,7 +271,7 @@
|
|
|
</div>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="submitForm" v-if="this.operatingState != 'Browse'">确 定</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -362,6 +368,8 @@ export default {
|
|
|
{ required: true, message: "拜访效果不能为空", trigger: "blur" }
|
|
|
],
|
|
|
},
|
|
|
+ //当前操作状态
|
|
|
+ operatingState: '',
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -454,6 +462,7 @@ export default {
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
this.reset();
|
|
|
+ this.operatingState = "Insert";
|
|
|
//新增行动设置默认值
|
|
|
if(this.source == 'BoDetails'){
|
|
|
this.queryParams.bo = this.bo.id;
|
|
@@ -485,6 +494,7 @@ export default {
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
+ this.operatingState = "Update";
|
|
|
const id = row.id || this.ids
|
|
|
getBehavior(id).then(response => {
|
|
|
this.form = response.data;
|
|
@@ -493,6 +503,17 @@ export default {
|
|
|
});
|
|
|
this.getPictureList();
|
|
|
},
|
|
|
+ /** 查看按钮操作 */
|
|
|
+ handleBrowse(row) {
|
|
|
+ this.reset();
|
|
|
+ const id = row.id || this.ids
|
|
|
+ getBehavior(id).then(response => {
|
|
|
+ this.form = response.data;
|
|
|
+ this.open = true;
|
|
|
+ this.operatingState = "Browse";
|
|
|
+ this.title = "基础信息";
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|