| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['ycl:threshold:add']" |
| | | >新增 |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['ycl:threshold:edit']" |
| | | >修改 |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['ycl:threshold:remove']" |
| | | >删除 |
| | | </el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | <!-- <el-row :gutter="10" class="mb8">--> |
| | | <!-- <el-col :span="1.5">--> |
| | | <!-- <el-button--> |
| | | <!-- type="primary"--> |
| | | <!-- plain--> |
| | | <!-- icon="el-icon-plus"--> |
| | | <!-- size="mini"--> |
| | | <!-- @click="handleAdd"--> |
| | | <!-- v-hasPermi="['ycl:threshold:add']"--> |
| | | <!-- >新增--> |
| | | <!-- </el-button>--> |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | |
| | | <el-table v-loading="loading" :data="thresholdList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center"/> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="超时天数" align="center" prop="timeout"/> |
| | | <el-table-column label="指标" align="center" prop="indicator"> |
| | | <el-table-column label="工单阈值" align="center" prop="indicator"> |
| | | <template slot-scope="scope"> |
| | | <div v-for="item in JSON.parse(scope.row.indicator)" :key="item"> |
| | | {{ item.label }}:{{ item.value }} |
| | | <div v-for="item in JSON.parse(scope.row.indicator)" :key="item" style="display: flex;flex-direction: row"> |
| | | <div style="width: 120px;text-align: right">{{ item.label }}</div> |
| | | <div style="width: 60px;text-align: right">{{ item.value}}</div> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="下发阈值" align="center" prop="indicator"> |
| | | <template slot-scope="scope"> |
| | | <div v-for="item in JSON.parse(scope.row.indicator)" :key="item" style="display: flex;flex-direction: row"> |
| | | <div style="width: 120px;text-align: right">{{ item.label }}</div> |
| | | <div style="width: 60px;text-align: right">{{ item.value2}}</div> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | v-hasPermi="['ycl:threshold:edit']" |
| | | >修改 |
| | | </el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['ycl:threshold:remove']" |
| | | >删除 |
| | | </el-button> |
| | | <!-- <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- icon="el-icon-delete"--> |
| | | <!-- @click="handleDelete(scope.row)"--> |
| | | <!-- v-hasPermi="['ycl:threshold:remove']"--> |
| | | <!-- >删除--> |
| | | <!-- </el-button>--> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <el-input type="number" min="0" max="1000" v-model="form.timeout" placeholder="请输入超时天数"/> |
| | | </el-form-item> |
| | | <el-form-item :label="indicator.label" prop="indexOneValue" v-for="indicator in indicators" label-width="150px"> |
| | | <el-input class="el-input-width" v-model="indicator.value" :placeholder="'请输入' + indicator.label"/> |
| | | <el-input class="el-input-half-width" v-model="indicator.value" placeholder="工单阈值"/> |
| | | <el-input style="float: right;" class="el-input-half-width" v-model="indicator.value2" placeholder="下发阈值"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | .el-input-half-width { |
| | | width: calc(50% - 6px); /* 减去一些间隔 */ |
| | | } |
| | | </style> |