texts

texts

<template>

            <button
              class="btn btn-blue-nb btn-ell dropdown-toggle bt1"
              type="button"
              data-toggle="dropdown"
            >

              {{ selectedModeTitle }}
            </button>

                {{ row.title }}

          <input
            v-model="pk"
            type="text"
            class="form-control"
            autofocus
            placeholder="номер"
            @keyup.enter="load()"
          >

            <button
              class="btn last btn-blue-nb nbr"
              type="button"
              style="margin-right: -1px"
              @click="load()"
            >Поиск</button>

        Результаты за
        <DateFieldNav
          :brn="false"
          :def="date"
          :val.sync="date"
          w="100px"
          light
        />

{{ direction.patient }}, {{ direction.card }}

            <div
              v-for="i in direction.iss"
              :key="`${i.title}_${i.saved}_${i.confirmed}`"
              class="research-row"
            >

                  {{ i.title }}

                  <IssStatus
                    :i="i"
                    short
                  />

            <template v-if="direction.amd !== 'not_need'">

                АМД: не отправлено

                АМД: отправлено ({{ direction.amd_number }})

                АМД: ошибка

                АМД: запланировано

            </template>

                Просмотр

                <a
                  v-if="direction.all_confirmed && stat_btn"
                  :href="`/forms/pdf?type=105.02&napr_id=[${direction.pk}]`"
                  target="_blank"
                >Статталон

                Печать
                Образец

            Нет данных

            Очередь за <input
              v-model="td"
              :readonly="location.loading"
              class="inline-form"
              required
              type="date"
            >

              <colgroup>
                <col width="38">
                <col>
                <col width="16">
              </colgroup>

                <tr
                  v-for="rl in location.data"
                  :key="`${rl.slot}_${rl.status && rl.status.direction}`"
                  v-tippy="{ placement: 'top', arrow: true, animation: 'fade' }"
                  :class="{
                    current:
                      rl.slot === slot.id ||
                      (data.ok && rl.status.direction && rl.status.direction === data.direction.pk && !slot.id),
                  }"
                  :title="statusTitles[rl.status.code] || 'Не обработано'"
                  @click="rl.status.code > 0 ? open_fill_slot(rl.status.direction) : open_slot(rl)"
                >
                  {{ rl.timeStart }}
                  {{ rl.patient }}

                    <span
                      class="slot"
                      :class="`slot-${rl.status.code}`"
                    >

                    загрузка...

                  нет данных на дату

 0 && (stat_btn || amd)"
          class="side-bottom"
          :class="{
            'side-bottom_all': stat_btn && amd,
            'side-bottom_stat': stat_btn && !amd,
            'side-bottom_amd': !stat_btn && amd,
          }"
        >
          <a
            v-if="stat_btn"
            class="btn btn-blue-nb"
            :href="`/forms/preview?type=105.01&date=${date_to_form}`"
            target="_blank"
          >печать статталонов
          отправить в амд

        {{ sidebarIsOpened ? 'закрыть поиск и результаты' : 'открыть поиск и результаты' }}

            Загруженное направление:

№{{ data.direction.pk }} от {{ data.direction.date }}

{{ data.patient.fio_age }}

            Услуга: {{ row.research.title }}

направление не загружено

              {{ data.has_monitoring ? 'Мониторинг' : 'Направление' }}
              №{{ data.direction.pk }}
              от
              {{ data.direction.date }}

              {{ data.hospital_title || data.patient.fio }}

              {{ data.patient.fio_age }}

              Диагноз:
              {{ data.direction.diagnos }}

              Источник финансирования: {{ data.direction.fin_source }}

              Карта:
              <a
                :href="`/ui/directions?card_pk=${data.patient.card_pk}&base_pk=${data.patient.base}`"
                target="_blank"
                class="a-under"
              >
                {{ data.patient.card }}

                Анамнез жизни

                загрузка...

{{ anamnesis_data.text || 'нет данных' }}

                Диспансерный учёт

                загрузка...

                    {{ rd.diagnos }} – {{ rd.date_start }} – {{ rd.illnes }}

                    нет активных записей

              <ScreeningButton
                v-if="data.card_internal && (data.has_doc_referral || data.has_paraclinic)"
                :card-pk="data.patient.card_pk"
                @openScreening="dreg = true"
              />

                Льготы пациента

                загрузка...

                    {{ rb.benefit }} – {{ rb.date_start }} – {{ rb.registration_basis }}

                    нет активных записей

              <a
                v-if="data.card_internal && data.has_doc_referral"
                v-tippy="{
                  placement: 'bottom',
                  arrow: true,
                  reactive: true,
                  theme: 'light bordered',
                  html: '#template-disp',
                  interactive: true,
                }"
                style="margin-left: 3px"
                href="#"
                :class="{ [`disp_${data.status_disp}`]: true }"
                @click.prevent
              >Д

                Диспансеризация

                  <li
                    v-for="d in data.disp_data"
                    :key="`${d[0]}_${d[5]}`"
                  >

                      требуется
                       пройдено

                      {{ d[5] }}

                   !d[2]).map((d) => d[0]),
                      )
                    "
                  >
                    Выбрать требуемые

                   d[2]))"
                  >
                    Печать всех результатов

              <MedicalCertificates
                :med_certificates="data.medical_certificates"
                :direction="data.direction.pk"
              />
              <RmisLink :is-schedule="false" />
              <ResultsByYear
                :card_pk="data.patient.card_pk"
                is-doc-referral
              />
              <ResultsByYear
                :card_pk="data.patient.card_pk"
                is-paraclinic
              />
              <ResultsByYear
                :card_pk="data.patient.card_pk"
                is-lab
              />
              <ResultControlParams
                :card_pk="data.patient.card_pk"
              />

              Лечащий врач:
              {{ data.patient.doc }}

              Организация: {{ data.patient.imported_org }}

            <button
              v-if="!embedded"
              type="button"
              class="close"
              @click="clear()"
            >
              ×
            </button>

              {{ row.research.title }}
               [{{ row.research.comment }}]
              <dropdown
                v-if="!data.has_microbiology && !data.has_monitoring && !embedded"
                :key="`dd-${row.pk}`"
                :visible="research_open_history === row.pk"
                :position="['left', 'bottom', 'left', 'top']"
                @clickout="hide_results"
              >
                 (другие результаты)

                      {{ rh.date }}
                      печать
                      скопировать

                      результатов не найдено

              </dropdown>

              <FileAdd
                v-if="row.research.enabled_add_files"
                :iss_pk="row.pk"
                :count_files="row.countFiles"
              />
              <template v-if="data.direction.all_confirmed && !data.has_monitoring && !data.has_expertise">
                <a
                  v-if="stat_btn"
                  :href="`/forms/pdf?type=105.02&napr_id=[${data.direction.pk}]`"
                  class="btn btn-blue-nb"
                  target="_blank"
                >Статталон
                Печать
              </template>
              <template v-if="!data.has_microbiology">

                <template v-if="!row.confirmed">
                  <button
                    v-if="!row.confirmed"
                    v-tippy
                    class="btn btn-blue-nb"
                    title="Печать образца"
                    @click="print_example(data.direction.pk)"
                  >
                    Образец
                  </button>
                  <button
                    v-if="!row.confirmed"
                    v-tippy
                    class="btn btn-blue-nb"
                    title="Сохранить без подтверждения"
                    @click="save(row)"
                  >

                  </button>
                  <button
                    v-if="!data.has_monitoring && !data.has_expertise"
                    v-tippy
                    class="btn btn-blue-nb"
                    title="Очистить протокол"
                    @click="clear_vals(row)"
                  >

                  </button>

                    <SelectPickerM
                      v-model="templates[row.pk]"
                      :search="true"
                      :options="row.templates.map((x) => ({ label: x.title, value: x.pk }))"
                    />

                  <button
                    v-if="fte && !data.has_monitoring && !data.has_expertise"
                    class="btn btn-blue-nb"
                    @click="load_template(row, templates[row.pk])"
                  >
                    Загрузить шаблон
                  </button>
                </template>
              </template>

          <DescriptiveForm
            :key="`df-${row.pk}`"
            :research="row.research"
            :confirmed="row.confirmed"
            :patient="data.patient"
            :change_mkb="change_mkb(row)"
            :pk="row.pk"
          />

 0) &&
                !data.has_monitoring &&
                !data.has_expertise
            "
            class="group"
          >

              Дополнительные услуги

                <ResearchesPicker
                  v-model="row.more"
                  :hidetemplates="true"
                  :readonly="row.confirmed"
                  :just_search="true"
                  :filter_types="[2, 7]"
                />

                <SelectedResearches
                  :researches="row.more"
                  :readonly="row.confirmed"
                  :simple="true"
                />

          <template v-if="data.has_microbiology">

                    Номер анализа

                    {{ row.tube.pk }}

                    Ёмкость

                    {{ row.tube.type }}, дата забора {{ row.tube.get }}
                    печать ш/к

            <BacMicroForm
              v-model="row.microbiology.bacteries"
              :confirmed="row.confirmed"
              :culture-comments-templates="row.microbiology.cultureCommentsTemplates"
            />

                Заключение

 0),
                    mouseleave: leave_field(row.microbiology.conclusionTemplates.length > 0),
                  }"
                >
                  <FastTemplates
                    :update_value="updateValue(row.microbiology, 'conclusion')"
                    :value="row.microbiology.conclusion || ''"
                    :values="row.microbiology.conclusionTemplates"
                    :confirmed="row.confirmed"
                  />

                    <textarea
                      v-model="row.microbiology.conclusion"
                      rows="5"
                      class="form-control"
                      :readonly="row.confirmed"
                    />

          </template>

              Рецепты

                  <RecipeInput
                    v-model="row.recipe"
                    :pk="row.pk"
                    :confirmed="row.confirmed"
                  />

              Направления в рамках приёма

                  <DirectionsHistory
                    :iss_pk="row.pk"
                    kk="cd"
                  />

                  <button
                    class="btn btn-primary-nb btn-blue-nb"
                    type="button"
                    @click="create_directions(row)"
                  >
                     создать направления
                  </button>

              Данные статталона

                  Цель посещения

                  <select
                    v-model="row.purpose"
                    :disabled="row.confirmed"
                  >
                    <option
                      v-for="o in row.purpose_list"
                      :key="o.pk"
                      :value="o.pk"
                    >
                      {{ o.title }}
                    </option>
                  </select>

                 Впервые

                  <input
                    id="first-time"
                    v-model="row.first_time"
                    type="checkbox"
                    :disabled="row.confirmed"
                  >

                  Результат обращения

                  <select
                    v-model="row.result"
                    :disabled="row.confirmed"
                  >
                    <option
                      v-for="o in row.result_list"
                      :key="o.pk"
                      :value="o.pk"
                    >
                      {{ o.title }}
                    </option>
                  </select>

                  Исход

                  <select
                    v-model="row.outcome"
                    :disabled="row.confirmed"
                  >
                    <option
                      v-for="o in row.outcome_list"
                      :key="o.pk"
                      :value="o.pk"
                    >
                      {{ o.title }}
                    </option>
                  </select>

                  Заключительный диагноз

                  <MKBField v-model="row.diagnos" />

                  <input
                    v-model="row.diagnos"
                    class="form-control"
                    :readonly="true"
                  >

                  Дата осмотра

                  <input
                    v-model="row.examination_date"
                    :max="tdm()"
                    :min="td_m_year"
                    :readonly="row.confirmed"
                    class="form-control"
                    required
                    style="width: 160px"
                    type="date"
                  >

                  Место оказания

                  <select
                    v-model="row.place"
                    :disabled="row.confirmed"
                  >
                    <option
                      v-for="o in row.place_list"
                      :key="o.pk"
                      :value="o.pk"
                    >
                      {{ o.title }}
                    </option>
                  </select>

                  Источник финансирования

                  <select
                    v-model="row.fin_source"
                    :disabled="row.confirmed"
                  >
                    <option
                      v-for="o in row.fin_source_list"
                      :key="o.pk"
                      :value="o.pk"
                    >
                      {{ o.title }}
                    </option>
                  </select>

                  Платная категоря

                  <select
                    v-model="row.price_category"
                    :disabled="row.confirmed"
                  >
                    <option
                      v-for="o in row.price_category_list"
                      :key="o.pk"
                      :value="o.pk"
                    >
                      {{ o.title }}
                    </option>
                  </select>

                 Подозрение на онко

                  <input
                    id="onco"
                    v-model="row.maybe_onco"
                    type="checkbox"
                    :disabled="row.confirmed"
                  >

              Главное направление

                  №{{ row.parentDirection.pk }}{{ row.parentDirection.pk }}

                  {{ row.parentDirection.service }}
                  <template v-if="row.parentDirection.is_hospital">

                  </template>

 0"
            class="group"
          >

              Дочерние направления

                  №{{ d.pk }}

                      {{ s }}

                 Подтверждение от имени

                  <Treeselect
                    v-model="row.work_by"
                    :multiple="false"
                    :disable-branch-nodes="true"
                    class="treeselect-wide"
                    :options="workFromUsers"
                    :append-to-body="true"
                    :clearable="true"
                    :z-index="5001"
                    placeholder="Не выбрано"
                  />

 0"
                    style="margin-top: 5px"
                  >

                         {{ p.label }} — {{ p.podr }}

                 Сохранено

                  {{ row.whoSaved }}

                 Подтверждено

                  {{ row.whoConfirmed }}

                 Оператор

                  {{ row.whoExecuted }}

                Со-исполнитель

                  <Treeselect
                    v-model="data.direction.coExecutor"
                    :multiple="false"
                    :disable-branch-nodes="true"
                    class="treeselect-wide"
                    :options="workFromUsers"
                    :append-to-body="true"
                    :clearable="true"
                    :z-index="5001"
                    placeholder="Не выбрано"
                    :disabled="!l2_decriptive_coexecutor || row.whoConfirmed"
                  />

                Дополнительный номер

                  {{ data.direction.additionalNumber }}

                Материал гистологии принят

                  {{ data.direction.timeGistologyReceive }}

              {{ row.research.title }}:

            <IssStatus :i="row" />
            <button
              v-if="!row.confirmed"
              class="btn btn-blue-nb"
              @click="save(row)"
            >
              Сохранить
            </button>
            <button
              v-if="!row.confirmed && can_confirm && !is_operator_protocol"
              class="btn btn-blue-nb"
              :disabled="!r(row) || needFillWorkBy(row)"
              @click="save_and_confirm(row)"
            >
              Сохранить и подтвердить
            </button>
            <button
              v-if="row.confirmed && row.allow_reset_confirm && can_confirm && !is_operator_protocol"
              class="btn btn-blue-nb"
              @click="reset_confirm(row)"
            >
              Сброс подтверждения
            </button>
            <template v-if="amd && data.researches.length === 1">

                АМД: запланировано

                АМД: ошибка

                АМД: не отправлено

                АМД: отправлено ({{ data.direction.amd_number }})

              <button
                v-if="can_reset_amd && data.direction.amd !== 'not_need' && data.direction.amd !== 'need'"
                class="btn btn-blue-nb"
                @click="reset_amd([data.direction.pk])"
              >
                Сброс статуса АМД
              </button>
              <button
                v-if="data.direction.amd === 'need' || data.direction.amd === 'error'"
                class="btn btn-blue-nb"
                @click="send_to_amd([data.direction.pk])"
              >
                Отправить в АМД
              </button>
            </template>
            <EDSDirection
              v-if="data.researches.length === 1"
              :key="`${data.direction.pk}_${row.confirmed}`"
              :direction-pk="data.direction.pk"
              :all_confirmed="data.direction.all_confirmed"
            />

                Не верно:

                {{ rl }};

                подтверждение от имени

 1 && data.direction.all_confirmed"
          class="control-row"
        >

            Услуг в направлении: {{ data.researches.length }} шт.

          <template v-if="amd">

              АМД: запланировано

              АМД: ошибка

              АМД: не отправлено

              АМД: отправлено ({{ data.direction.amd_number }})

            <button
              v-if="can_reset_amd && data.direction.amd !== 'not_need' && data.direction.amd !== 'need'"
              class="btn btn-blue-nb"
              @click="reset_amd([data.direction.pk])"
            >
              Сброс статуса АМД
            </button>
            <button
              v-if="data.direction.amd === 'need' || data.direction.amd === 'error'"
              class="btn btn-blue-nb"
              @click="send_to_amd([data.direction.pk])"
            >
              Отправить в АМД
            </button>
          </template>
          <EDSDirection
            :key="`${data.direction.pk}_${data.direction.all_confirmed}`"
            :direction-pk="data.direction.pk"
            :all_confirmed="data.direction.all_confirmed"
          />

            Дополнительные исследования

              <ResearchesPicker
                v-model="moreServices"
                :hidetemplates="true"
                :just_search="true"
                :types-only="[10000]"
                :filter_sub_types="additionalTypes"
                :filter_researches="data.researches.map((r) => r.research.pk)"
              />

              <SelectedResearches
                :researches="moreServices"
                :simple="true"
              />

            <button
              class="btn btn-primary-nb btn-blue-nb"
              type="button"
              :disabled="moreServices.length === 0"
              @click="add_services"
            >
              Добавить услуги в направление
            </button>

            Вы можете назначить дополнительные исследования только, если направление не подтверждено полностью.

    <Modal
      v-if="anamnesis_edit"
      ref="modalAnamnesisEdit"
      show-footer="true"
      white-bg="true"
      max-width="710px"
      width="100%"
      margin-left-right="auto"
      margin-top
      @close="hide_modal_anamnesis_edit"
    >
      Редактор анамнеза жизни – карта {{ data.patient.card }}, {{ data.patient.fio_age }}

        <textarea
          v-model="anamnesis_data.text"
          rows="14"
          class="form-control"
          placeholder="Анамнез жизни"
        />

            <button
              class="btn btn-primary-nb btn-blue-nb"
              type="button"
              @click="hide_modal_anamnesis_edit"
            >
              Отмена
            </button>

            <button
              class="btn btn-primary-nb btn-blue-nb"
              type="button"
              @click="save_anamnesis()"
            >
              Сохранить
            </button>

    </Modal>
    <Modal
      v-if="create_directions_for > -1"
      ref="modalCD"
      margin-top
      margin-left-right="auto"
      max-width="1400px"
      show-footer="true"
      white-bg="true"
      width="100%"
      @close="hide_modal_create_directions"
    >
      Создание направлений – карта {{ data.patient.card }}, {{ data.patient.fio_age }}

            <ResearchesPicker
              v-model="create_directions_data"
              kk="cd"
              style="border-top: 1px solid #eaeaea; border-bottom: 1px solid #eaeaea"
              :filter_types="[7]"
            />

            <SelectedResearches
              kk="cd"
              :base="bases_obj[data.patient.base]"
              :researches="create_directions_data"
              :main_diagnosis="create_directions_diagnosis"
              :valid="true"
              :card_pk="data.patient.card_pk"
              :initial_fin="data.direction.fin_source_id"
              :parent_iss="create_directions_for"
              :clear_after_gen="true"
              style="border-top: 1px solid #eaeaea; border-bottom: 1px solid #eaeaea"
            />

 0"
          style="margin-top: 5px; text-align: left"
        >

            <colgroup>
              <col width="180">
              <col>
              <col width="110">
              <col width="110">
            </colgroup>

              <LastResult
                v-for="p in create_directions_data"
                :key="p"
                :individual="data.patient.individual_pk"
                :no-scroll="true"
                :research="p"
              />

            <button
              class="btn btn-primary-nb btn-blue-nb"
              type="button"
              @click="hide_modal_create_directions"
            >
              Закрыть
            </button>

    </Modal>
    <Modal
      v-if="!!slot.id"
      ref="modalSlot"
      margin-top="50px"
      show-footer="true"
      white-bg="true"
      max-width="710px"
      width="100%"
      margin-left-right="auto"
      @close="close_slot"
    >
      Слот {{ slot.id }}

          загрузка...

            Талон № {{ slot.data.pk }}

{{ slot.data.datetime }}

          ЕЦП ID пациента:
          <a
            :href="`/ui/directions?rmis_uid=${slot.data.patient_uid}`"
            target="_blank"
          >{{ slot.data.patient_uid }}

            Нет связанного назначения. Выберите ниже:

            Выбранное назначение для талона:

            <ResearchPick
              v-for="row in userServicesFiltered"
              :key="row.pk"
              :class="{ active: row.pk === slot.data.direction_service }"
              :research="row"
              class="research-select"
              @click.native="select_research(row.pk)"
            />

              нет данных

            <button
              v-if="!slot.data.direction"
              :disabled="slot.data.direction_service === -1"
              class="btn btn-primary-nb btn-blue-nb"
              type="button"
              @click="fill_slot"
            >
              Сохранить назначение и заполнить протокол
            </button>
            <button
              v-else
              class="btn btn-primary-nb btn-blue-nb"
              type="button"
              @click="open_fill_slot(slot.data.direction)"
            >
              Перейти к протоколу
            </button>

            <button
              class="btn btn-primary-nb btn-blue-nb"
              type="button"
              @click="close_slot"
            >
              Закрыть
            </button>

    </Modal>
    <DReg
      v-if="dreg"
      :card_pk="data.patient.card_pk"
      :card_data="data.patient"
      :fin-id="data.direction.fin_source_id"
      :parent_iss="data.researches[0].pk"
    />
    <Benefit
      v-if="benefit"
      :card_pk="data.patient.card_pk"
      :card_data="data.patient"
      :readonly="true"
    />
    <ResultsViewer
      v-if="show_results_pk > -1"
      :pk="show_results_pk"
    />

</template>

<template>

            <button
              class="btn btn-blue-nb btn-ell dropdown-toggle bt1"
              type="button"
              data-toggle="dropdown"
            >

              {{ selectedModeTitle }}
            </button>

                {{ row.title }}

          <input
            v-model="pk"
            type="text"
            class="form-control"
            autofocus
            placeholder="номер"
            @keyup.enter="load()"
          >

            <button
              class="btn last btn-blue-nb nbr"
              type="button"
              style="margin-right: -1px"
              @click="load()"
            >Поиск</button>

        Результаты за
        <DateFieldNav
          :brn="false"
          :def="date"
          :val.sync="date"
          w="100px"
          light
        />

{{ direction.patient }}, {{ direction.card }}

            <div
              v-for="i in direction.iss"
              :key="`${i.title}_${i.saved}_${i.confirmed}`"
              class="research-row"
            >

                  {{ i.title }}

                  <IssStatus
                    :i="i"
                    short
                  />

            <template v-if="direction.amd !== 'not_need'">

                АМД: не отправлено

                АМД: отправлено ({{ direction.amd_number }})

                АМД: ошибка

                АМД: запланировано

            </template>

                Просмотр

                <a
                  v-if="direction.all_confirmed && stat_btn"
                  :href="`/forms/pdf?type=105.02&napr_id=[${direction.pk}]`"
                  target="_blank"
                >Статталон

                Печать
                Образец

            Нет данных

            Очередь за <input
              v-model="td"
              :readonly="location.loading"
              class="inline-form"
              required
              type="date"
            >

              <colgroup>
                <col width="38">
                <col>
                <col width="16">
              </colgroup>

                <tr
                  v-for="rl in location.data"
                  :key="`${rl.slot}_${rl.status && rl.status.direction}`"
                  v-tippy="{ placement: 'top', arrow: true, animation: 'fade' }"
                  :class="{
                    current:
                      rl.slot === slot.id ||
                      (data.ok && rl.status.direction && rl.status.direction === data.direction.pk && !slot.id),
                  }"
                  :title="statusTitles[rl.status.code] || 'Не обработано'"
                  @click="rl.status.code > 0 ? open_fill_slot(rl.status.direction) : open_slot(rl)"
                >
                  {{ rl.timeStart }}
                  {{ rl.patient }}

                    <span
                      class="slot"
                      :class="`slot-${rl.status.code}`"
                    >

                    загрузка...

                  нет данных на дату

 0 && (stat_btn || amd)"
          class="side-bottom"
          :class="{
            'side-bottom_all': stat_btn && amd,
            'side-bottom_stat': stat_btn && !amd,
            'side-bottom_amd': !stat_btn && amd,
          }"
        >
          <a
            v-if="stat_btn"
            class="btn btn-blue-nb"
            :href="`/forms/preview?type=105.01&date=${date_to_form}`"
            target="_blank"
          >печать статталонов
          отправить в амд

        {{ sidebarIsOpened ? 'закрыть поиск и результаты' : 'открыть поиск и результаты' }}

            Загруженное направление:

№{{ data.direction.pk }} от {{ data.direction.date }}

{{ data.patient.fio_age }}

            Услуга: {{ row.research.title }}

направление не загружено

              {{ data.has_monitoring ? 'Мониторинг' : 'Направление' }}
              №{{ data.direction.pk }}
              от
              {{ data.direction.date }}

              {{ data.hospital_title || data.patient.fio }}

              {{ data.patient.fio_age }}

              Диагноз:
              {{ data.direction.diagnos }}

              Источник финансирования: {{ data.direction.fin_source }}

              Карта:
              <a
                :href="`/ui/directions?card_pk=${data.patient.card_pk}&base_pk=${data.patient.base}`"
                target="_blank"
                class="a-under"
              >
                {{ data.patient.card }}

                Анамнез жизни

                загрузка...

{{ anamnesis_data.text || 'нет данных' }}

                Диспансерный учёт

                загрузка...

                    {{ rd.diagnos }} – {{ rd.date_start }} – {{ rd.illnes }}

                    нет активных записей

              <ScreeningButton
                v-if="data.card_internal && (data.has_doc_referral || data.has_paraclinic)"
                :card-pk="data.patient.card_pk"
                @openScreening="dreg = true"
              />

                Льготы пациента

                загрузка...

                    {{ rb.benefit }} – {{ rb.date_start }} – {{ rb.registration_basis }}

                    нет активных записей

              <a
                v-if="data.card_internal && data.has_doc_referral"
                v-tippy="{
                  placement: 'bottom',
                  arrow: true,
                  reactive: true,
                  theme: 'light bordered',
                  html: '#template-disp',
                  interactive: true,
                }"
                style="margin-left: 3px"
                href="#"
                :class="{ [`disp_${data.status_disp}`]: true }"
                @click.prevent
              >Д

                Диспансеризация

                  <li
                    v-for="d in data.disp_data"
                    :key="`${d[0]}_${d[5]}`"
                  >

                      требуется
                       пройдено

                      {{ d[5] }}

                   !d[2]).map((d) => d[0]),
                      )
                    "
                  >
                    Выбрать требуемые

                   d[2]))"
                  >
                    Печать всех результатов

              <MedicalCertificates
                :med_certificates="data.medical_certificates"
                :direction="data.direction.pk"
              />
              <RmisLink :is-schedule="false" />
              <ResultsByYear
                :card_pk="data.patient.card_pk"
                is-doc-referral
              />
              <ResultsByYear
                :card_pk="data.patient.card_pk"
                is-paraclinic
              />
              <ResultsByYear
                :card_pk="data.patient.card_pk"
                is-lab
              />
              <ResultControlParams
                :card_pk="data.patient.card_pk"
              />

              Лечащий врач:
              {{ data.patient.doc }}

              Организация: {{ data.patient.imported_org }}

            <button
              v-if="!embedded"
              type="button"
              class="close"
              @click="clear()"
            >
              ×
            </button>

              {{ row.research.title }}
               [{{ row.research.comment }}]
              <dropdown
                v-if="!data.has_microbiology && !data.has_monitoring && !embedded"
                :key="`dd-${row.pk}`"
                :visible="research_open_history === row.pk"
                :position="['left', 'bottom', 'left', 'top']"
                @clickout="hide_results"
              >
                 (другие результаты)

                      {{ rh.date }}
                      печать
                      скопировать

                      результатов не найдено

              </dropdown>

              <FileAdd
                v-if="row.research.enabled_add_files"
                :iss_pk="row.pk"
                :count_files="row.countFiles"
              />
              <template v-if="data.direction.all_confirmed && !data.has_monitoring && !data.has_expertise">
                <a
                  v-if="stat_btn"
                  :href="`/forms/pdf?type=105.02&napr_id=[${data.direction.pk}]`"
                  class="btn btn-blue-nb"
                  target="_blank"
                >Статталон
                Печать
              </template>
              <template v-if="!data.has_microbiology">

                <template v-if="!row.confirmed">
                  <button
                    v-if="!row.confirmed"
                    v-tippy
                    class="btn btn-blue-nb"
                    title="Печать образца"
                    @click="print_example(data.direction.pk)"
                  >
                    Образец
                  </button>
                  <button
                    v-if="!row.confirmed"
                    v-tippy
                    class="btn btn-blue-nb"
                    title="Сохранить без подтверждения"
                    @click="save(row)"
                  >

                  </button>
                  <button
                    v-if="!data.has_monitoring && !data.has_expertise"
                    v-tippy
                    class="btn btn-blue-nb"
                    title="Очистить протокол"
                    @click="clear_vals(row)"
                  >

                  </button>

                    <SelectPickerM
                      v-model="templates[row.pk]"
                      :search="true"
                      :options="row.templates.map((x) => ({ label: x.title, value: x.pk }))"
                    />

                  <button
                    v-if="fte && !data.has_monitoring && !data.has_expertise"
                    class="btn btn-blue-nb"
                    @click="load_template(row, templates[row.pk])"
                  >
                    Загрузить шаблон
                  </button>
                </template>
              </template>

          <DescriptiveForm
            :key="`df-${row.pk}`"
            :research="row.research"
            :confirmed="row.confirmed"
            :patient="data.patient"
            :change_mkb="change_mkb(row)"
            :pk="row.pk"
          />

 0) &&
                !data.has_monitoring &&
                !data.has_expertise
            "
            class="group"
          >

              Дополнительные услуги

                <ResearchesPicker
                  v-model="row.more"
                  :hidetemplates="true"
                  :readonly="row.confirmed"
                  :just_search="true"
                  :filter_types="[2, 7]"
                />

                <SelectedResearches
                  :researches="row.more"
                  :readonly="row.confirmed"
                  :simple="true"
                />

          <template v-if="data.has_microbiology">

                    Номер анализа

                    {{ row.tube.pk }}

                    Ёмкость

                    {{ row.tube.type }}, дата забора {{ row.tube.get }}
                    печать ш/к

            <BacMicroForm
              v-model="row.microbiology.bacteries"
              :confirmed="row.confirmed"
              :culture-comments-templates="row.microbiology.cultureCommentsTemplates"
            />

                Заключение

 0),
                    mouseleave: leave_field(row.microbiology.conclusionTemplates.length > 0),
                  }"
                >
                  <FastTemplates
                    :update_value="updateValue(row.microbiology, 'conclusion')"
                    :value="row.microbiology.conclusion || ''"
                    :values="row.microbiology.conclusionTemplates"
                    :confirmed="row.confirmed"
                  />

                    <textarea
                      v-model="row.microbiology.conclusion"
                      rows="5"
                      class="form-control"
                      :readonly="row.confirmed"
                    />

          </template>

              Рецепты

                  <RecipeInput
                    v-model="row.recipe"
                    :pk="row.pk"
                    :confirmed="row.confirmed"
                  />

              Направления в рамках приёма

                  <DirectionsHistory
                    :iss_pk="row.pk"
                    kk="cd"
                  />

                  <button
                    class="btn btn-primary-nb btn-blue-nb"
                    type="button"
                    @click="create_directions(row)"
                  >
                     создать направления
                  </button>

              Данные статталона

                  Цель посещения

                  <select
                    v-model="row.purpose"
                    :disabled="row.confirmed"
                  >
                    <option
                      v-for="o in row.purpose_list"
                      :key="o.pk"
                      :value="o.pk"
                    >
                      {{ o.title }}
                    </option>
                  </select>

                 Впервые

                  <input
                    id="first-time"
                    v-model="row.first_time"
                    type="checkbox"
                    :disabled="row.confirmed"
                  >

                  Результат обращения

                  <select
                    v-model="row.result"
                    :disabled="row.confirmed"
                  >
                    <option
                      v-for="o in row.result_list"
                      :key="o.pk"
                      :value="o.pk"
                    >
                      {{ o.title }}
                    </option>
                  </select>

                  Исход

                  <select
                    v-model="row.outcome"
                    :disabled="row.confirmed"
                  >
                    <option
                      v-for="o in row.outcome_list"
                      :key="o.pk"
                      :value="o.pk"
                    >
                      {{ o.title }}
                    </option>
                  </select>

                  Заключительный диагноз

                  <MKBField v-model="row.diagnos" />

                  <input
                    v-model="row.diagnos"
                    class="form-control"
                    :readonly="true"
                  >

                  Дата осмотра

                  <input
                    v-model="row.examination_date"
                    :max="tdm()"
                    :min="td_m_year"
                    :readonly="row.confirmed"
                    class="form-control"
                    required
                    style="width: 160px"
                    type="date"
                  >

                  Место оказания

                  <select
                    v-model="row.place"
                    :disabled="row.confirmed"
                  >
                    <option
                      v-for="o in row.place_list"
                      :key="o.pk"
                      :value="o.pk"
                    >
                      {{ o.title }}
                    </option>
                  </select>

                  Источник финансирования

                  <select
                    v-model="row.fin_source"
                    :disabled="row.confirmed"
                  >
                    <option
                      v-for="o in row.fin_source_list"
                      :key="o.pk"
                      :value="o.pk"
                    >
                      {{ o.title }}
                    </option>
                  </select>

                  Платная категоря

                  <select
                    v-model="row.price_category"
                    :disabled="row.confirmed"
                  >
                    <option
                      v-for="o in row.price_category_list"
                      :key="o.pk"
                      :value="o.pk"
                    >
                      {{ o.title }}
                    </option>
                  </select>

                 Подозрение на онко

                  <input
                    id="onco"
                    v-model="row.maybe_onco"
                    type="checkbox"
                    :disabled="row.confirmed"
                  >

              Главное направление

                  №{{ row.parentDirection.pk }}{{ row.parentDirection.pk }}

                  {{ row.parentDirection.service }}
                  <template v-if="row.parentDirection.is_hospital">

                  </template>

 0"
            class="group"
          >

              Дочерние направления

                  №{{ d.pk }}

                      {{ s }}

                 Подтверждение от имени

                  <Treeselect
                    v-model="row.work_by"
                    :multiple="false"
                    :disable-branch-nodes="true"
                    class="treeselect-wide"
                    :options="workFromUsers"
                    :append-to-body="true"
                    :clearable="true"
                    :z-index="5001"
                    placeholder="Не выбрано"
                  />

 0"
                    style="margin-top: 5px"
                  >

                         {{ p.label }} — {{ p.podr }}

                 Сохранено

                  {{ row.whoSaved }}

                 Подтверждено

                  {{ row.whoConfirmed }}

                 Оператор

                  {{ row.whoExecuted }}

                Со-исполнитель

                  <Treeselect
                    v-model="data.direction.coExecutor"
                    :multiple="false"
                    :disable-branch-nodes="true"
                    class="treeselect-wide"
                    :options="workFromUsers"
                    :append-to-body="true"
                    :clearable="true"
                    :z-index="5001"
                    placeholder="Не выбрано"
                    :disabled="!l2_decriptive_coexecutor || row.whoConfirmed"
                  />

                Дополнительный номер

                  {{ data.direction.additionalNumber }}

                Материал гистологии принят

                  {{ data.direction.timeGistologyReceive }}

              {{ row.research.title }}:

            <IssStatus :i="row" />
            <button
              v-if="!row.confirmed"
              class="btn btn-blue-nb"
              @click="save(row)"
            >
              Сохранить
            </button>
            <button
              v-if="!row.confirmed && can_confirm && !is_operator_protocol"
              class="btn btn-blue-nb"
              :disabled="!r(row) || needFillWorkBy(row)"
              @click="save_and_confirm(row)"
            >
              Сохранить и подтвердить
            </button>
            <button
              v-if="row.confirmed && row.allow_reset_confirm && can_confirm && !is_operator_protocol"
              class="btn btn-blue-nb"
              @click="reset_confirm(row)"
            >
              Сброс подтверждения
            </button>
            <template v-if="amd && data.researches.length === 1">

                АМД: запланировано

                АМД: ошибка

                АМД: не отправлено

                АМД: отправлено ({{ data.direction.amd_number }})

              <button
                v-if="can_reset_amd && data.direction.amd !== 'not_need' && data.direction.amd !== 'need'"
                class="btn btn-blue-nb"
                @click="reset_amd([data.direction.pk])"
              >
                Сброс статуса АМД
              </button>
              <button
                v-if="data.direction.amd === 'need' || data.direction.amd === 'error'"
                class="btn btn-blue-nb"
                @click="send_to_amd([data.direction.pk])"
              >
                Отправить в АМД
              </button>
            </template>
            <EDSDirection
              v-if="data.researches.length === 1"
              :key="`${data.direction.pk}_${row.confirmed}`"
              :direction-pk="data.direction.pk"
              :all_confirmed="data.direction.all_confirmed"
            />

                Не верно:

                {{ rl }};

                подтверждение от имени

 1 && data.direction.all_confirmed"
          class="control-row"
        >

            Услуг в направлении: {{ data.researches.length }} шт.

          <template v-if="amd">

              АМД: запланировано

              АМД: ошибка

              АМД: не отправлено

              АМД: отправлено ({{ data.direction.amd_number }})

            <button
              v-if="can_reset_amd && data.direction.amd !== 'not_need' && data.direction.amd !== 'need'"
              class="btn btn-blue-nb"
              @click="reset_amd([data.direction.pk])"
            >
              Сброс статуса АМД
            </button>
            <button
              v-if="data.direction.amd === 'need' || data.direction.amd === 'error'"
              class="btn btn-blue-nb"
              @click="send_to_amd([data.direction.pk])"
            >
              Отправить в АМД
            </button>
          </template>
          <EDSDirection
            :key="`${data.direction.pk}_${data.direction.all_confirmed}`"
            :direction-pk="data.direction.pk"
            :all_confirmed="data.direction.all_confirmed"
          />

            Дополнительные исследования

              <ResearchesPicker
                v-model="moreServices"
                :hidetemplates="true"
                :just_search="true"
                :types-only="[10000]"
                :filter_sub_types="additionalTypes"
                :filter_researches="data.researches.map((r) => r.research.pk)"
              />

              <SelectedResearches
                :researches="moreServices"
                :simple="true"
              />

            <button
              class="btn btn-primary-nb btn-blue-nb"
              type="button"
              :disabled="moreServices.length === 0"
              @click="add_services"
            >
              Добавить услуги в направление
            </button>

            Вы можете назначить дополнительные исследования только, если направление не подтверждено полностью.

    <Modal
      v-if="anamnesis_edit"
      ref="modalAnamnesisEdit"
      show-footer="true"
      white-bg="true"
      max-width="710px"
      width="100%"
      margin-left-right="auto"
      margin-top
      @close="hide_modal_anamnesis_edit"
    >
      Редактор анамнеза жизни – карта {{ data.patient.card }}, {{ data.patient.fio_age }}

        <textarea
          v-model="anamnesis_data.text"
          rows="14"
          class="form-control"
          placeholder="Анамнез жизни"
        />

            <button
              class="btn btn-primary-nb btn-blue-nb"
              type="button"
              @click="hide_modal_anamnesis_edit"
            >
              Отмена
            </button>

            <button
              class="btn btn-primary-nb btn-blue-nb"
              type="button"
              @click="save_anamnesis()"
            >
              Сохранить
            </button>

    </Modal>
    <Modal
      v-if="create_directions_for > -1"
      ref="modalCD"
      margin-top
      margin-left-right="auto"
      max-width="1400px"
      show-footer="true"
      white-bg="true"
      width="100%"
      @close="hide_modal_create_directions"
    >
      Создание направлений – карта {{ data.patient.card }}, {{ data.patient.fio_age }}

            <ResearchesPicker
              v-model="create_directions_data"
              kk="cd"
              style="border-top: 1px solid #eaeaea; border-bottom: 1px solid #eaeaea"
              :filter_types="[7]"
            />

            <SelectedResearches
              kk="cd"
              :base="bases_obj[data.patient.base]"
              :researches="create_directions_data"
              :main_diagnosis="create_directions_diagnosis"
              :valid="true"
              :card_pk="data.patient.card_pk"
              :initial_fin="data.direction.fin_source_id"
              :parent_iss="create_directions_for"
              :clear_after_gen="true"
              style="border-top: 1px solid #eaeaea; border-bottom: 1px solid #eaeaea"
            />

 0"
          style="margin-top: 5px; text-align: left"
        >

            <colgroup>
              <col width="180">
              <col>
              <col width="110">
              <col width="110">
            </colgroup>

              <LastResult
                v-for="p in create_directions_data"
                :key="p"
                :individual="data.patient.individual_pk"
                :no-scroll="true"
                :research="p"
              />

            <button
              class="btn btn-primary-nb btn-blue-nb"
              type="button"
              @click="hide_modal_create_directions"
            >
              Закрыть
            </button>

    </Modal>
    <Modal
      v-if="!!slot.id"
      ref="modalSlot"
      margin-top="50px"
      show-footer="true"
      white-bg="true"
      max-width="710px"
      width="100%"
      margin-left-right="auto"
      @close="close_slot"
    >
      Слот {{ slot.id }}

          загрузка...

            Талон № {{ slot.data.pk }}

{{ slot.data.datetime }}

          ЕЦП person_id пациента:
          <a
            :href="`/ui/directions?rmis_uid=${slot.data.patient_uid}`"
            target="_blank"
          >{{ slot.data.patient_uid }}

            Нет связанного назначения. Выберите ниже:

            Выбранное назначение для талона:

            <ResearchPick
              v-for="row in userServicesFiltered"
              :key="row.pk"
              :class="{ active: row.pk === slot.data.direction_service }"
              :research="row"
              class="research-select"
              @click.native="select_research(row.pk)"
            />

              нет данных

            <button
              v-if="!slot.data.direction"
              :disabled="slot.data.direction_service === -1"
              class="btn btn-primary-nb btn-blue-nb"
              type="button"
              @click="fill_slot"
            >
              Сохранить назначение и заполнить протокол
            </button>
            <button
              v-else
              class="btn btn-primary-nb btn-blue-nb"
              type="button"
              @click="open_fill_slot(slot.data.direction)"
            >
              Перейти к протоколу
            </button>

            <button
              class="btn btn-primary-nb btn-blue-nb"
              type="button"
              @click="close_slot"
            >
              Закрыть
            </button>

    </Modal>
    <DReg
      v-if="dreg"
      :card_pk="data.patient.card_pk"
      :card_data="data.patient"
      :fin-id="data.direction.fin_source_id"
      :parent_iss="data.researches[0].pk"
    />
    <Benefit
      v-if="benefit"
      :card_pk="data.patient.card_pk"
      :card_data="data.patient"
      :readonly="true"
    />
    <ResultsViewer
      v-if="show_results_pk > -1"
      :pk="show_results_pk"
    />

</template>


修复input双向绑定,type类型问题

修复input双向绑定,type类型问题

<template>
    <input v-if="!hasbefore && !hasafter" :type="type" :class="inpClasses" :placeholder="placeholder" :disabled="disabled" :value="content" @input="handleInput" autocomplete="off" @blur="blur"/>

            <slot name="before"></slot>

        <textarea v-if="type ==='textarea'" type="textarea" :class="inpClasses" :placeholder="placeholder" :disabled="disabled" v-model="content" @blur="blur">
        </textarea>
        <input v-else :type="type" :class="inpClasses" :placeholder="placeholder" :disabled="disabled" :value="content" @input="handleInput" autocomplete="off" @blur="blur"/>

            <slot name="after"></slot>

</template>

<template>
    <input v-if="type === 'text' && !hasbefore && !hasafter" type="text" :class="inpClasses" :placeholder="placeholder" :disabled="disabled" v-model="content" autocomplete="off" @blur="blur"/>

            <slot name="before"></slot>

        <textarea v-if="type ==='textarea'" type="textarea" :class="inpClasses" :placeholder="placeholder" :disabled="disabled" v-model="content" @blur="blur">
        </textarea>
        <input v-else type="text" :class="inpClasses" :placeholder="placeholder" :disabled="disabled" v-model="content" autocomplete="off" @blur="blur"/>

            <slot name="after"></slot>

</template>


feat: added options to WIP Calendar visualization

<template lang="pug">
div.mx-3
  b-form
    b-form-group(label="Bucket:")
      select(v-model="selectedBucket")
        option(v-for="bucket in buckets", :value="bucket.id") {{ bucket.id }}
    b-form-group(label="Show:")
      select(v-model="view")
        option(value="timeGridDay") Day
        option(value="timeGridWeek") Week
    b-form-group
      b-checkbox(v-model="fitToActive")
        | Fit to active
  FullCalendar(ref="fullCalendar", :options="calendarOptions")
</template>

<script>
import { getTitleAttr, getColorFromString } from '../util/color';
import moment from 'moment';
import _ from 'lodash';
import FullCalendar from '@fullcalendar/vue';
import timeGridPlugin from '@fullcalendar/timegrid';

// TODO: Use canonical timeline query, with flooding and categorization
// TODO: Checkbox for toggling category-view, where adjacent events with same category are merged and the events are labeled by category
// TODO: Use the recommended way of dynamically getting events: https://fullcalendar.io/docs/events-function
export default {
  components: {
    FullCalendar, // make the <FullCalendar> tag available
  },
  props: {
    buckets: { type: Array },
  },
  data() {
    return { fitToActive: false, selectedBucket: null, view: 'timeGridDay' };
  },
  computed: {
    calendarOptions: function () {
      const events = this.events;
      const first = _.minBy(events, e => e.start);
      const last = _.maxBy(events, e => e.end);
      // FIXME: end must be at least one slot (1 hour) after start, otherwise it fails hard
      let start, end;
      if (this.fitToActive && events.length > 0) {
        console.log(first.start);
        start = moment(first.start).startOf('hour').format().slice(11, 16);
        end = moment(last.end).endOf('hour').format().slice(11, 16);
      } else {
        start = '00:00:00';
        end = '24:00:00';
      }
      return {
        plugins: [timeGridPlugin],
        initialView: this.view,
        eventClick: this.onEventClick,
        events: events,
        allDaySlot: false,
        slotMinTime: start,
        slotMaxTime: end,
        nowIndicator: true,
        expandRows: true,
        slotLabelFormat: {
          hour: '2-digit',
          minute: '2-digit',
          //second: '2-digit',
          hour12: false,
        },
      };
    },
    events: function () {
      // NOTE: This returns FullCalendar events, not ActivityWatch events.
      if (this.buckets == null) return [];

      const bucket = _.find(this.buckets, b => b.id == this.selectedBucket);
      if (bucket == null) {
        return;
      }
      let events = bucket.events;
      events = _.filter(events, e => e.duration > 10);
      events = _.map(events, e => {
        return {
          title: getTitleAttr(bucket, e),
          start: moment(e.timestamp).format(),
          end: moment(e.timestamp).add(e.duration, 'seconds').format(),
          backgroundColor: getColorFromString(getTitleAttr(bucket, e)),
        };
      });
      return events;
    },
  },
  watch: {
    view: function (to) {
      const calendar = this.$refs.fullCalendar.getApi();
      calendar.changeView(to);
    },
  },
  methods: {
    onEventClick: function (arg) {
      // TODO: Open event inspector/editor here
      alert('event click! ' + JSON.stringify(arg.event));
    },
  },
};
</script>

<template>
  <FullCalendar :options="calendarOptions" />
</template>

<script>
import { getTitleAttr, getColorFromString } from '../util/color';
import moment from 'moment';
import FullCalendar from '@fullcalendar/vue';
import timeGridPlugin from '@fullcalendar/timegrid';

// TODO: Use canonical timeline query instead, with flooding and categorization
// TODO: Use the recommended way of dynamically getting events: https://fullcalendar.io/docs/events-function
export default {
  components: {
    FullCalendar, // make the <FullCalendar> tag available
  },
  props: {
    buckets: { type: Array },
  },
  data() {
    return { fitToActive: true };
  },
  computed: {
    calendarOptions: function() {
      const events = this.events;
      const first = _.minBy(events, e => e.start);
      const last = _.maxBy(events, e => e.end);
      // FIXME: end must be at least one slot (1 hour) after start, otherwise it fails hard
      const start = this.fitToActive && events.length > 0 ? first.start.slice(11, 16) : '00:00:00';
      const end = this.fitToActive && events.length > 0 ? last.end.slice(11, 16) : '24:00:00';
      return {
        plugins: [timeGridPlugin],
        initialView: 'timeGridDay',
        eventClick: this.onEventClick,
        events: events,
        allDaySlot: false,
        slotMinTime: start,
        slotMaxTime: end,
        nowIndicator: true,
        expandRows: true,
        slotLabelFormat: {
          hour: '2-digit',
          minute: '2-digit',
          //second: '2-digit',
          hour12: false,
        },
      };
    },
    events: function() {
      // NOTE: This returns FullCalendar events, not ActivityWatch events.
      if (this.buckets == null) return [];

      const bucket = _.find(this.buckets, b => b.id == 'aw-watcher-window_erb-main2-arch');
      let events = bucket.events;
      events = _.filter(events, e => e.duration > 10);
      events = _.map(events, e => {
        return {
          title: getTitleAttr(bucket, e),
          start: moment(e.timestamp).format(),
          end: moment(e.timestamp)
            .add(e.duration, 'seconds')
            .format(),
          backgroundColor: getColorFromString(getTitleAttr(bucket, e)),
        };
      });
      return events;
    },
  },
  methods: {
    onEventClick: function(arg) {
      // TODO: Open event inspector/editor here
      alert('event click! ' + JSON.stringify(arg.event));
    },
  },
};
</script>


sort notes (newest first)

sort notes (newest first)

<template>

Notes

          Save
          Cancel
          Note added.

            Are you sure you want to save this note?

                Save

                Cancel

            Your note is not saved. Are you sure you want to discard your changes?

                Cancel

                Discard

          No notes for this person.

          <div class="mt-3" v-for="(note, index) in sortedNotes" :key="`note ${index}`" :id="`person-note-${index}`">
              {{ note.author }} ({{ note.date | moment("MMMM Do YYYY [at] LT") }}):
              {{ note.note }}

</template>

<template>

Notes

          Save
          Cancel
          Note added.

            Are you sure you want to save this note?

                Save

                Cancel

            Your note is not saved. Are you sure you want to discard your changes?

                Cancel

                Discard

          No notes for this person.

          <div class="mt-3" v-for="(note, index) in currentDriller.notes" :key="`note ${index}`" :id="`person-note-${index}`">
              {{ note.author }} ({{ note.date | moment("MMMM Do YYYY [at] LT") }}):
              {{ note.note }}

</template>


fix(MdTooltip): `mdActive` never updated to true using `.sync` modifier

`mdActive` was never updated to true via `.sync` before

<template>
  <md-popover :md-settings="popperSettings" :md-active="shouldRender">
    <transition name="md-tooltip" v-if="shouldRender">
      <div class="md-tooltip" :class="[tooltipClasses, $mdActiveTheme]" :style="tooltipStyles">
        <slot />
      </div>
    </transition>
  </md-popover>
</template>

<script>
  import MdComponent from 'core/MdComponent'
  import MdPropValidator from 'core/utils/MdPropValidator'
  import MdPopover from 'components/MdPopover/MdPopover'

  export default new MdComponent({
    name: 'MdTooltip',
    components: {
      MdPopover
    },
    props: {
      mdActive: Boolean,
      mdDelay: {
        type: [String, Number],
        default: 0
      },
      mdDirection: {
        type: String,
        default: 'bottom',
        ...MdPropValidator('md-direction', ['top', 'right', 'bottom', 'left'])
      }
    },
    data: () => ({
      shouldRender: false,
      targetEl: null
    }),
    computed: {
      tooltipClasses () {
        return 'md-tooltip-' + this.mdDirection
      },
      tooltipStyles () {
        return `transition-delay: ${this.mdDelay}ms`
      },
      popperSettings () {
        return {
          placement: this.mdDirection,
          modifiers: {
            offset: {
              offset: '0, 16'
            }
          }
        }
      }
    },
    watch: {
      mdActive () {
        this.shouldRender = this.mdActive
      },
      shouldRender (shouldRender) {
        this.$emit('update:mdActive', shouldRender)
      }
    },
    methods: {
      show () {
        this.shouldRender = true
      },
      hide () {
        this.shouldRender = false
      }
    },
    async mounted () {
      await this.$nextTick()

      this.shouldRender = this.mdActive
      this.targetEl = this._vnode.componentInstance.originalParentEl

      if (this.targetEl) {
        this.targetEl.addEventListener('mouseenter', this.show, false)
        this.targetEl.addEventListener('mouseleave', this.hide, false)
      }
    },
    beforeDestroy () {
      if (this.targetEl) {
        this.targetEl.removeEventListener('mouseenter', this.show)
        this.targetEl.removeEventListener('mouseleave', this.hide)
      }
    }
  })
</script>

<style lang="scss">
  @import "~components/MdAnimation/variables";
  @import "~components/MdLayout/mixins";

  $md-tooltip-height: 22px;
  $md-tooltip-height-mobile: 32px;

  .md-tooltip {
    height: $md-tooltip-height;
    padding: 0 8px;
    position: fixed;
    z-index: 111;
    pointer-events: none;
    border-radius: 2px;
    transition: .15s $md-transition-enter-timing;
    transition-property: opacity, transform;
    will-change: opacity, transform, top, left !important;
    font-size: 10px;
    line-height: $md-tooltip-height;
    text-transform: none;
    white-space: nowrap;

    @include md-layout-small {
      height: $md-tooltip-height-mobile;
      font-size: 14px;
      line-height: $md-tooltip-height-mobile;
    }

    &.md-tooltip-leave-active {
      transition-timing-function: $md-transition-leave-timing;
    }

    &.md-tooltip-enter,
    &.md-tooltip-leave-active {
      opacity: 0;

      &.md-tooltip-top {
        transform: translate3d(0, 4px, 0) scale(.95);
      }

      &.md-tooltip-right {
        transform: translate3d(-4px, 0, 0) scale(.95);
      }

      &.md-tooltip-bottom {
        transform: translate3d(0, -4px, 0) scale(.95);
      }

      &.md-tooltip-left {
        transform: translate3d(4px, 0, 0) scale(.95);
      }
    }
  }
</style>

<template>
  <md-popover :md-settings="popperSettings" :md-active="shouldRender">
    <transition name="md-tooltip" v-if="shouldRender">
      <div class="md-tooltip" :class="[tooltipClasses, $mdActiveTheme]" :style="tooltipStyles">
        <slot />
      </div>
    </transition>
  </md-popover>
</template>

<script>
  import MdComponent from 'core/MdComponent'
  import MdPropValidator from 'core/utils/MdPropValidator'
  import MdPopover from 'components/MdPopover/MdPopover'

  export default new MdComponent({
    name: 'MdTooltip',
    components: {
      MdPopover
    },
    props: {
      mdActive: Boolean,
      mdDelay: {
        type: [String, Number],
        default: 0
      },
      mdDirection: {
        type: String,
        default: 'bottom',
        ...MdPropValidator('md-direction', ['top', 'right', 'bottom', 'left'])
      }
    },
    data: () => ({
      shouldRender: false,
      targetEl: null
    }),
    computed: {
      tooltipClasses () {
        return 'md-tooltip-' + this.mdDirection
      },
      tooltipStyles () {
        return `transition-delay: ${this.mdDelay}ms`
      },
      popperSettings () {
        return {
          placement: this.mdDirection,
          modifiers: {
            offset: {
              offset: '0, 16'
            }
          }
        }
      }
    },
    watch: {
      mdActive () {
        this.shouldRender = this.mdActive
      }
    },
    methods: {
      show () {
        this.shouldRender = true
      },
      hide () {
        this.$emit('update:mdActive', false)
        this.shouldRender = false
      }
    },
    async mounted () {
      await this.$nextTick()

      this.shouldRender = this.mdActive
      this.targetEl = this._vnode.componentInstance.originalParentEl

      if (this.targetEl) {
        this.targetEl.addEventListener('mouseenter', this.show, false)
        this.targetEl.addEventListener('mouseleave', this.hide, false)
      }
    },
    beforeDestroy () {
      if (this.targetEl) {
        this.targetEl.removeEventListener('mouseenter', this.show)
        this.targetEl.removeEventListener('mouseleave', this.hide)
      }
    }
  })
</script>

<style lang="scss">
  @import "~components/MdAnimation/variables";
  @import "~components/MdLayout/mixins";

  $md-tooltip-height: 22px;
  $md-tooltip-height-mobile: 32px;

  .md-tooltip {
    height: $md-tooltip-height;
    padding: 0 8px;
    position: fixed;
    z-index: 111;
    pointer-events: none;
    border-radius: 2px;
    transition: .15s $md-transition-enter-timing;
    transition-property: opacity, transform;
    will-change: opacity, transform, top, left !important;
    font-size: 10px;
    line-height: $md-tooltip-height;
    text-transform: none;
    white-space: nowrap;

    @include md-layout-small {
      height: $md-tooltip-height-mobile;
      font-size: 14px;
      line-height: $md-tooltip-height-mobile;
    }

    &.md-tooltip-leave-active {
      transition-timing-function: $md-transition-leave-timing;
    }

    &.md-tooltip-enter,
    &.md-tooltip-leave-active {
      opacity: 0;

      &.md-tooltip-top {
        transform: translate3d(0, 4px, 0) scale(.95);
      }

      &.md-tooltip-right {
        transform: translate3d(-4px, 0, 0) scale(.95);
      }

      &.md-tooltip-bottom {
        transform: translate3d(0, -4px, 0) scale(.95);
      }

      &.md-tooltip-left {
        transform: translate3d(4px, 0, 0) scale(.95);
      }
    }
  }
</style>


Do not allow to save an empty filter

Do not allow to save an empty filter

Search filter do not emit event if the filter string is empty.

<template>

    <search-icon></search-icon>

    <input
      ref="input"
      class="input search-input"
      type="text"
      :placeholder="placeholder"
      @input="onSearchChange"
      @keyup.enter="onSaveClicked"
      v-focus
    />

      x

    <button class="button" @click="onSaveClicked">
      <save-icon class="icon is-small only-icon"></save-icon>
    </button>

</template>


[#112] trigger build

[#112] trigger build

<template>

Alpha

{{ username }}

REPORTS

            <transition name="fade">

report.pdf

            </transition>

PREVIOUS CASES

            © 2017 Cyberjustice Laboratory

</template>


chart time type axis

chart time type axis

remp/remp#214

<template>

                <svg class="pl-circular" viewBox="25 25 50 50">
                    <circle class="plc-path" cx="50" cy="50" r="20" />
                </svg>

!

{{ title }}

            <canvas :id="name" :height="height"></canvas>

</template>


docs(DocMarkup): do not render anchor if no file present

<template>
  <v-card
    :id="id"
    :color="$vuetify.theme.dark ? undefined : 'grey darken-4'"
    class="v-markup"
    outlined
  >
    <prism
      v-if="$slots.default || code"
      :language="language"
      :code="code"
      :inline="inline"
    ><slot /></prism>

        <v-icon>mdi-pencil</v-icon>

      <v-icon
        title="Copy code"
        aria-label="Copy code"
        @click="copyMarkup"
      >
        mdi-content-copy
      </v-icon>

      <v-slide-x-transition>
        Copied
      </v-slide-x-transition>

  </v-card>
</template>


resolved the issue

resolved the issue

<template>

		<page-header></page-header>
		<top-bar>
 Examples
 </top-bar>
		<content-wrapper>

			UI Kit

			<breadcrumbs-navigation/>

			<address-info></address-info>
			<search-box></search-box>
			<tag-item>All</tag-item>
			<tag-item>Web design</tag-item>
			<tag-item>Logo design</tag-item>
			<tag-item>Photography</tag-item>
			<tag-item>Wordpress</tag-item>

			Open Sans

Duis dapibus aliquam mi, eget euismod sem scelerisque ut. Vivamus at elit quis urna adipiscing iaculis. Curabitur vitae velit in neque dictum blandit. Proin in iaculis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur vitae velit in neque dictum blandit. Proin in iaculis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.Duis dapibus aliquam mi, eget euismod sem scelerisque ut. Vivamus at elit quis urna adipiscing iaculis. Curabitur vitae velit in neque dictum blandit. Proin in iaculis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur vitae velit in neque dictum blandit. Proin in iaculis neque.Duis dapibus aliquam mi, eget euismod sem scelerisque ut. Vivamus at elit quis urna adipiscing iaculis. Curabitur vitae velit in neque dictum blandit. Proin in iaculis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur vitae velit in neque dictum blandit. Proin in iaculis neque.

			<LinkExternal></LinkExternal>

			</content-wrapper>
				<motivation-info></motivation-info>
			<content-wrapper>
			<expandable-box></expandable-box>

			<button-control></button-control>
			<tile-small>
				expandable-box
			</tile-small>
			<feedback-quote/>

			<tabs></tabs>

			<tile-small>

			</tile-small>

			<tile-medium></tile-medium>
			<tabs></tabs>

			<list-cross></list-cross>

			<list-arrow></list-arrow>

			<list-check></list-check>

			<list-unordered></list-unordered>

			<teaser-item> </teaser-item>

			<blog-side-bar></blog-side-bar>

			<data-table></data-table>

			<blog-post-header> </blog-post-header>

Feature List

			<feature-list>

			</feature-list>

BLOG POST

			<blog-post/>
			<form-feedback />

Google Map

			<map-google> </map-google>

		</content-wrapper>

		<page-footer></page-footer>

</template>


Update Menu

Update Menu

<template>
<menu
  :theme="theme"
  :mode="mode"
  :selected-keys="selectedKeys"
  :default-selected-keys="defaultSelectedKeys"
  :open-keys="openKeys"
  :default-open-keys="defaultOpenKeys"
  :style="style"
  :on-click="_handleClick"
  :on-open="_handleOpenKeys"
  :on-close="_handleCloseKeys"
  :on-select="onSelect"
  :on-deselect="onDeselect"
  :class-name="className + ' ' + prefixCls + '-' + theme">
  <slot></slot>
</menu>
</template>

<script>
import { defaultProps, oneOf } from '../../utils'
import Menu from '../base/menu'

export default {
  props: defaultProps({
    theme: oneOf(['light', 'dark'], 'light'),
    mode: oneOf(['vertical', 'horizontal', 'inline'], 'vertical'),
    selectedKeys: Array,
    defaultSelectedKeys: Array,
    openKeys: Array,
    defaultOpenKeys: Array,
    style: Object,
    onClick () {},
    onSelect () {},
    onDeselect () {}
  }),

  components: { Menu },

  methods: {
    _handleClick (e) {
      this.openKeys = []
      this.onClick()
    },

    _handleOpenKeys (e) {
      this.openKeys = e.openKeys
      this.onOpen()
    },

    _handleCloseKeys (e) {
      this.openKeys = e.openKeys
      this.onClose()
    }
  }
}
</script>

<template>

</template>

<script>

</script>


给商品增加新手引导

给商品增加新手引导

<template>

    <template slot="footer">

        关闭

    </template>

                          <v-nodes :vnodes="menu" />

 e.preventDefault()" @click="addUnit"> 新增计量单位

                          {{ item.name }}

                      多单位

                    有
                    无

                    有
                    无

                        {{ item.name }}

                        {{ item.name }}

                        {{ item.name }}

                        {{ item.name }}

                        {{ item.name }}

              <j-editable-table
                ref="editableMeTable"
                :loading="meTable.loading"
                :columns="meTable.columns"
                :dataSource="meTable.dataSource"
                :minWidth="1000"
                :maxHeight="300"
                :rowNumber="true"
                :rowSelection="true"
                :actionButton="true"
                @added="onAdded">
                <template #buttonAfter>
                  采购价-批量
                  零售价-批量
                  销售价-批量
                  最低售价-批量
                </template>
              </j-editable-table>

              <batch-set-price-modal ref="modalForm" @ok="batchSetPricemodalFormOk"></batch-set-price-modal>

            <j-editable-table
              ref="editableDepotTable"
              :loading="depotTable.loading"
              :columns="depotTable.columns"
              :dataSource="depotTable.dataSource"
              :minWidth="1000"
              :maxHeight="300"
              :rowNumber="true"
              :rowSelection="false"
              :actionButton="false"/>

                  <j-image-upload v-model="fileList" bizPath="material" text="上传" isMultiple></j-image-upload>

    <unit-modal ref="unitModalForm" @ok="unitModalFormOk"></unit-modal>

</template>


Доработки микробиологии

Доработки микробиологии

<template>
  <fragment>
    <select v-model="num" class="form-control" style="z-index: 0">
      <option value="0">0</option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
      <option value="8">8</option>
      <option value="9">9</option>
    </select>

       × 10^

    <select v-model="power" class="form-control" style="z-index: 0">
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
      <option value="8">8</option>
      <option value="9">9</option>
      <option value="11">11</option>
      <option value="12">12</option>
      <option value="13">13</option>
      <option value="14">14</option>
      <option value="15">15</option>
    </select>

      ({{num}} × 10{{power}})

  </fragment>
</template>


Add specifications

Add specifications

<template>

        <router-link :to="{ name: 'category', params: { slug: product.categories[0][0].slug }}">
          {{ product.categories[0][0].name }}
        </router-link>
        > {{ product.product_name }}

{{ product.product_name }}

 {{ product.price }} € s DPH

 {{ priceNoTax }} € bez DPH

                    <el-input-number v-model="amount" :min="1" :max="50"></el-input-number>
                    <el-button class="add-button" @click.stop="addToCart">Přidat do košíka</el-button>

 0"> V košíku: {{ inCart }} ks

        {{ product.long_description }}

          <template slot="HEAD_name" slot-scope="data">
            Název
          </template>
          <template slot="HEAD_value" slot-scope="data">
            Hodnota
          </template>

</template>

<template>

        <router-link :to="{ name: 'category', params: { slug: product.categories[0][0].slug }}">
          {{ product.categories[0][0].name }}
        </router-link>
        > {{ product.product_name }}

{{ product.product_name }}

 {{ product.price }} € s DPH

 {{ priceNoTax }} € bez DPH

                    <el-input-number v-model="amount" :min="1" :max="50"></el-input-number>
                    <el-button class="add-button" @click.stop="addToCart">Přidat do košíka</el-button>

 0"> V košíku: {{ inCart }} ks

        {{ product.long_description }}

</template>


Delete useless code

Delete useless code

<template>

    <Form ref="loginForm" autoComplete="on" :model="loginForm" :rules="loginRules"  class="card-box login-form">
        <Form-item prop="email">
            <Input type="text" v-model="loginForm.email" placeholder="Username" autoComplete="on">
                <Icon type="ios-person-outline" slot="prepend" ></Icon>
            </Input>
        </Form-item>
        <Form-item prop="password">
            <Input type="password" v-model="loginForm.password" placeholder="Password" @keyup.enter.native="handleLogin">
                <Icon type="ios-locked-outline" slot="prepend"></Icon>
            </Input>
        </Form-item>
        <Form-item>
            <Button type="primary" @click="handleLogin('loginForm')" long>登录</Button>
        </Form-item>

admin账号为:admin@wz.com 密码123456

editor账号:editor@wz.com 密码123456

           </Form>

</template>


docs(Sponsors): improve styling

docs(Sponsors): improve styling

<template>
  <v-sheet
    v-if="sponsors.length"
    id="home-sponsors"
    class="mx-auto pa-3"
    color="transparent"
    max-width="700"
  >
    <v-responsive
      class="mb-12"
      min-height="500"
    >
      <v-row
        dense
        justify="center"
      >
        <v-col
          v-for="sponsor in sponsors"
          :key="sponsor.slug"
          class="d-flex align-center"
          cols="auto"
          md="3"
        >
          <sponsor
            :comfortable="comfortable || Number(sponsor.metadata.tier) === 2"
            :compact="compact || Number(sponsor.metadata.tier) > 2"
            :sponsor="sponsor"
            v-bind="$attrs"
          />
        </v-col>
      </v-row>
    </v-responsive>

    <sponsor-link large />
  </v-sheet>
</template>

<script>
  // Mixins
  import Density from '@/mixins/density'

  // Utilities
  import { get } from 'vuex-pathify'

  export default {
    name: 'HomeSponsors',

    mixins: [Density],

    computed: {
      byTier: get('sponsors/byTier'),
      sponsors () {
        return Object.values(this.byTier)
          .reduce((tiers, tier) => tiers.concat(tier), [])
      },
    },
  }
</script>

<style lang="sass">
  #home-sponsors
    .v-sponsors
      justify-content: space-between
</style>

<template>
  <v-sheet
    v-if="sponsors.length"
    id="home-sponsors"
    class="mx-auto pa-3"
    max-width="700"
  >
    <v-responsive min-height="500">
      <v-row
        dense
        justify="center"
      >
        <v-col
          v-for="sponsor in sponsors"
          :key="sponsor.slug"
          cols="auto"
          md="3"
        >
          <sponsor
            :comfortable="comfortable || Number(sponsor.metadata.tier) === 2"
            :compact="compact || Number(sponsor.metadata.tier) > 2"
            :sponsor="sponsor"
            v-bind="$attrs"
          />
        </v-col>
      </v-row>
    </v-responsive>

    <sponsor-link large />
  </v-sheet>
</template>

<script>
  // Mixins
  import Density from '@/mixins/density'

  // Utilities
  import { get } from 'vuex-pathify'

  export default {
    name: 'HomeSponsors',

    mixins: [Density],

    computed: {
      byTier: get('sponsors/byTier'),
      sponsors () {
        return Object.values(this.byTier)
          .reduce((tiers, tier) => tiers.concat(tier), [])
      },
    },
  }
</script>

<style lang="sass">
  #home-sponsors
    .v-sponsors
      justify-content: space-between
</style>


滑动不流畅

滑动不流畅


More events for game play

More events for game play

<template>

{{game.time_played | moment("MMM Do, YY - HH:mm:ss")}}

            <span :class="`player color-${sortedPlayers[0].index + 1}`" v-if="sortedPlayers.length">{{sortedPlayers[0].name}}
            defeats
            <span :class="`player color-${sortedPlayers[1].index + 1}`" v-if="sortedPlayers.length">{{sortedPlayers[1].name}}
             2">+{{sortedPlayers.length - 2}}

            <span :class="`player color-${sortedPlayers[0].index + 1}`" v-if="sortedPlayers.length">{{sortedPlayers[0].name}}
            defeats
            <span :class="`player color-${player.index + 1}`" v-for="(player, index) in sortedPlayers" v-if="index > 0" :key="index">

              {{player.name}}

0

<vue-slider v-model="frame" v-bind="sliderOptions" @callback="changeFrame"></vue-slider>

{{sliderOptions.max}}

              <button class="btn">
                SHARE
              </button>

              Player stats

              Game/Map Stats

              <PlayerStatsPane :replay="replay" :statistics="statistics"></PlayerStatsPane>

                    Map Size:
                    {{`${replay.width}x${replay.height}`}}

                    Map Paremeters:
                    {{replay.map_generator}}

                    Seed:
                    {{replay.seed}}

                    Replay Version:
                    {{replay.version}}

player details

            <PlayerDetailPane :replay="replay" :statistics="statistics" :stats="stats" :frame="frame"></PlayerDetailPane>

map object properties

              <SelectedPlanet :selected-planet="selectedPlanet" :players="players"></SelectedPlanet>

              <SelectedShip :selected-ship="selectedShip" :players="players"></SelectedShip>

              <SelectedPoint :selected-point="selectedPoint"></SelectedPoint>

Click on a ship, planet, or other map location to see properties

post game dashboard

                    <img :src="`https://github.com/${_player.name}.png`">

                    <span class="dot bg-1" :class="`bg-${_pIndex + 1}`">

{{_player.name}}

Bot version:

Local bot

V{{_player.version}}

                  Territory Gained

                <PlayerLineChart :chart-data="chartData.production" :index="frame" :showChart="showChart" @updateIndex="index => {frame = index}"/>

                    rate of production

                  <PlayerLineChart :chart-data="chartData.production" :index="frame" :showChart="showChart" @updateIndex="index => {frame = index}" />

                    health

                  <PlayerLineChart :chart-data="chartData.health" :index="frame" :showChart="showChart" @updateIndex="index => {frame = index}" />

                    damage dealt

                  <PlayerLineChart :chart-data="chartData.damage" :index="frame" :showChart="showChart" @updateIndex="index => {frame = index}" />

                    attack over time

                  <PlayerLineChart :chart-data="chartData.attack" :index="frame" :showChart="showChart" @updateIndex="index => {frame = index}" />

</template>


MouseOver event fix

MouseOver event fix

<template>

                <slot></slot>

                <button @click="setSlide(n - 1)">{{n}}</button>

        <button v-if="settings.arrows && !settings.unagile" class="agile__arrow agile__arrow--prev"
                :disabled="currentSlide === 0 && !settings.infinite" @click="prevSlide" v-html="settings.prevArrow">
        </button>
        <button v-if="settings.arrows && !settings.unagile" class="agile__arrow agile__arrow--next"
                :disabled="currentSlide === slidesCount - 1 && !settings.infinite" @click="nextSlide"
                v-html="settings.nextArrow">
        </button>

</template>


fix #5854

fix #5854

<template>
<div class="zdjebgpv" :class="{ detail }" ref="thumbnail" :style="`background-color: ${ background }`">
	<img
		:src="file.url"
		:alt="file.name"
		:title="file.name"
		@load="onThumbnailLoaded"
		v-if="detail && is === 'image'"/>
	<video
		:src="file.url"
		ref="volumectrl"
		preload="metadata"
		controls
		v-else-if="detail && is === 'video'"/>
	<img :src="file.thumbnailUrl" alt="" @load="onThumbnailLoaded" :style="`object-fit: ${ fit }`" v-else-if="isThumbnailAvailable"/>
	<fa :icon="faFileImage" class="icon" v-else-if="is === 'image'"/>
	<fa :icon="faFileVideo" class="icon" v-else-if="is === 'video'"/>

	<audio
		:src="file.url"
		ref="volumectrl"
		preload="metadata"
		controls
		v-else-if="detail && is === 'audio'"/>
	<fa :icon="faMusic" class="icon" v-else-if="is === 'audio' || is === 'midi'"/>

	<fa :icon="faFileCsv" class="icon" v-else-if="is === 'csv'"/>
	<fa :icon="faFilePdf" class="icon" v-else-if="is === 'pdf'"/>
	<fa :icon="faFileAlt" class="icon" v-else-if="is === 'textfile'"/>
	<fa :icon="faFileArchive" class="icon" v-else-if="is === 'archive'"/>
	<fa :icon="faFile" class="icon" v-else/>

	<fa :icon="faFilm" class="icon-sub" v-if="!detail && isThumbnailAvailable && is === 'video'"/>
</div>
</template>

<script lang="ts">
import Vue from 'vue';
import {
	faFile,
	faFileAlt,
	faFileImage,
	faMusic,
	faFileVideo,
	faFileCsv,
	faFilePdf,
	faFileArchive,
	faFilm
	} from '@fortawesome/free-solid-svg-icons';

export default Vue.extend({
	props: {
		file: {
			type: Object,
			required: true
		},
		fit: {
			type: String,
			required: false,
			default: 'cover'
		},
		detail: {
			type: Boolean,
			required: false,
			default: false
		}
	},
	data() {
		return {
			isContextmenuShowing: false,
			isDragging: false,

			faFile,
			faFileAlt,
			faFileImage,
			faMusic,
			faFileVideo,
			faFileCsv,
			faFilePdf,
			faFileArchive,
			faFilm
		};
	},
	computed: {
		is(): 'image' | 'video' | 'midi' | 'audio' | 'csv' | 'pdf' | 'textfile' | 'archive' | 'unknown' {
			if (this.file.type.startsWith('image/')) return 'image';
			if (this.file.type.startsWith('video/')) return 'video';
			if (this.file.type === 'audio/midi') return 'midi';
			if (this.file.type.startsWith('audio/')) return 'audio';
			if (this.file.type.endsWith('/csv')) return 'csv';
			if (this.file.type.endsWith('/pdf')) return 'pdf';
			if (this.file.type.startsWith('text/')) return 'textfile';
			if ([
					"application/zip",
					"application/x-cpio",
					"application/x-bzip",
					"application/x-bzip2",
					"application/java-archive",
					"application/x-rar-compressed",
					"application/x-tar",
					"application/gzip",
					"application/x-7z-compressed"
				].some(e => e === this.file.type)) return 'archive';
			return 'unknown';
		},
		isThumbnailAvailable(): boolean {
			return this.file.thumbnailUrl
				? (this.is === 'image' || this.is === 'video')
				: false;
		},
		background(): string {
			return this.file.properties.avgColor || 'transparent';
		}
	},
	mounted() {
		const audioTag = this.$refs.volumectrl as HTMLAudioElement;
		if (audioTag) audioTag.volume = this.$store.state.device.mediaVolume;
	},
	methods: {
		onThumbnailLoaded() {
			if (this.file.properties.avgColor) {
				this.$refs.thumbnail.style.backgroundColor = 'transparent';
			}
		},
		volumechange() {
			const audioTag = this.$refs.volumectrl as HTMLAudioElement;
			this.$store.commit('device/set', { key: 'mediaVolume', value: audioTag.volume });
		}
	}
});
</script>

<style lang="scss" scoped>
.zdjebgpv {
	display: flex;
	position: relative;

	> img,
	> .icon {
		pointer-events: none;
	}

	> .icon-sub {
		position: absolute;
		width: 30%;
		height: auto;
		margin: 0;
		right: 4%;
		bottom: 4%;
	}

	> * {
		margin: auto;
	}

	&:not(.detail) {
		> img {
			height: 100%;
			width: 100%;
			object-fit: cover;
		}

		> .icon {
			height: 65%;
			width: 65%;
		}

		> video,
		> audio {
			width: 100%;
		}
	}

	&.detail {
		> .icon {
			height: 100px;
			width: 100px;
			margin: 16px;
		}

		> *:not(.icon) {
			max-height: 300px;
			max-width: 100%;
			height: 100%;
			object-fit: contain;
		}
	}
}
</style>

<template>
<div class="zdjebgpv" :class="{ detail }" ref="thumbnail" :style="`background-color: ${ background }`">
	<img
		:src="file.url"
		:alt="file.name"
		:title="file.name"
		@load="onThumbnailLoaded"
		v-if="detail && is === 'image'"/>
	<video
		:src="file.url"
		ref="volumectrl"
		preload="metadata"
		controls
		v-else-if="detail && is === 'video'"/>
	<img :src="file.thumbnailUrl" alt="" @load="onThumbnailLoaded" :style="`object-fit: ${ fit }`" v-else-if="isThumbnailAvailable"/>
	<fa :icon="faFileImage" class="icon" v-else-if="is === 'image'"/>
	<fa :icon="faFileVideo" class="icon" v-else-if="is === 'video'"/>

	<audio
		:src="file.url"
		ref="volumectrl"
		preload="metadata"
		controls
		v-else-if="detail && is === 'audio'"/>
	<fa :icon="faMusic" class="icon" v-else-if="is === 'audio' || is === 'midi'"/>

	<fa :icon="faFileCsv" class="icon" v-else-if="is === 'csv'"/>
	<fa :icon="faFilePdf" class="icon" v-else-if="is === 'pdf'"/>
	<fa :icon="faFileAlt" class="icon" v-else-if="is === 'textfile'"/>
	<fa :icon="faFileArchive" class="icon" v-else-if="is === 'archive'"/>
	<fa :icon="faFile" class="icon" v-else/>

	<fa :icon="faFilm" class="icon-sub" v-if="!detail && isThumbnailAvailable && is === 'video'"/>
</div>
</template>

<script lang="ts">
import Vue from 'vue';
import {
	faFile,
	faFileAlt,
	faFileImage,
	faMusic,
	faFileVideo,
	faFileCsv,
	faFilePdf,
	faFileArchive,
	faFilm
	} from '@fortawesome/free-solid-svg-icons';

export default Vue.extend({
	props: {
		file: {
			type: Object,
			required: true
		},
		fit: {
			type: String,
			required: false,
			default: 'cover'
		},
		detail: {
			type: Boolean,
			required: false,
			default: false
		}
	},
	data() {
		return {
			isContextmenuShowing: false,
			isDragging: false,

			faFile,
			faFileAlt,
			faFileImage,
			faMusic,
			faFileVideo,
			faFileCsv,
			faFilePdf,
			faFileArchive,
			faFilm
		};
	},
	computed: {
		is(): 'image' | 'video' | 'midi' | 'audio' | 'csv' | 'pdf' | 'textfile' | 'archive' | 'unknown' {
			if (this.file.type.startsWith('image/')) return 'image';
			if (this.file.type.startsWith('video/')) return 'video';
			if (this.file.type === 'audio/midi') return 'midi';
			if (this.file.type.startsWith('audio/')) return 'audio';
			if (this.file.type.endsWith('/csv')) return 'csv';
			if (this.file.type.endsWith('/pdf')) return 'pdf';
			if (this.file.type.startsWith('text/')) return 'textfile';
			if ([
					"application/zip",
					"application/x-cpio",
					"application/x-bzip",
					"application/x-bzip2",
					"application/java-archive",
					"application/x-rar-compressed",
					"application/x-tar",
					"application/gzip",
					"application/x-7z-compressed"
				].some(e => e === this.file.type)) return 'archive';
			return 'unknown';
		},
		isThumbnailAvailable(): boolean {
			return this.file.thumbnailUrl
				? (this.is === 'image' || this.is === 'video')
				: false;
		},
		background(): string {
			return this.file.properties.avgColor || 'transparent';
		}
	},
	mounted() {
		const audioTag = this.$refs.volumectrl as HTMLAudioElement;
		if (audioTag) audioTag.volume = this.$store.state.device.mediaVolume;
	},
	methods: {
		onThumbnailLoaded() {
			if (this.file.properties.avgColor) {
				this.$refs.thumbnail.style.backgroundColor = 'transparent';
			}
		},
		volumechange() {
			const audioTag = this.$refs.volumectrl as HTMLAudioElement;
			this.$store.commit('device/set', { key: 'mediaVolume', value: audioTag.volume });
		}
	}
});
</script>

<style lang="scss" scoped>
.zdjebgpv {
	display: flex;

	> img,
	> .icon {
		pointer-events: none;
	}

	> .icon-sub {
		position: absolute;
		width: 30%;
		height: auto;
		margin: 0;
		right: 4%;
		bottom: 4%;
	}

	> * {
		margin: auto;
	}

	&:not(.detail) {
		> img {
			height: 100%;
			width: 100%;
			object-fit: cover;
		}

		> .icon {
			height: 65%;
			width: 65%;
		}

		> video,
		> audio {
			width: 100%;
		}
	}

	&.detail {
		> .icon {
			height: 100px;
			width: 100px;
			margin: 16px;
		}

		> *:not(.icon) {
			max-height: 300px;
			max-width: 100%;
			height: 100%;
			object-fit: contain;
		}
	}
}
</style>


stickies as object

stickies as object

<template>
  <sticky v-for="(key, snapshot) in stickies" :ref="snapshot.ref" :sticky="snapshot.val()"></sticky>
</template>

<script>
import sticky from './Sticky.vue'

export default {

  components: { sticky },

  props: ['ref'],

  data() {
    return {
      stickies: {}
    }
  },

  ready() {
    let query = this.ref.orderByKey()
    query.on('value', snapshot => {
      this.stickies = {}
      snapshot.forEach(child => {
        this.stickies[child.key] = child
      })
    })
  }
}
</script>

<template>
  <sticky v-for="sticky in stickies" :snapshot="sticky" :sticky="sticky.val()"></sticky>
</template>

<script>
import sticky from './Sticky.vue'

export default {

  components: { sticky },

  props: ['ref'],

  data() {
    return {
      stickies: []
    }
  },

  ready() {
    let query = this.ref.orderByKey()
    query.on('value', snapshot => {
      this.stickies = []
      snapshot.forEach(child => {
        this.stickies.push(child)
      })
    })
  }
}
</script>


Fix issues after migrating to a new parser