代码调整

This commit is contained in:
joylink_cuiweidong 2021-04-13 10:42:28 +08:00
parent acefe20fc0
commit da059a3c9c

View File

@ -58,31 +58,31 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" width="168"> <el-table-column label="状态" width="178">
<!-- align="center" --> <!-- align="center" -->
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item <el-form-item
:prop="'stateList.'+scope.$index+'.status'" :prop="'stateList.'+scope.$index+'.status'"
:rules="[{required: true, message:'请输入状态', trigger: 'blur'}]" :rules="[{required: true, message:'请输入状态', trigger: 'blur'}]"
> >
<el-input v-model="scope.row.status" size="mini" type="text" style="width:148px" :maxlength="100" /> <el-input v-model="scope.row.status" size="mini" type="text" style="width:158px" :maxlength="100" />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="描述" width="210"> <el-table-column label="描述" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item <el-form-item
:prop="'stateList.'+scope.$index+'.description'" :prop="'stateList.'+scope.$index+'.description'"
:rules="[{required: true, message:'请输入描述', trigger: 'blur'}]" :rules="[{required: true, message:'请输入描述', trigger: 'blur'}]"
> >
<el-input v-model="scope.row.description" size="mini" type="text" style="width:190px" :maxlength="100" /> <el-input v-model="scope.row.description" size="mini" type="text" style="width:170px" :maxlength="100" />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="100"> <el-table-column label="操作" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="danger" size="mini" @click="deleteStatus(scope.$index,scope.row)">删除</el-button> <el-button type="danger" size="mini" @click="deleteStatus(scope.$index,scope.row)">删除</el-button>
<!-- <el-button type="danger" size="mini" @click="deleteStatus(scope.$index,scope.row)">预览</el-button> --> <!-- <el-button type="success" size="mini" @click="previewStatus(scope.$index,scope.row)">预览</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -147,6 +147,15 @@ export default {
const key = this.expandKeys.findIndex(each=>{ return each == row.id; }); const key = this.expandKeys.findIndex(each=>{ return each == row.id; });
if (key > 0) { this.expandKeys.splice(key, 1); } if (key > 0) { this.expandKeys.splice(key, 1); }
}, },
// previewStatus(index, row) {
// const styleLength = Object.keys(row.style || {}).length;
// const shapeLength = Object.keys(row.shape || {}).length;
// if (styleLength > 0 || shapeLength > 0 ) {
// const data = {style:row.style || {}, shape:row.shape || {}};
// debugger;
// // this.$iscs
// }
// },
addStyle(index) { addStyle(index) {
const style = this.formModel.stateList[index].style; const style = this.formModel.stateList[index].style;
if (!style) { if (!style) {