|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="container container-historical-notes-dlg">
|
|
|
- <el-dialog title="历史备注" :visible.sync="historicalNotesDlgVisible" width="50%" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="handleClose">
|
|
|
+ <el-dialog title="历史备注" :visible.sync="historicalNotesDlgVisible" width="50%" append-to-body :close-on-click-modal="false" :before-close="handleClose">
|
|
|
<div>
|
|
|
<p class="title">添加备注</p>
|
|
|
<el-input type="textarea" :rows="2" placeholder="请输入备注内容" v-model="textarea"> </el-input>
|
|
@@ -8,18 +8,34 @@
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-table :data="tableData" style="width: 100%; margin-bottom: 20px" border height="400">
|
|
|
- <el-table-column align="center" prop="Content" label="记录内容" > </el-table-column>
|
|
|
+ <el-table-column align="center" prop="Content" label="记录内容"> </el-table-column>
|
|
|
<el-table-column align="center" prop="RemarkType" label="备注类型" width="180"> </el-table-column>
|
|
|
<el-table-column align="center" prop="SysAdminName" label="创建人" width="100"> </el-table-column>
|
|
|
<el-table-column align="center" prop="CreateTime" label="创建时间" width="180"> </el-table-column>
|
|
|
+ <el-table-column align="center" label="操作" width="180">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span class="editsty" style="margin-right: 20px" v-if="row.BtnEdit" @click="edititem(row)">修改</span>
|
|
|
+ <span class="deletesty" v-if="row.BtnDelete" @click="deleteitem(row)">删除</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="修改" :visible.sync="editDlg" width="40%" append-to-body :close-on-click-modal="false" :before-close="edithandleClose">
|
|
|
+ <div>
|
|
|
+ <el-input type="textarea" :rows="2" placeholder="请输入备注内容" v-model="textareaEdit"> </el-input>
|
|
|
+ <div class="edit-dlg-btn" style="display: flex; justify-content: center">
|
|
|
+ <el-button style="margin: 20px 20px 20px 0" type="primary" @click="edithandleClose">取消</el-button>
|
|
|
+ <el-button style="margin: 20px 0" type="primary" @click="editBtn">保存</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { dataMainInterface } from "@/api/api.js";
|
|
|
+import { async } from "@antv/x6/lib/registry/marker/async";
|
|
|
|
|
|
export default {
|
|
|
name: "",
|
|
@@ -38,6 +54,9 @@ export default {
|
|
|
tableData: [],
|
|
|
textarea: "",
|
|
|
dialogVisible: true,
|
|
|
+ editDlg: false, //修改的弹框
|
|
|
+ textareaEdit: "", //修改的文本域
|
|
|
+ editHistoryId: "",
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -76,6 +95,45 @@ export default {
|
|
|
this.$emit("update:historicalNotesDlgVisible", false);
|
|
|
this.$emit("update:CompanyId", 0);
|
|
|
},
|
|
|
+ // 删除
|
|
|
+ deleteitem(item) {
|
|
|
+ this.$confirm("确定要删除这条备注吗?", "提示", {
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ const res = await dataMainInterface.raiServeRemarkMelete({
|
|
|
+ HistoryId: item.HistoryId,
|
|
|
+ });
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ this.getDataList();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ //
|
|
|
+ edititem(item) {
|
|
|
+ this.editHistoryId = item.HistoryId;
|
|
|
+ this.textareaEdit = item.Content;
|
|
|
+ this.editDlg = true;
|
|
|
+ },
|
|
|
+ // 编辑的确认事件
|
|
|
+ async editBtn() {
|
|
|
+ const res = await dataMainInterface.raiServeRemarkEdit({
|
|
|
+ HistoryId: this.editHistoryId,
|
|
|
+ Content: this.textareaEdit,
|
|
|
+ });
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ this.$message.success("修改成功");
|
|
|
+ this.edithandleClose();
|
|
|
+ this.getDataList();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 编辑的弹框关闭
|
|
|
+ edithandleClose() {
|
|
|
+ this.editDlg = false; //
|
|
|
+ this.textareaEdit = "";
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -85,5 +143,9 @@ export default {
|
|
|
font-weight: 600;
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
+ .edit-dlg-btn {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|