|
@@ -0,0 +1,61 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-button :type="disabled?'':btnType" size="mini" :disabled="disabled" @click="dialogShow">{{btnTitle}}</el-button>
|
|
|
+ <el-dialog :title="$t(`提示`)" :visible.sync="dialogTableVisible" append-to-body :show-close="false">
|
|
|
+ <div style="margin-bottom: 20px"><i class="el-icon-warning" style="color: #eda51c;margin-right: 10px"></i>{{$t(content) + '?'}}</div>
|
|
|
+ <el-descriptions :column="column?column:3" size="mini">
|
|
|
+ <el-descriptions-item label-class-name="my-label-layout" content-class-name="my-content" v-for="item in mainAData" :key="item.index" >
|
|
|
+ <template slot="label">
|
|
|
+ {{$t(item.label)}}
|
|
|
+ </template>
|
|
|
+ <span :style="item.style?item.style():''">{{item.value !== ''?$t(item.value):'--'}}</span>
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogTableVisible = false" size="small">{{$t(`取 消`)}}</el-button>
|
|
|
+ <el-button type="primary" @click="onSubmit" size="small">{{$t(`确 定`)}}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ name: "index",
|
|
|
+ props:["btnTitle","mainAData","disabled","btnType","column","content","paramId","idName"],
|
|
|
+ data(){
|
|
|
+ return {
|
|
|
+ dialogTableVisible:false,
|
|
|
+ param:{
|
|
|
+ "id": 20221010164602,
|
|
|
+ "content": {
|
|
|
+ "sa_customersids": [5791],
|
|
|
+ "status": "暂缓"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ dialogShow(){
|
|
|
+ this.dialogTableVisible = true
|
|
|
+ console.log(this.mainAData,'mainAData')
|
|
|
+ },
|
|
|
+ async onSubmit(){
|
|
|
+ this.param.id = this.paramId
|
|
|
+ this.param.content = {
|
|
|
+ [this.idName]:this.$route.query.id
|
|
|
+ }
|
|
|
+ const res = await this.$api.requested(this.param)
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+ /deep/ .el-dialog__body {
|
|
|
+ padding: 0 20px 20px 20px !important;
|
|
|
+ }
|
|
|
+</style>
|