import Card from '@/components/Card';
import { useIncidentStore } from '@/store';
import { defineComponent, ref } from 'vue-demi';
// @ts-ignore
import IconStyle from '@/assets/icons/detail/direct1@2x.png';

const lists = [
  '生成处置方法',
  '组织应急队伍',
  '现场救援',
  '这里处置方案文字这里处置方案文字',
  '这里处置方案文字这里处置方案文字',
  '这里处置方案文字这里处置方案文字',
  '这里处置方案文字这里处置方案文字',
];

export default defineComponent({
  name: 'IncidentPlanCard',
  setup(props) {
    const store = useIncidentStore();

    const types = ref([]);

    return () => (
      <Card cardType="incident-plan">
        <div class="plan-container">
          {/* <el-checkbox-group v-model={types.value}> */}
          {store?.incidentDetail?.task?.map((t) => (
            <div class="plan-content">
              <div class="plan-title">
                <img src={IconStyle} />
                {t.taskName}
              </div>
              {/*<div class="plan-c">
                <div class="plan-comm">
                  <div class="pt">指挥：</div>
                  <div class="pc">
                    {t.taskPersonVos
                      ?.map((i) => (i.person ?? '') + (i.position ?? ''))
                      .join('、')}
                  </div>
                </div>
                <div class="plan-cmd">
                  <div class="pt">指令：</div>
                  <div class="pc">
                    {t.taskCommandVos?.map((i) => (
                      <div>{i.command}</div>
                    ))}
                  </div>
                </div>
              </div>*/}
            </div>
            // <el-checkbox disabled class="plan-item" label={t.taskName} />
          ))}
          {/* </el-checkbox-group> */}
        </div>
      </Card>
    );
  },
});
