@if (!isEdit) {
<nz-page-header nzTitle="发起报送流程">
  <nz-breadcrumb nz-page-header-breadcrumb>
    <nz-breadcrumb-item>申报流程</nz-breadcrumb-item>
    <nz-breadcrumb-item><a>创建流程</a></nz-breadcrumb-item>
  </nz-breadcrumb>
</nz-page-header>
}
<div
  class="content"
  id="process"
  [style.padding]="isEdit ? '0' : '0 24px 16px'"
>
  <div class="title">基本信息</div>
  <div class="fill-template">
    <div class="rows" nz-row>
      <div nz-col nzSpan="11">
        <nz-form-item class="row" style="margin-bottom: 6px">
          <nz-form-label
            class="label"
            [nzNoColon]="true"
            [nzSm]="18"
            [nzXs]="18"
            nzRequired
            >流程名称</nz-form-label
          >
          <nz-form-control
            class="val"
            nzErrorTip="请填写流程名称"
            style="width: 100%"
          >
            <nz-input-group>
              <input
                nz-input
                type="text"
                placeholder="请填写流程名称"
                disabled="true"
                [ngModel]="eduProcess?.get('name')"
                nzStatus=""
                maxlength="50"
              />
            </nz-input-group>
          </nz-form-control>
        </nz-form-item>
      </div>
      <div nz-col nzSpan="11">
        <nz-form-item class="row" style="margin-bottom: 6px">
          <nz-form-label
            class="label"
            [nzNoColon]="true"
            [nzSm]="18"
            [nzXs]="18"
            nzRequired
            >流程描述</nz-form-label
          >
          <nz-form-control
            class="val"
            nzErrorTip="请填写合集描述"
            style="width: 100%"
          >
            <nz-input-group>
              <input
                nz-input
                type="text"
                placeholder="请填流程描述"
                disabled="true"
                [ngModel]="eduProcess?.get('desc')"
                nzStatus=""
                maxlength="50"
              />
            </nz-input-group>
          </nz-form-control>
        </nz-form-item>
      </div>
    </div>
    <div class="rows" nz-row>
      <div nz-col nzSpan="11">
        <nz-form-item class="row" style="margin-bottom: 6px">
          <nz-form-label
            class="label"
            [nzNoColon]="true"
            [nzSm]="18"
            [nzXs]="18"
            nzRequired
            >流程唯一标识</nz-form-label
          >
          <nz-form-control
            class="val"
            nzErrorTip="请填写流程唯一标识"
            style="width: 100%"
          >
            <nz-input-group>
              <input
                nz-input
                type="text"
                placeholder="请填写流程唯一标识"
                disabled="true"
                [ngModel]="eduProcess?.get('code')"
                nzStatus=""
                maxlength="50"
              />
            </nz-input-group>
          </nz-form-control>
        </nz-form-item>
      </div>
      <div nz-col nzSpan="11">
        <nz-form-item class="row">
          <nz-form-label class="label" [nzNoColon]="true" nzRequired
            >流程所属类别</nz-form-label
          >
          <nz-input-group>
            <input
              nz-input
              type="text"
              placeholder="请填写流程唯一标识"
              disabled="true"
              [ngModel]="eduProcess?.get('branch')?.get('name')"
              nzStatus=""
              maxlength="50"
            />
          </nz-input-group>
        </nz-form-item>
      </div>
    </div>
    <div class="rows" nz-row>
      <div nz-col nzSpan="11">
        <nz-form-item class="row" style="margin-bottom: 6px">
          <nz-form-label
            class="label"
            [nzNoColon]="true"
            [nzSm]="18"
            [nzXs]="18"
            nzRequired
            >开始时间</nz-form-label
          >
          <div class="date">
            {{ eduProcess?.get("startDate") | date : "yyyy-MM-dd HH:MM" }}
          </div>
        </nz-form-item>
      </div>
      <div nz-col nzSpan="11">
        <nz-form-item class="row" style="margin-bottom: 6px">
          <nz-form-label
            class="label"
            [nzNoColon]="true"
            [nzSm]="18"
            [nzXs]="18"
            nzRequired
            >结束时间</nz-form-label
          >
          <div class="date">
            {{ eduProcess?.get("deadline") | date : "yyyy-MM-dd HH:MM" }}
          </div>
        </nz-form-item>
      </div>
    </div>
    <div class="rows" nz-row>
      <div nz-col nzSpan="11">
        <nz-form-item class="row" style="margin-bottom: 6px">
          <nz-form-label
            class="label"
            [nzNoColon]="true"
            [nzSm]="18"
            [nzXs]="18"
            nzRequired
            >推荐限额</nz-form-label
          >
          <nz-form-control
            class="val"
            nzErrorTip="请填写推荐限额"
            style="width: 100%"
          >
            <nz-input-group>
              <input
                nz-input
                type="text"
                placeholder="请填写流程唯一标识"
                disabled="true"
                [ngModel]="eduProcess?.get('num')"
                nzStatus=""
                maxlength="50"
              />
            </nz-input-group>
          </nz-form-control>
        </nz-form-item>
      </div>
      <div nz-col nzSpan="11"></div>
    </div>
  </div>
  @if (isEdit) {
  <div nz-row>
    <div nz-col nzSpan="24">
      <div class="title-row">
        <div>
          <div class="title">申报单位信息</div>
          <div class="tips">
            选择一个与流程相关联的申报单位部门节点，该单位部门节点下所有账号创建的教材均可提交至此流程接受评审
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="rows" nz-row>
    <div nz-col nzSpan="24">
      <div class="title-row">
        <div class="bar">申报单位</div>
      </div>
      <div class="fill-setp">
        @if (eduProcess?.get('department')?.id) {
        <nz-tag [nzBordered]="false" style="color: black" [nzColor]="'#efefef'"
          >“十四五”高等教育国家规划教材申报系统</nz-tag
        >
        /
        <nz-tag
          [nzBordered]="false"
          style="color: black"
          [nzColor]="'#efefef'"
          >{{ eduProcess?.get("branch")?.get("name") }}</nz-tag
        >
        /
        <nz-tag [nzBordered]="false" [nzColor]="'geekblue'">{{
          eduProcess?.get("department")?.get("name")
        }}</nz-tag>
        }@else { 待选择 }
      </div>
    </div>
  </div>
  <div class="rows" nz-row>
    <div nz-col nzSpan="24">
      <div class="title-row">
        <div class="bar">工作联系人</div>
      </div>
      <div class="table" #maxWidth>
        @if (eduProcess?.get('profileSubmitted')?.id) {
        <app-profile
          [idList]="[eduProcess?.get('profileSubmitted')?.id || '']"
          [maxWidth]="maxWidth"
          [disabled]="true"
          [hideBtn]="true"
        ></app-profile>
        } @else{
        <app-profile
          [idList]="['']"
          [maxWidth]="maxWidth"
          [disabled]="true"
          [hideBtn]="true"
          [depart]="eduProcess?.get('department')?.id"
        ></app-profile>
        }
      </div>
    </div>
  </div>
  }
</div>
