Merge branch 'hcb' of SH-Arbitrate/Mediation-Frontend into dev
This commit was merged in pull request #99.
This commit is contained in:
@@ -17,4 +17,12 @@ export function smsList(data,params) {
|
||||
data: data,
|
||||
params:params
|
||||
})
|
||||
}
|
||||
//更新短信内容
|
||||
export function updateSendContent(data) {
|
||||
return request({
|
||||
url: 'shortMessage/updateSendContent',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="修改内容" :visible="resendVidable" v-if="resendVidable" @close="cancel" center
|
||||
:distroy-on-close="true">
|
||||
<div>
|
||||
<el-input type="textarea" :rows="6" placeholder="请输入内容" v-model="sendData">
|
||||
</el-input>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel" class="endbutton1" round><span>取 消</span></el-button>
|
||||
<el-button @click="submitSend" class="endbutton1" type="primary" round><span>确 认</span></el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
updateSendContent,
|
||||
} from "@/api/deliveryRecord/deliveryRecord.js";
|
||||
export default {
|
||||
props: ["resendVidable", "rowData","queryParams"],
|
||||
data() {
|
||||
return {
|
||||
sendData:''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
resendVidable(val){
|
||||
if(val){
|
||||
this.sendData = this.rowData.sendContent;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
this.$emit("cancelSend");
|
||||
},
|
||||
submitSend() {
|
||||
this.updateSendContentFn({
|
||||
id:this.rowData.id,
|
||||
sendContent:this.sendData
|
||||
})
|
||||
},
|
||||
updateSendContentFn(data){
|
||||
updateSendContent(data).then(res=>{
|
||||
this.$message.success('更新成功');
|
||||
this.$emit("cancelSend");
|
||||
this.$emit('getList',this.queryParams);
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -2,7 +2,8 @@
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="案件编号" prop="caseNum">
|
||||
<el-input v-model="queryParams.caseNum" placeholder="请输入案件编号" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input v-model="queryParams.caseNum" placeholder="请输入案件编号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
@@ -13,32 +14,41 @@
|
||||
<el-table-column label="序号" type="index" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
|
||||
}}</span>
|
||||
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="案件编号" align="center" prop="caseNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="手机号" align="center" prop="phone" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="发送时间" align="center" prop="sendTime" />
|
||||
<el-table-column label="发送状态" align="center" prop="sendStatus" />
|
||||
<el-table-column label="发送内容" align="center" prop="sendContent" />
|
||||
<el-table-column label="发送内容" align="center" prop="sendContent" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" @click="copyContent(scope.row.sendContent)" type="text"
|
||||
icon="el-icon-document-copy">复制内容</el-button>
|
||||
<el-button size="mini" @click="resend(scope.row)" type="text" icon="el-icon-s-promotion">编辑内容</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList({caseNum:queryParams.caseNum},{pageNum:queryParams.pageNum,pageSize:queryParams.pageSize})" />
|
||||
|
||||
<resend :resendVidable="resendVidable" :rowData="rowData" @getList="getList" @cancelSend="cancelSend" :queryParams="queryParams"></resend>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList({ caseNum: queryParams.caseNum }, { pageNum: queryParams.pageNum, pageSize: queryParams.pageSize })" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import {
|
||||
smsList,
|
||||
} from "@/api/deliveryRecord/deliveryRecord.js";
|
||||
|
||||
import resend from "./components/resend.vue";
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
export default {
|
||||
name: "paymentList",
|
||||
dicts: ["case_status"],
|
||||
components: { },
|
||||
components: {resend},
|
||||
data() {
|
||||
return {
|
||||
queryParams: {
|
||||
@@ -55,18 +65,39 @@ export default {
|
||||
// 校验表单
|
||||
rules: {},
|
||||
dataList: [],
|
||||
rowData:{},
|
||||
resendVidable:false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
getDicts("case_status").then(res => {
|
||||
this.getList({caseNum:this.queryParams.caseNum},{pageNum:this.queryParams.pageNum,pageSize:this.queryParams.pageSize});
|
||||
this.getList({ caseNum: this.queryParams.caseNum }, { pageNum: this.queryParams.pageNum, pageSize: this.queryParams.pageSize });
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
/** 复制内容 */
|
||||
copyContent(row) {
|
||||
const el = document.createElement('textarea');
|
||||
el.value = row;
|
||||
document.body.appendChild(el);
|
||||
el.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(el);
|
||||
this.$message.success('复制成功');
|
||||
},
|
||||
/**重新发送 */
|
||||
resend(row){
|
||||
this.resendVidable = true;
|
||||
this.rowData = row;
|
||||
},
|
||||
/**关闭弹窗 */
|
||||
cancelSend(){
|
||||
this.resendVidable = false;
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList({caseNum:this.queryParams.caseNum},{pageNum:this.queryParams.pageNum,pageSize:this.queryParams.pageSize});
|
||||
this.getList({ caseNum: this.queryParams.caseNum }, { pageNum: this.queryParams.pageNum, pageSize: this.queryParams.pageSize });
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
@@ -74,18 +105,18 @@ export default {
|
||||
this.handleQuery();
|
||||
},
|
||||
// 查询列表数据
|
||||
getList(data,params) {
|
||||
getList(data, params) {
|
||||
this.loading = true;
|
||||
smsList(data,params).then((response) => {
|
||||
smsList(data, params).then((response) => {
|
||||
this.dataList = response.rows;
|
||||
this.dataList.forEach(item=>{
|
||||
if(item.sendStatus == 0){
|
||||
this.dataList.forEach(item => {
|
||||
if (item.sendStatus == 0) {
|
||||
item.sendStatus = "发送失败"
|
||||
}else if(item.sendStatus == 1){
|
||||
} else if (item.sendStatus == 1) {
|
||||
item.sendStatus = "已送达"
|
||||
}else if(item.sendStatus == 2){
|
||||
} else if (item.sendStatus == 2) {
|
||||
item.sendStatus = "已读取"
|
||||
}else{
|
||||
} else {
|
||||
item.sendStatus = "发送失败"
|
||||
}
|
||||
})
|
||||
@@ -96,5 +127,5 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
Reference in New Issue
Block a user