123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- <!-- -->
- <template>
- <hc-new-card>
- <template #header>
- <div class="header_box">
- <HcCardItem title="前言">
- <div style="height: 100%;">
- <el-input
- v-model="consolusionData.foreword"
- placeholder="请输入"
- show-word-limit
- type="textarea"
- class="inputbox"
- :disabled="state === 2"
- />
- </div>
- </HcCardItem>
- </div>
- </template>
- <el-container class="hc-table-layout">
- <el-container id="hc_table_container" class="hc-table-container">
- <HcCardItem id="hc_table_data" title="项目概况">
- <div style="height: 100%;">
- <el-input
- v-model="consolusionData.generalSituation"
- placeholder="请输入"
- show-word-limit
- type="textarea"
- class="inputbox"
- :disabled="state === 2"
- />
- </div>
- </HcCardItem>
- <HcCardItem id="hc_table_score" title="项目档案管理情况">
- <div style="height: 100%;">
- <el-input
- v-model="consolusionData.adminCondition"
- placeholder="请输入"
- show-word-limit
- type="textarea"
- class="inputbox"
- :disabled="state === 2"
- />
- </div>
- </HcCardItem>
- </el-container>
- <el-aside id="hc_table_aside" class="hc-table-aside">
- <HcCardItem title="存在问题及建议">
- <div style="height: 100%;">
- <el-input
- v-model="consolusionData.questionSuggest"
- placeholder="请输入"
- show-word-limit
- type="textarea"
- class="inputbox"
- :disabled="state === 2"
- />
- </div>
- </HcCardItem>
- </el-aside>
- </el-container>
- </hc-new-card>
- </template>
- <script setup>
- import { onMounted, ref, watch } from 'vue'
- const props = defineProps({
- consolusionData: {
- type: Object,
- default: () => ({
- foreword:'',
- generalSituation:'',
- questionSuggest:'',
- adminCondition :'',
- }),
- },
- state:{
- type:[String, Number],
- default:1,
- },
-
- })
- //事件
- const emit = defineEmits(['change'])
- const consolusionData = ref(props.consolusionData)
- const state = ref(props.state)
- //监听
- watch(() => [
- props.consolusionData,
- props.state,
- ], ([datas, state1]) => {
- consolusionData.value = datas
- state.value = state1
- })
- watch(() => [
- consolusionData.value,
- ], ([datas]) => {
- emit('change', datas)
- }, {
- deep: true,
- })
- //渲染完成
- onMounted(() => {
- setSplitRef()
- // getConclusion()
- })
- //初始化设置拖动分割线
- const setSplitRef = () => {
- //配置参考: https://split.js.org/#/?direction=vertical&snapOffset=0
- setTimeout(() => {
- window.$split(['#hc_table_container', '#hc_table_aside'], {
- sizes: [50, 50],
- snapOffset: 0,
- minSize: [400, 600],
- })
- window.$split(['#hc_table_data', '#hc_table_score'], {
- direction: 'vertical',
- snapOffset: 0,
- minSize: 200,
- })
- }, 800)
- }
- </script>
- <style lang='scss' scoped>
- .header_box{
- width: 100%;
- height: 200px;
- }
- .hc-table-layout {
- position: relative;
- height: 100%;
- .hc-table-aside {
- position: relative;
- height: 100%;
- }
- .hc-table-container {
- position: relative;
- display: block;
- height: 100%;
- .hc-card-item-box {
- height: 50%;
- }
- }
- }
- </style>
- <style lang="scss">
- .inputbox.el-textarea{
- height: 100%;
- }
- .inputbox .el-textarea__inner{
- height: 100%;
- }
- </style>
|