Merge pull request 'lukeyan' (#35) from lukeyan into master

Reviewed-on: #35
pull/37/head
lukeyan 2 years ago
commit 2f4ee7f8a8

@ -10,396 +10,402 @@
<!-- 防疫安全 -->
<tr class="table_body">
<td rowspan="5" @click="click_onelevel('3')"></td>
<td @click="click_twolevel"></td>
<td>疫苗接种</td>
<td @click="click_twolevel('4')"></td>
<td @click="click_threelevel('5')"></td>
</tr>
<tr class="table_body">
<td @click="click_twolevel"></td>
<td>核算检测</td>
<td @click="click_twolevel('7')"></td>
<td @click="click_threelevel('8')"></td>
</tr>
<tr class="table_body">
<td @click="click_twolevel"></td>
<td>场所码异常</td>
<td @click="click_twolevel('9')"></td>
<td @click="click_threelevel('10')"></td>
</tr>
<tr class="table_body">
<td @click="click_twolevel" rowspan="2">中高风险返企数</td>
<td>境外人</td>
<td @click="click_twolevel('11')" rowspan="2">中高风险返企数</td>
<td @click="click_threelevel('12')"></td>
</tr>
<tr class="table_body">
<td>境内人</td>
<td @click="click_threelevel('13')"></td>
</tr>
<!-- 人员安全 -->
<tr class="table_body">
<td rowspan="14" @click="click_onelevel('14')"></td>
<td rowspan="4" @click="click_twolevel"></td>
<td>未登记人</td>
<td rowspan="4" @click="click_twolevel('15')"></td>
<td @click="click_threelevel('16')"></td>
</tr>
<tr class="table_body">
<td>未注销人</td>
<td @click="click_threelevel('17')"></td>
</tr>
<tr class="table_body">
<td>未变更人</td>
<td @click="click_threelevel('18')"></td>
</tr>
<tr class="table_body">
<td>高危人</td>
<td @click="click_threelevel('19')"></td>
</tr>
<tr class="table_body">
<td rowspan="7" @click="click_twolevel"></td>
<td>重性精神病</td>
<td rowspan="7" @click="click_twolevel('20')"></td>
<td @click="click_threelevel('21')"></td>
</tr>
<tr class="table_body">
<td>非访人</td>
<td @click="click_threelevel('22')">访</td>
</tr>
<tr class="table_body">
<td>退役重点人</td>
<td @click="click_threelevel('23')">退</td>
</tr>
<tr class="table_body">
<td>个人极端人</td>
<td @click="click_threelevel('24')"></td>
</tr>
<tr class="table_body">
<td>前科人</td>
<td @click="click_threelevel('25')"></td>
</tr>
<tr class="table_body">
<td>家暴人</td>
<td @click="click_threelevel('26')"></td>
</tr>
<tr class="table_body">
<td>酗酒人</td>
<td @click="click_threelevel('27')"></td>
</tr>
<tr class="table_body">
<td rowspan="2" @click="click_twolevel"></td>
<td>危险品领用保管使用人</td>
<td rowspan="2" @click="click_twolevel('28')"></td>
<td @click="click_threelevel('29')">使</td>
</tr>
<tr class="table_body">
<td>危险品技术资质人</td>
<td @click="click_threelevel('30')"></td>
</tr>
<tr class="table_body">
<td>专家人</td>
<td>领域内有较高专业知识技术的专家</td>
<td @click="click_twolevel('31')"></td>
<td @click="click_threelevel('32')"></td>
</tr>
<!-- 消防安全 -->
<tr class="table_body">
<td rowspan="13" @click="click_onelevel('33')"></td>
<td rowspan="3" @click="click_twolevel"></td>
<td>设备录入</td>
<td rowspan="3" @click="click_twolevel('34')"></td>
<td @click="click_threelevel('35')"></td>
</tr>
<tr class="table_body">
<td>配置合理</td>
<td @click="click_threelevel('36')"></td>
</tr>
<tr class="table_body">
<td>日常保养及时</td>
<td @click="click_threelevel('37')"></td>
</tr>
<tr class="table_body">
<td rowspan="3" @click="click_twolevel"></td>
<td>必要资</td>
<td rowspan="3" @click="click_twolevel('38')"></td>
<td @click="click_threelevel('39')"></td>
</tr>
<tr class="table_body">
<td>验收许可或建设许</td>
<td @click="click_threelevel('40')"></td>
</tr>
<tr class="table_body">
<td>日常检查</td>
<td @click="click_threelevel('41')"></td>
</tr>
<tr class="table_body">
<td rowspan="3" @click="click_twolevel"></td>
<td>人员培训</td>
<td rowspan="3" @click="click_twolevel('42')"></td>
<td @click="click_threelevel('43')"></td>
</tr>
<tr class="table_body">
<td>演习举办情</td>
<td @click="click_threelevel('44')"></td>
</tr>
<tr class="table_body">
<td>管理层专业知晓程</td>
<td @click="click_threelevel('45')"></td>
</tr>
<tr class="table_body">
<td rowspan="4" @click="click_twolevel"></td>
<td>火灾事</td>
<td rowspan="4" @click="click_twolevel('46')"></td>
<td @click="click_threelevel('47')"></td>
</tr>
<tr class="table_body">
<td>其他事</td>
<td @click="click_threelevel('48')"></td>
</tr>
<tr class="table_body">
<td>消防违</td>
<td @click="click_threelevel('49')"></td>
</tr>
<tr class="table_body">
<td>协助扑</td>
<td @click="click_threelevel('50')"></td>
</tr>
<!-- 危化运输安全 -->
<tr class="table_body">
<td rowspan="15" @click="click_onelevel('51')"></td>
<td rowspan="2" @click="click_twolevel"></td>
<td>区内企业评</td>
<td rowspan="2" @click="click_twolevel('52')"></td>
<td @click="click_threelevel('53')"></td>
</tr>
<tr class="table_body">
<td>区外企业评</td>
<td @click="click_threelevel('54')"></td>
</tr>
<tr class="table_body">
<td rowspan="5" @click="click_twolevel"></td>
<td></td>
<td rowspan="5" @click="click_twolevel('55')"></td>
<td @click="click_threelevel('56')"></td>
</tr>
<tr class="table_body">
<td></td>
<td @click="click_threelevel('57')"></td>
</tr>
<tr class="table_body">
<td></td>
<td @click="click_threelevel('58')"></td>
</tr>
<tr class="table_body">
<td>疲劳驾</td>
<td @click="click_threelevel('59')"></td>
</tr>
<tr class="table_body">
<td>未按车道行</td>
<td @click="click_threelevel('60')"></td>
</tr>
<tr class="table_body">
<td rowspan="3" @click="click_twolevel"></td>
<td>经损事</td>
<td rowspan="3" @click="click_twolevel('61')"></td>
<td @click="click_threelevel('62')"></td>
</tr>
<tr class="table_body">
<td>伤亡事</td>
<td @click="click_threelevel('63')"></td>
</tr>
<tr class="table_body">
<td>泄漏事</td>
<td @click="click_threelevel('64')"></td>
</tr>
<tr class="table_body">
<td>行政/刑事案</td>
<td>有无拘留</td>
<td @click="click_twolevel('65')">/</td>
<td @click="click_threelevel('66')"></td>
</tr>
<tr class="table_body">
<td rowspan="2" @click="click_twolevel"></td>
<td>反馈整改完</td>
<td rowspan="2" @click="click_twolevel('67')"></td>
<td @click="click_threelevel('68')"></td>
</tr>
<tr class="table_body">
<td>整改反馈未完</td>
<td @click="click_threelevel('69')"></td>
</tr>
<tr class="table_body">
<td rowspan="2" @click="click_twolevel"></td>
<td>企业演</td>
<td rowspan="2" @click="click_twolevel('70')"></td>
<td @click="click_threelevel('71')"></td>
</tr>
<tr class="table_body">
<td>集中培训学</td>
<td @click="click_threelevel('72')"></td>
</tr>
<!-- 列管物品安全 -->
<tr class="table_body">
<td rowspan="10" @click="click_onelevel('73')"></td>
<td rowspan="2" @click="click_twolevel"></td>
<td>易制爆物品生产购买销售储存使</td>
<td rowspan="2" @click="click_twolevel('74')"></td>
<td @click="click_threelevel('75')">使</td>
</tr>
<tr class="table_body">
<td>剧毒物品生产购买销售储存使</td>
<td @click="click_threelevel('76')">使</td>
</tr>
<tr class="table_body">
<td rowspan="3" @click="click_twolevel"></td>
<td>放射源储</td>
<td rowspan="3" @click="click_twolevel('77')"></td>
<td @click="click_threelevel('78')"></td>
</tr>
<tr class="table_body">
<td>放射源运</td>
<td @click="click_threelevel('79')"></td>
</tr>
<tr class="table_body">
<td>放射源使</td>
<td @click="click_threelevel('80')">使</td>
</tr>
<tr class="table_body">
<td rowspan="2" @click="click_twolevel"></td>
<td>烟花爆竹运输销售</td>
<td rowspan="2" @click="click_twolevel('81')"></td>
<td @click="click_threelevel('82')"></td>
</tr>
<tr class="table_body">
<td>炸药雷管保管运输使</td>
<td @click="click_threelevel('83')">使</td>
</tr>
<tr class="table_body">
<td rowspan="3" @click="click_twolevel"></td>
<td></td>
<td rowspan="3" @click="click_twolevel('84')"></td>
<td @click="click_threelevel('85')"></td>
</tr>
<tr class="table_body">
<td>竞技体育用</td>
<td @click="click_threelevel('86')"></td>
</tr>
<tr class="table_body">
<td>商业射击馆枪</td>
<td @click="click_threelevel('87')"></td>
</tr>
<!-- 内部治安安全 -->
<tr class="table_body">
<td rowspan="15" @click="click_onelevel('88')"></td>
<td rowspan="4" @click="click_twolevel"></td>
<td>企业保卫人员名</td>
<td rowspan="4" @click="click_twolevel('89')"></td>
<td @click="click_threelevel('90')"></td>
</tr>
<tr class="table_body">
<td>企业物防设施清</td>
<td @click="click_threelevel('91')"></td>
</tr>
<tr class="table_body">
<td>企业技防前端感知(人脸车脸重要部位视频监控)</td>
<td @click="click_threelevel('92')">()</td>
</tr>
<tr class="table_body">
<td>企业技防设施连入平台情</td>
<td @click="click_threelevel('93')"></td>
</tr>
<tr class="table_body">
<td rowspan="3" @click="click_twolevel"></td>
<td>规章制度</td>
<td rowspan="3" @click="click_twolevel('94')">
企业各类规章制度应急预案应急演练
</td>
<td @click="click_threelevel('95')"></td>
</tr>
<tr class="table_body">
<td>应急预</td>
<td @click="click_threelevel('96')"></td>
</tr>
<tr class="table_body">
<td>应急演</td>
<td @click="click_threelevel('97')"></td>
</tr>
<tr class="table_body">
<td rowspan="3" @click="click_twolevel"></td>
<td>部门检查合格进行评</td>
<td rowspan="3" @click="click_twolevel('98')"></td>
<td @click="click_threelevel('99')"></td>
</tr>
<tr class="table_body">
<td>部门检查不合格及有缺陷的要求企业整</td>
<td @click="click_threelevel('100')"></td>
</tr>
<tr class="table_body">
<td>应系统研判(设施过期及设施故障)</td>
<td @click="click_threelevel('101')">()</td>
</tr>
<tr class="table_body">
<td rowspan="2" @click="click_twolevel"></td>
<td>企业反馈整改完</td>
<td rowspan="2" @click="click_twolevel('102')"></td>
<td @click="click_threelevel('103')"></td>
</tr>
<tr class="table_body">
<td>企业反馈整改未完</td>
<td @click="click_threelevel('104')"></td>
</tr>
<tr class="table_body">
<td rowspan="3" @click="click_twolevel"></td>
<td>企业发生被盗被骗等各类案件</td>
<td rowspan="3" @click="click_twolevel('105')">
企业发生的案件及企业员工涉及的案件
</td>
<td @click="click_threelevel('106')"></td>
</tr>
<tr class="table_body">
<td>企业员工涉及的各类案</td>
<td @click="click_threelevel('107')"></td>
</tr>
<tr class="table_body">
<td>企业员工涉及的信访等案</td>
<td @click="click_threelevel('108')">访</td>
</tr>
<!-- 道路安全 -->
<tr class="table_body">
<td rowspan="13" @click="click_onelevel('109')"></td>
<td rowspan="2" @click="click_twolevel"></td>
<td>区内企业评</td>
<td rowspan="2" @click="click_twolevel('110')"></td>
<td @click="click_threelevel('111')"></td>
</tr>
<tr class="table_body">
<td>区外企业评</td>
<td @click="click_threelevel('112')"></td>
</tr>
<tr class="table_body">
<td rowspan="5" @click="click_twolevel"></td>
<td></td>
<td rowspan="5" @click="click_twolevel('113')"></td>
<td @click="click_threelevel('114')"></td>
</tr>
<tr class="table_body">
<td></td>
<td @click="click_threelevel('115')"></td>
</tr>
<tr class="table_body">
<td></td>
<td @click="click_threelevel('116')"></td>
</tr>
<tr class="table_body">
<td>未按车道行</td>
<td @click="click_threelevel('117')"></td>
</tr>
<tr class="table_body">
<td>闯红</td>
<td @click="click_threelevel('118')"></td>
</tr>
<tr class="table_body">
<td rowspan="2" @click="click_twolevel"></td>
<td>经损事</td>
<td rowspan="2" @click="click_twolevel('119')"></td>
<td @click="click_threelevel('120')"></td>
</tr>
<tr class="table_body">
<td>伤亡事</td>
<td @click="click_threelevel('121')"></td>
</tr>
<tr class="table_body">
<td rowspan="2" @click="click_twolevel"></td>
<td>反馈整改完</td>
<td rowspan="2" @click="click_twolevel('122')"></td>
<td @click="click_threelevel('123')"></td>
</tr>
<tr class="table_body">
<td>反馈整改未完</td>
<td @click="click_threelevel('124')"></td>
</tr>
<tr class="table_body">
<td rowspan="2" @click="click_twolevel"></td>
<td>设施完</td>
<td rowspan="2" @click="click_twolevel('125')"></td>
<td @click="click_threelevel('126')"></td>
</tr>
<tr class="table_body">
<td>设施缺</td>
<td @click="click_threelevel('127')"></td>
</tr>
<!-- 防攻击安全 -->
<tr class="table_body">
<td rowspan="16" @click="click_onelevel('128')"></td>
<td rowspan="6" @click="click_twolevel"></td>
<td>重要岗位人员是否进行安全背景调</td>
<td rowspan="6" @click="click_twolevel('129')"></td>
<td @click="click_threelevel('130')"></td>
</tr>
<tr class="table_body">
<td>应急力量是否配</td>
<td @click="click_threelevel('131')"></td>
</tr>
<tr class="table_body">
<td>是否安排人员24小时值</td>
<td @click="click_threelevel('132')">24</td>
</tr>
<tr class="table_body">
<td>是否安排巡逻防控力</td>
<td @click="click_threelevel('133')"></td>
</tr>
<tr class="table_body">
<td>是否建立联防联动联治机</td>
<td @click="click_threelevel('134')"></td>
</tr>
<tr class="table_body">
<td>是否定期开展实战演</td>
<td @click="click_threelevel('135')"></td>
</tr>
<tr class="table_body">
<td rowspan="3" @click="click_twolevel"></td>
<td>是否有实体防护设</td>
<td rowspan="3" @click="click_twolevel('136')"></td>
<td @click="click_threelevel('137')"></td>
</tr>
<tr class="table_body">
<td>是否配备必要的防爆器</td>
<td @click="click_threelevel('138')"></td>
</tr>
<tr class="table_body">
<td>车辆进出口是否安装车辆冲撞设</td>
<td @click="click_threelevel('139')"></td>
</tr>
<tr class="table_body">
<td rowspan="3" @click="click_twolevel"></td>
<td>是否全方位安装视频监控系</td>
<td rowspan="3" @click="click_twolevel('140')"></td>
<td @click="click_threelevel('141')"></td>
</tr>
<tr class="table_body">
<td>是否安装访客登记系</td>
<td @click="click_threelevel('142')">访</td>
</tr>
<tr class="table_body">
<td>是否安装入侵和紧急报警系</td>
<td @click="click_threelevel('143')"></td>
</tr>
<tr class="table_body">
<td rowspan="2" @click="click_twolevel"></td>
<td>企业反馈完成整</td>
<td rowspan="2" @click="click_twolevel('144')"></td>
<td @click="click_threelevel('145')"></td>
</tr>
<tr class="table_body">
<td>企业反馈未完成整</td>
<td @click="click_threelevel('146')"></td>
</tr>
<tr class="table_body">
<td rowspan="2" @click="click_twolevel"></td>
<td>是否定期开展反恐实战演练</td>
<td rowspan="2" @click="click_twolevel('147')">
企业定期开展反恐实战演练培训
</td>
<td @click="click_threelevel('148')"></td>
</tr>
<tr class="table_body">
<td>是否定期开展反恐培</td>
<td @click="click_threelevel('149')"></td>
</tr>
<!-- 网络安全 -->
<tr class="table_body">
<td rowspan="10" @click="click_onelevel('150')"></td>
<td rowspan="2" @click="click_twolevel"></td>
<td>反馈整改完</td>
<td rowspan="2" @click="click_twolevel('151')"></td>
<td @click="click_threelevel('152')"></td>
</tr>
<tr class="table_body">
<td>反馈整改未完</td>
<td @click="click_threelevel('153')"></td>
</tr>
<tr class="table_body">
<td @click="click_twolevel"></td>
<td>是否有过行政处</td>
<td @click="click_twolevel('154')"></td>
<td @click="click_threelevel('155')"></td>
</tr>
<tr class="table_body">
<td @click="click_twolevel"></td>
<td>是否发生</td>
<td @click="click_twolevel('156')"></td>
<td @click="click_threelevel('157')"></td>
</tr>
<tr class="table_body">
<td rowspan="3" @click="click_twolevel"></td>
<td>网站备</td>
<td rowspan="3" @click="click_twolevel('158')"></td>
<td @click="click_threelevel('159')"></td>
</tr>
<tr class="table_body">
<td>应用备</td>
<td @click="click_threelevel('160')"></td>
</tr>
<tr class="table_body">
<td>应用评</td>
<td @click="click_threelevel('161')"></td>
</tr>
<tr class="table_body">
<td @click="click_twolevel"></td>
<td>等保定级评审完成/未完</td>
<td @click="click_twolevel('162')"></td>
<td @click="click_threelevel('163')">/</td>
</tr>
<tr class="table_body">
<td rowspan="2" @click="click_twolevel"></td>
<td>应急演</td>
<td rowspan="2" @click="click_twolevel('164')"></td>
<td @click="click_threelevel('165')"></td>
</tr>
<tr class="table_body">
<td>集中培训学</td>
<td @click="click_threelevel('166')"></td>
</tr>
</table>
</div>
@ -440,22 +446,30 @@ export default {
},
//
click_onelevel(id) {
const massage= {
safeRuleId:id,
level:'1',
}
const massage = {
safeRuleId: id,
level: "1",
};
this.$emit("back", massage);
bus.$emit('send', massage) //
bus.$emit("send", massage); //
},
//
click_twolevel() {
const level = "2";
this.$emit("backLevel", level);
click_twolevel(id) {
const massage = {
safeRuleId: id,
level: "2",
};
this.$emit("back", massage);
bus.$emit("send", massage); //
},
//
click_threelevel() {
const level = "3";
this.$emit("backLevel", level);
click_threelevel(id) {
const massage = {
safeRuleId: id,
level: "3",
};
this.$emit("back", massage);
bus.$emit("send", massage); //
},
},
};
@ -463,7 +477,7 @@ export default {
<style lang="less" scoped>
.display {
margin-top: 2vh;
width: 40.3vw;
width: 32vw;
height: 52vh;
overflow-y: scroll;
border: 0.1px solid #4d8f89;
@ -480,7 +494,7 @@ export default {
border-radius: 4px;
}
table {
width: 40vw;
width: 31.5vw;
height: 50vh;
border: 0.1px solid #4d8f89;
.table_title {
@ -506,9 +520,9 @@ table {
height: 4vh !important;
cursor: pointer;
}
td:hover{
td:hover {
background: #3c4b4a;
color: #54FFBE ;
color: #54ffbe;
}
}
}

@ -3,19 +3,34 @@
<div class="massage_body">
<div class="massage_form">
<div class="form_title">
{{ this.form_data.sumTitle }}&nbsp;&nbsp;&nbsp;=
<div class="title_text">{{ this.form_data.sumTitle }}</div>
</div>
<div class="form_space"></div>
<el-form ref="form" :model="form" class="levelform">
<div class="form_space">=</div>
<el-form
v-if="btn_flag"
ref="form"
:model="form"
class="text_levelform"
:disabled="disabled"
>
<el-form-item>
<label slot="label">{{ this.first_index }}&nbsp;&nbsp;&nbsp;×</label>
<el-input v-model="form.rate_one"></el-input>
</el-form-item>
<el-form-item v-for="item in this.form.form_data_for" :key="item.sort">
<label slot="label"
>{{
this.form_data.calculation[0].indexName
}}&nbsp;&nbsp;&nbsp;×</label
>+&nbsp;&nbsp;&nbsp;{{ item.indexName }}&nbsp;&nbsp;&nbsp;×</label
>
<el-input v-model="this.form_data.calculation[0].rate"></el-input>
<el-input v-model="item.rate"></el-input>
</el-form-item>
<el-form-item v-for="item in this.form_data_for" :key="item.sort">
</el-form>
<!-- 编辑表单 -->
<el-form v-else ref="form" :model="form" class="levelform">
<el-form-item>
<label slot="label">{{ this.first_index }}&nbsp;&nbsp;&nbsp;×</label>
<el-input v-model="form.rate_one"></el-input>
</el-form-item>
<el-form-item v-for="item in this.form.form_data_for" :key="item.sort">
<label slot="label"
>+&nbsp;&nbsp;&nbsp;{{ item.indexName }}&nbsp;&nbsp;&nbsp;×</label
>
@ -26,7 +41,7 @@
<el-button @click="change_form"></el-button>
</div>
<div v-else class="massage_btn_two">
<el-button> </el-button>
<el-button @click="save_form"> </el-button>
<el-button @click="cancel_form"> </el-button>
</div>
</div>
@ -34,21 +49,43 @@
</template>
<script>
import bus from "@/assets/js/eventBus.js";
import { safeCalculation } from "@/api/systemManagement/safeIndex";
import {
safeCalculation,
saveSafeCalculation,
} from "@/api/systemManagement/safeIndex";
export default {
name: "IndexmassageOne",
data() {
return {
btn_flag: true,
form: {},
form_data: {}, // form-item
form: {
rate_one: "",
form_data_for: [], // form-item
},
sumTitle: "",
id: "",
safeRuleId: "",
first_index: "", //
form_data: {}, // form-item
all_data: 0, //
disabled: true,
params: {}, //
};
},
created() {
safeCalculation({ safeRuleId: 3, levelIndex: 1 }).then((res) => {
//
this.params = {
safeRuleId: 3,
levelIndex: 1
};
safeCalculation(this.params).then((res) => {
this.form_data = res.data.ruleDetail;
this.form_data_for = res.data.ruleDetail.calculation.filter(
this.form.rate_one = this.form_data.calculation[0].rate;
this.sumTitle = res.data.ruleDetail.sumTitle;
this.id = res.data.id;
this.safeRuleId = res.data.safeRuleId;
this.first_index = this.form_data.calculation[0].indexName;
this.form.form_data_for = res.data.ruleDetail.calculation.filter(
(element, index) => index > 0
);
});
@ -56,14 +93,18 @@ export default {
mounted() {
bus.$on("send", (data) => {
console.log(data, "data");
const params = {
this.params = {
safeRuleId: data.safeRuleId,
levelIndex: data.level,
};
safeCalculation(params).then((res) => {
console.log("res1", res);
safeCalculation(this.params).then((res) => {
this.form_data = res.data.ruleDetail;
this.form_data_for = res.data.ruleDetail.calculation.filter(
this.form.rate_one = this.form_data.calculation[0].rate;
this.sumTitle = res.data.ruleDetail.sumTitle;
this.id = res.data.id;
this.safeRuleId = res.data.safeRuleId;
this.first_index = this.form_data.calculation[0].indexName;
this.form.form_data_for = res.data.ruleDetail.calculation.filter(
(element, index) => index > 0
);
});
@ -73,9 +114,66 @@ export default {
//
change_form() {
this.btn_flag = false;
console.log("this.form", this.form);
},
save_form() {
const rate_arr = this.form.form_data_for.map((item) => item.rate);
rate_arr.push(this.form.rate_one);
console.log("rate_arr", rate_arr);
this.all_data = 0; //
//
for (let i = 0; i < rate_arr.length; i++) {
console.log(rate_arr[i]);
console.log("Number(rate_arr[i])", Number(rate_arr[i]));
this.all_data += Number(rate_arr[i]);
}
if (isNaN(this.all_data) || this.all_data != 1) {
this.$message.warning("保存失败,各指标占比应大于等于0且总和应等于1");
} else {
console.log("this.all_data", this.all_data);
const head_arr = [
//
{
indexName: this.first_index,
rate: this.form.rate_one,
sort: "1",
},
];
const all_arr = [...head_arr, ...this.form.form_data_for];
const obj = {
calculation: all_arr,
sumTitle: this.sumTitle,
};
const params = {
calculationRule: JSON.stringify(obj),
id: this.id,
safeRuleId: this.safeRuleId,
};
saveSafeCalculation(params)
.then((res) => {
console.log(res);
// this.btn_loading = false;
this.btn_flag = true;
})
.catch((err) => {
console.log(err);
});
}
},
//
cancel_form() {
//
safeCalculation(this.params).then((res) => {
this.form_data = res.data.ruleDetail;
this.form.rate_one = this.form_data.calculation[0].rate;
this.sumTitle = res.data.ruleDetail.sumTitle;
this.id = res.data.id;
this.safeRuleId = res.data.safeRuleId;
this.first_index = this.form_data.calculation[0].indexName;
this.form.form_data_for = res.data.ruleDetail.calculation.filter(
(element, index) => index > 0
);
});
this.btn_flag = true;
},
},
@ -83,8 +181,21 @@ export default {
</script>
<style lang="less" scoped>
/deep/.levelform.el-form {
width: 27vw;
height: 20vh;
width: 32.5vw;
margin-top: 2vh;
display: flex;
flex-wrap: wrap;
.el-form-item {
display: flex;
.el-form-item__label {
font-size: 18px;
color: #fff;
}
}
}
/deep/.text_levelform.el-form {
width: 32.5vw;
margin-top: 2vh;
display: flex;
flex-wrap: wrap;
.el-form-item {
@ -95,19 +206,6 @@ export default {
}
}
}
// /deep/.text_form.el-form {
// height: 10vh;
// margin-top: 3vh;
// display: flex;
// flex-wrap: wrap;
// .el-form-item {
// display: flex;
// .el-form-item__label {
// font-size: 18px;
// color: #fff;
// }
// }
// }
/deep/.el-input__inner {
width: 3vw;
border-radius: 0px;
@ -115,7 +213,7 @@ export default {
background: #3c4b4a;
color: #fff;
}
/deep/.text_form {
/deep/.text_levelform {
.el-form-item {
.el-form-item__content {
.el-input {
@ -132,28 +230,35 @@ export default {
}
.massage_body {
margin-top: 2vh;
width: 43.3vw;
width: 52.5vw;
height: 52vh;
border: 0.1px solid #4d8f89;
.massage_form {
display: flex;
margin-top: 1vh;
margin-left: 0.6vw;
width: 42vw;
height: 22vh;
width: 51vw;
color: #fff;
border-radius: 4px;
background: rgba(31, 45, 49, 0.4);
border: 0.5px solid #485f6c;
.form_title {
width: 5vw;
width: 7vw;
height: 22vh;
line-height: 3.8vh;
// line-height: 7.5vh;
font-size: 18px;
text-align: right;
.title_text {
width: 7vw;
height: 10vh;
margin-top: 2.7vh;
}
}
.form_space {
width: 1vw;
font-size: 18px;
text-align: center;
line-height: 7.5vh;
width: 1.5vw;
height: 22vh;
}
}

@ -1,14 +1,22 @@
<!-- 三级指标详细信息展示 -->
<template>
<div>789</div>
</template>
<script>
<div class="massage_body">
<div class="note_text"></div>
</div>
</template>
<script>
export default {
name: "indexmassageThree",
data() {
return {};
},
};
</script>
<style lang="less" scoped>
</style>
</script>
<style lang="less" scoped>
.massage_body {
margin-top: 2vh;
width: 52.5vw;
height: 52vh;
border: 0.1px solid #4d8f89;
}
</style>

@ -1,14 +1,284 @@
<!-- 二级指标详细信息展示 -->
<template>
<div>456</div>
</template>
<div class="massage_body">
<div class="massage_form">
<div class="form_title">
<div class="title_text">{{ this.form_data.sumTitle }}</div>
</div>
<div class="form_space">=</div>
<el-form
v-if="btn_flag"
ref="form"
:model="form"
class="text_levelform"
:disabled="disabled"
>
<el-form-item>
<label slot="label">{{ this.first_index }}&nbsp;&nbsp;&nbsp;×</label>
<el-input v-model="form.rate_one"></el-input>
</el-form-item>
<el-form-item v-for="item in this.form.form_data_for" :key="item.sort">
<label slot="label"
>+&nbsp;&nbsp;&nbsp;{{ item.indexName }}&nbsp;&nbsp;&nbsp;×</label
>
<el-input v-model="item.rate"></el-input>
</el-form-item>
</el-form>
<!-- 编辑表单 -->
<el-form v-else ref="form" :model="form" class="levelform">
<el-form-item>
<label slot="label">{{ this.first_index }}&nbsp;&nbsp;&nbsp;×</label>
<el-input v-model="form.rate_one"></el-input>
</el-form-item>
<el-form-item v-for="item in this.form.form_data_for" :key="item.sort">
<label slot="label"
>+&nbsp;&nbsp;&nbsp;{{ item.indexName }}&nbsp;&nbsp;&nbsp;×</label
>
<el-input v-model="item.rate"></el-input>
</el-form-item>
</el-form>
<div v-if="btn_flag" class="massage_btn">
<el-button @click="change_form"></el-button>
</div>
<div v-else class="massage_btn_two">
<el-button @click="save_form"> </el-button>
<el-button @click="cancel_form"> </el-button>
</div>
</div>
</div>
</template>
<script>
export default {
name: "indexmassageTwo",
import bus from "@/assets/js/eventBus.js";
import {
safeCalculation,
saveSafeCalculation,
} from "@/api/systemManagement/safeIndex";
export default {
name: "IndexmassageTwo",
data() {
return {};
return {
btn_flag: true,
form: {
rate_one: "",
form_data_for: [], // form-item
},
sumTitle: "",
id: "",
safeRuleId: "",
first_index: "", //
form_data: {}, // form-item
all_data: 0, //
disabled: true,
params: {}, //
};
</script>
},
created() {
//
// this.params = {
// safeRuleId: 3,
// levelIndex: 2,
// };
// safeCalculation(this.params).then((res) => {
// this.form_data = res.data.ruleDetail;
// this.form.rate_one = this.form_data.calculation[0].rate;
// this.sumTitle = res.data.ruleDetail.sumTitle;
// this.id = res.data.id;
// this.safeRuleId = res.data.safeRuleId;
// this.first_index = this.form_data.calculation[0].indexName;
// this.form.form_data_for = res.data.ruleDetail.calculation.filter(
// (element, index) => index > 0
// );
// });
},
mounted() {
bus.$on("send", (data) => {
console.log(data, "data");
this.params = {
safeRuleId: data.safeRuleId,
levelIndex: data.level,
};
safeCalculation(this.params).then((res) => {
this.form_data = res.data.ruleDetail;
this.form.rate_one = this.form_data.calculation[0].rate;
this.sumTitle = res.data.ruleDetail.sumTitle;
this.id = res.data.id;
this.safeRuleId = res.data.safeRuleId;
this.first_index = this.form_data.calculation[0].indexName;
this.form.form_data_for = res.data.ruleDetail.calculation.filter(
(element, index) => index > 0
);
});
});
},
methods: {
//
change_form() {
this.btn_flag = false;
console.log("this.form", this.form);
},
save_form() {
const rate_arr = this.form.form_data_for.map((item) => item.rate);
rate_arr.push(this.form.rate_one);
console.log("rate_arr", rate_arr);
this.all_data = 0; //
//
for (let i = 0; i < rate_arr.length; i++) {
console.log(rate_arr[i]);
console.log("Number(rate_arr[i])", Number(rate_arr[i]));
this.all_data += Number(rate_arr[i]);
}
if (isNaN(this.all_data) || this.all_data != 1) {
this.$message.warning("保存失败,各指标占比应大于等于0且总和应等于1");
} else {
console.log("this.all_data", this.all_data);
const head_arr = [
//
{
indexName: this.first_index,
rate: this.form.rate_one,
sort: "1",
},
];
const all_arr = [...head_arr, ...this.form.form_data_for];
const obj = {
calculation: all_arr,
sumTitle: this.sumTitle,
};
const params = {
calculationRule: JSON.stringify(obj),
id: this.id,
safeRuleId: this.safeRuleId,
};
saveSafeCalculation(params)
.then((res) => {
console.log(res);
// this.btn_loading = false;
this.btn_flag = true;
})
.catch((err) => {
console.log(err);
});
}
},
//
cancel_form() {
//
safeCalculation(this.params).then((res) => {
this.form_data = res.data.ruleDetail;
this.form.rate_one = this.form_data.calculation[0].rate;
this.sumTitle = res.data.ruleDetail.sumTitle;
this.id = res.data.id;
this.safeRuleId = res.data.safeRuleId;
this.first_index = this.form_data.calculation[0].indexName;
this.form.form_data_for = res.data.ruleDetail.calculation.filter(
(element, index) => index > 0
);
});
this.btn_flag = true;
},
},
};
</script>
<style lang="less" scoped>
</style>
/deep/.levelform.el-form {
width: 32.5vw;
margin-top: 2vh;
display: flex;
flex-wrap: wrap;
.el-form-item {
display: flex;
.el-form-item__label {
font-size: 18px;
color: #fff;
}
}
}
/deep/.text_levelform.el-form {
width: 32.5vw;
margin-top: 2vh;
display: flex;
flex-wrap: wrap;
.el-form-item {
display: flex;
.el-form-item__label {
font-size: 18px;
color: #fff;
}
}
}
/deep/.el-input__inner {
width: 3vw;
border-radius: 0px;
font-size: 16px;
background: #3c4b4a;
color: #fff;
}
/deep/.text_levelform {
.el-form-item {
.el-form-item__content {
.el-input {
.el-input__inner {
width: 3vw;
border: 0px;
border-radius: 0px;
background: rgba(165, 42, 42, 0);
color: #fff;
}
}
}
}
}
.massage_body {
margin-top: 2vh;
width: 52.5vw;
height: 52vh;
border: 0.1px solid #4d8f89;
.massage_form {
display: flex;
margin-top: 1vh;
margin-left: 0.6vw;
width: 51vw;
color: #fff;
border-radius: 4px;
background: rgba(31, 45, 49, 0.4);
border: 0.5px solid #485f6c;
.form_title {
width: 7vw;
height: 22vh;
font-size: 18px;
text-align: right;
.title_text {
width: 7vw;
height: 10vh;
margin-top: 2.7vh;
}
}
.form_space {
font-size: 18px;
text-align: center;
line-height: 7.5vh;
width: 1.5vw;
height: 22vh;
}
}
.massage_btn,
.massage_btn_two {
width: 10vw;
height: 14vh;
text-align: center;
line-height: 14vh;
.el-button {
width: 4vw;
border: 1px solid #4a6072;
color: #fff;
border-radius: 0px !important;
background: #323f43;
}
.el-button:focus,
.el-button:hover {
color: #34e1b3;
filter: brightness(150%);
}
}
}
</style>

@ -153,9 +153,9 @@
</div>
<div class="index_massage">
<div class="table_title"></div>
<IndexmassageOne v-if="this.level ==='1'" ref="indexmassageOne"></IndexmassageOne>
<IndexmassageTwo v-else-if="this.level === '2'" ref="indexmassageTwo"></IndexmassageTwo>
<IndexmassageThree v-else-if="this.level === '3'" ref="indexmassageThree"></IndexmassageThree>
<IndexmassageOne v-show="this.level ==='1'" ref="indexmassageOne"></IndexmassageOne>
<IndexmassageTwo v-show="this.level === '2'" ref="indexmassageTwo"></IndexmassageTwo>
<IndexmassageThree v-show="this.level === '3'" ref="indexmassageThree"></IndexmassageThree>
</div>
</div>
</div>
@ -436,7 +436,7 @@ export default {
/* 表格区域 */
.index_table {
margin-top: 2vh;
width: 41vw;
width: 32vw;
height: 58.5vh;
// background: #fff;
.table_title {
@ -449,7 +449,7 @@ export default {
.index_massage {
margin-top: 2vh;
margin-left: 0.5vw;
width: 43.5vw;
width: 52.5vw;
height: 58.5vh;
// background: #fff;
.table_title {

Loading…
Cancel
Save