From 20043e072aee67f1162a5d490c063cadc2e1dcde Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期六, 09 五月 2026 14:21:41 +0800
Subject: [PATCH] 测试完成

---
 vue.config.js                                          |    4 
 src/views/followvisit/zbAgain/index.vue                |    4 
 src/api/AiCentre/Qtemplate.js                          |    8 
 src/views/followvisit/record/TracingInfo/index.vue     |    4 
 src/views/patient/patient/outpatient.vue               |    4 
 src/views/patient/patient/index.vue                    |    4 
 src/components/optionalModule/index.vue                |  727 +++++++++++++++++++++++++++++++++++++++++++++
 src/views/followvisit/zysatisfaction/index.vue         |    4 
 src/views/patient/propaganda/QuestionnaireTask.vue     |    9 
 src/views/followvisit/mzsatisfaction/index.vue         |    4 
 src/views/followvisit/record/detailpage/index.vue      |   70 +++
 src/views/patient/patient/behospitalized.vue           |    4 
 src/views/followvisit/discharge/outpatientService.vue  |    4 
 src/views/followvisit/complaint/index.vue              |    4 
 src/views/followvisit/technology/index.vue             |    4 
 src/views/followvisit/SpecificDisease/index.vue        |    4 
 src/views/followvisit/again/index.vue                  |    6 
 src/views/followvisit/Tracking/index.vue               |    4 
 src/views/followvisit/beHospitalized/followUp.vue      |    4 
 src/views/followvisit/record/detailpage/index copy.vue |    4 
 src/views/followvisit/record/index.vue                 |    4 
 src/views/followvisit/Continue/index.vue               |    4 
 src/views/followvisit/OutpatientAgain/index.vue        |    4 
 src/views/followvisit/record/physical/index.vue        |    4 
 src/views/followvisit/HistoricalFollow/index.vue       |    4 
 src/views/patient/patient/hospital.vue                 |    4 
 src/views/patient/patient/AwaitingAdmission.vue        |    4 
 src/views/followvisit/discharge/index.vue              |    4 
 28 files changed, 849 insertions(+), 63 deletions(-)

diff --git a/src/api/AiCentre/Qtemplate.js b/src/api/AiCentre/Qtemplate.js
index c619033..70232e4 100644
--- a/src/api/AiCentre/Qtemplate.js
+++ b/src/api/AiCentre/Qtemplate.js
@@ -240,3 +240,11 @@
     data: data,
   });
 }
+//鍒囨崲瀛愪换鍔℃ā鏉�
+export function updateTemplate(data) {
+  return request({
+    url: "/smartor/serviceSubtask/updateTemplate",
+    method: "post",
+    data: data,
+  });
+}
diff --git a/src/components/optionalModule/index.vue b/src/components/optionalModule/index.vue
new file mode 100644
index 0000000..1adc7f0
--- /dev/null
+++ b/src/components/optionalModule/index.vue
@@ -0,0 +1,727 @@
+<template>
+  <div class="template-selector">
+    <!-- 妯℃澘閫夋嫨鎸夐挳鍜岄瑙� -->
+    <div class="template-selector__header">
+      <el-form>
+        <el-form-item label="褰撳墠浣跨敤妯℃澘">
+          <el-input
+            style="width: 300px"
+            v-model="selectedTemplateName"
+            placeholder="璇风偣鍑诲彸渚ч�夋嫨"
+          />
+          <el-button
+            v-if="(selectedTemplateId && isEditable) || !selectedTemplateId"
+            style="margin-left: 10px"
+            type="primary"
+            icon="el-icon-edit"
+            @click="drawerVisible = true"
+            circle
+          ></el-button>
+          <!-- <el-button
+            v-if="selectedTemplateId"
+            type="success"
+            icon="el-icon-search"
+            @click="handlePreview"
+            circle
+          ></el-button> -->
+        </el-form-item>
+      </el-form>
+    </div>
+
+
+
+    <!-- 妯℃澘閫夋嫨鎶藉眽 -->
+    <el-drawer
+      title="闂嵎鍐呭鍒楄〃"
+      :visible.sync="drawerVisible"
+      direction="rtl"
+      size="50%"
+      :before-close="handleDrawerClose"
+    >
+      <div class="drawer-content">
+        <el-form
+          :model="queryParams"
+          ref="queryForm"
+          size="small"
+          :inline="true"
+          label-width="98px"
+        >
+          <el-form-item label="闂嵎鍚嶇О">
+            <el-input
+              v-model="queryParams.svyname"
+              @keyup.enter.native="handleSearch"
+            ></el-input>
+          </el-form-item>
+          <el-form-item>
+            <el-button
+              type="primary"
+              icon="el-icon-search"
+              size="medium"
+              @click="handleSearch"
+              >鎼滅储</el-button
+            >
+            <el-button
+              icon="el-icon-refresh"
+              size="medium"
+              @click="handleReset"
+              >閲嶇疆</el-button
+            >
+          </el-form-item>
+        </el-form>
+        <el-divider></el-divider>
+
+        <!-- 妯℃澘鍒楄〃 -->
+        <el-table
+          :data="templateList"
+          style="width: 100%"
+          @row-click="handleSelectTemplate"
+        >
+          <el-table-column prop="svyname" label="闂嵎鏍囬" />
+          <el-table-column prop="description" label="闂嵎鎻忚堪" />
+          <el-table-column prop="updateTime" label="淇敼鏃ユ湡" />
+          <el-table-column prop="createBy" label="鍒涘缓浜�" />
+          <el-table-column label="鎿嶄綔" width="120">
+            <template slot-scope="scope">
+              <el-button
+                type="primary"
+                size="mini"
+                @click.stop="handlePreviewTemplate(scope.row)"
+                >棰勮</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <!-- 鍒嗛〉 -->
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="handleSearch"
+        />
+      </div>
+    </el-drawer>
+
+    <!-- 妯℃澘棰勮瀵硅瘽妗� -->
+    <el-dialog
+      title="妯℃澘棰勮"
+      :visible.sync="previewVisible"
+      width="70%"
+      :before-close="handlePreviewClose"
+    >
+      <el-tabs v-model="activeTab" type="border-card">
+        <el-tab-pane label="妯℃澘鍩虹鏁版嵁" name="basic">
+          <div class="preview-content">
+            <el-form :model="previewData" label-width="100px">
+              <el-row :gutter="10">
+                <el-col :span="14">
+                  <el-form-item label="闂嵎鍒嗙被">
+                    <el-select
+                      v-model="previewData.categoryid"
+                      size="medium"
+                      filterable
+                      placeholder="璇烽�夋嫨鍒嗙被"
+                      disabled
+                    >
+                      <el-option-group
+                        v-for="group in categoryOptions"
+                        :key="group.id"
+                        :label="group.name"
+                      >
+                        <el-option
+                          v-for="item in group.svyLibTemplateCategoryList"
+                          :key="item.id"
+                          :label="item.name"
+                          :value="item.id"
+                        />
+                      </el-option-group>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="10">
+                  <el-form-item label="璇勪环绫诲瀷">
+                    <el-select
+                      v-model="previewData.scoreType"
+                      placeholder="璇烽�夋嫨鍒嗙被"
+                      disabled
+                    >
+                      <el-option
+                        v-for="group in appraisalOptions"
+                        :key="group.value"
+                        :label="group.label"
+                        :value="group.value"
+                      />
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+
+              <el-row :gutter="20">
+                <el-col :span="14">
+                  <el-form-item label="鍙敤鐘舵��">
+                    <el-radio-group v-model="previewData.isenable" disabled>
+                      <el-radio
+                        v-for="(item, index) in usableOptions"
+                        :key="index"
+                        :label="item.value"
+                      >
+                        {{ item.label }}
+                      </el-radio>
+                    </el-radio-group>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="鐗堟湰鍙�">
+                    <el-input
+                      v-model="previewData.version"
+                      placeholder="榛樿1.0"
+                      disabled
+                    />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+
+              <el-form-item label="闂嵎鏍囬">
+                <el-input v-model="previewData.svyname" disabled />
+              </el-form-item>
+
+              <el-form-item label="闂嵎鎻忚堪">
+                <el-input
+                  type="textarea"
+                  :rows="2"
+                  v-model="previewData.description"
+                  disabled
+                />
+              </el-form-item>
+
+              <el-form-item label="闂嵎缁撴潫璇�">
+                <el-input
+                  type="textarea"
+                  :rows="2"
+                  v-model="previewData.conclusion"
+                  disabled
+                />
+              </el-form-item>
+            </el-form>
+          </div>
+        </el-tab-pane>
+
+        <el-tab-pane label="闂灞曠ず" name="questions">
+          <div class="preview-content">
+            <div v-for="item in questionList" :key="item.sort">
+              <!-- 鍗曢�� -->
+              <div
+                class="scriptTopic-dev"
+                v-if="item.scriptType == 1"
+              >
+                <div class="dev-text">
+                  {{ item.sort }}銆乕鍗曢�塢<span>{{ item.scriptContent }}</span>
+                </div>
+                <div class="dev-xx">
+                  <el-radio-group v-model="item.remark" disabled>
+                    <el-radio
+                      v-for="(items, index) in item.svyLibTemplateTargetoptions"
+                      :key="index"
+                      :label="index"
+                    >
+                      {{ items.optioncontent }}
+                    </el-radio>
+                  </el-radio-group>
+                </div>
+              </div>
+
+              <!-- 澶氶�� -->
+              <div
+                class="scriptTopic-dev"
+                v-if="item.scriptType == 2"
+              >
+                <div class="dev-text">
+                  {{ item.sort }}銆乕澶氶�塢<span>{{ item.scriptContent }}</span>
+                </div>
+                <div class="dev-xx">
+                  <el-checkbox-group v-model="item.qremark" disabled>
+                    <el-checkbox
+                      v-for="(items, index) in item.svyLibTemplateTargetoptions"
+                      :key="index"
+                      :label="index"
+                    >
+                      {{ items.optioncontent }}
+                    </el-checkbox>
+                  </el-checkbox-group>
+                </div>
+              </div>
+
+              <!-- 濉┖ -->
+              <div
+                class="scriptTopic-dev"
+                v-if="item.scriptType == 4"
+              >
+                <div class="dev-text">
+                  {{ item.sort }}銆乕闂瓟]<span>{{ item.scriptContent }}</span>
+                </div>
+                <div class="dev-xx">
+                  <el-input
+                    placeholder="璇疯緭鍏ョ瓟妗�"
+                    v-model="item.radioas"
+                    disabled
+                  />
+                </div>
+              </div>
+            </div>
+          </div>
+        </el-tab-pane>
+      </el-tabs>
+
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="handleCancelPreview">鍙栨秷</el-button>
+        <el-button
+          v-if="!selectedTemplateId"
+          type="primary"
+          @click="handleConfirmSelect"
+        >
+          閫夋嫨浣跨敤
+        </el-button>
+        <el-button
+          v-else
+          type="primary"
+          @click="handleConfirmReplace"
+        >
+          鏇挎崲浣跨敤
+        </el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getQtemplatelist, getQtemplateobj, getQtemplateclassify } from "@/api/AiCentre/index";
+import store from "@/store";
+import pagination from "@/components/Pagination";
+
+export default {
+  name: "TemplateSelector",
+  components: {
+    pagination
+  },
+  props: {
+    // 褰撳墠閫変腑鐨勬ā鏉縄D
+    value: {
+      type: [String, Number],
+      default: null
+    },
+    // 褰撳墠閫変腑鐨勬ā鏉垮悕绉�
+    templateName: {
+      type: String,
+      default: ''
+    },
+    // 鏄惁鍙紪杈�
+    isEditable: {
+      type: Boolean,
+      default: true
+    },
+    // 鏄惁鏄剧ず鍙橀噺閰嶇疆
+    showVariableConfig: {
+      type: Boolean,
+      default: true
+    },
+    // 鏈嶅姟绫诲瀷锛岀敤浜庤繃婊ゆā鏉�
+    serviceType: {
+      type: [String, Number],
+      default: null
+    }
+  },
+  data() {
+    return {
+      // 缁勪欢鐘舵��
+      drawerVisible: false,
+      previewVisible: false,
+      activeTab: 'basic',
+      loading: false,
+
+      // 妯℃澘鏁版嵁
+      selectedTemplateId: null,
+      selectedTemplateName: '',
+      selectedTemplateData: null,
+
+      // 鍒楄〃鏁版嵁
+      templateList: [],
+      questionList: [],
+      variableList: [],
+      previewData: {},
+
+      // 鏌ヨ鍙傛暟
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        svyname: '',
+        isenable: ''
+      },
+      total: 0,
+
+      // 閫夐」鏁版嵁
+      categoryOptions: [],
+      appraisalOptions: store.getters.appraiselist || [],
+      usableOptions: [
+        { value: "0", label: "鍙敤" },
+        { value: "1", label: "鍋滅敤" }
+      ],
+
+      // 榛樿鍙橀噺
+      transitionList: [
+        {
+          name: "濮撳悕",
+          value: "${name}",
+          fill: "娲惧彂鏃惰嚜鍔ㄥ尮閰�",
+          default: true
+        },
+        {
+          name: "鍦板潃",
+          value: "${dzz}",
+          fill: "娲惧彂鏃惰嚜鍔ㄥ尮閰�",
+          default: true
+        },
+        {
+          name: "鏅鸿兘璇煶",
+          value: "${dhh}",
+          fill: "娲惧彂鏃惰嚜鍔ㄥ尮閰�",
+          default: true
+        }
+      ]
+    };
+  },
+  watch: {
+    value: {
+      immediate: true,
+      handler(newVal) {
+        this.selectedTemplateId = newVal;
+      }
+    },
+    templateName: {
+      immediate: true,
+      handler(newVal) {
+
+        this.selectedTemplateName = newVal;
+      }
+    },
+    selectedTemplateId(newVal) {
+      this.$emit('input', newVal);
+    },
+    selectedTemplateName(newVal) {
+      this.$emit('update:templateName', newVal);
+    }
+  },
+  created() {
+    this.loadCategories();
+      this.handleSearch();
+
+  },
+  methods: {
+    // 鍔犺浇妯℃澘鍒嗙被
+    async loadCategories() {
+      try {
+        const response = await getQtemplateclassify({});
+        if (response.code === 200) {
+          this.categoryOptions = response.rows;
+        }
+      } catch (error) {
+        console.error('鍔犺浇鍒嗙被澶辫触:', error);
+      }
+    },
+
+    // 鎼滅储妯℃澘
+    async handleSearch() {
+      try {
+        this.loading = true;
+        const response = await getQtemplatelist(this.queryParams);
+        if (response.code === 200) {
+          this.templateList = response.rows;
+          this.total = response.total;
+        }
+      } catch (error) {
+        console.error('鎼滅储妯℃澘澶辫触:', error);
+        this.$modal.msgError('鎼滅储妯℃澘澶辫触');
+      } finally {
+        this.loading = false;
+      }
+    },
+
+    // 閲嶇疆鎼滅储
+    handleReset() {
+      this.queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        svyname: '',
+        isenable: ''
+      };
+      this.handleSearch();
+    },
+
+    // 閫夋嫨妯℃澘
+    handleSelectTemplate(row) {
+      this.selectedTemplateData = row;
+      this.loadTemplateDetail(row.svyid);
+    },
+
+    // 棰勮妯℃澘
+    handlePreviewTemplate(row) {
+      this.selectedTemplateData = row;
+      this.loadTemplateDetail(row.svyid);
+    },
+
+    // 鍔犺浇妯℃澘璇︽儏
+    async loadTemplateDetail(templateId) {
+      try {
+        this.loading = true;
+        const response = await getQtemplateobj({ svyid: templateId });
+        if (response.code === 200) {
+          const templateData = response.rows[0];
+          this.previewData = templateData;
+          this.questionList = templateData.svyTemplateLibScripts || [];
+
+          // 鍒濆鍖栭棶棰樼姸鎬�
+          this.questionList.forEach(item => {
+            item.qremark = [];
+          });
+
+          // 澶勭悊鍙橀噺
+          this.extractVariables(templateData.svyTemplateLibScripts || []);
+
+          this.previewVisible = true;
+          this.drawerVisible = false;
+        }
+      } catch (error) {
+        console.error('鍔犺浇妯℃澘璇︽儏澶辫触:', error);
+        this.$modal.msgError('鍔犺浇妯℃澘璇︽儏澶辫触');
+      } finally {
+        this.loading = false;
+      }
+    },
+
+    // 鎻愬彇鍙橀噺
+    extractVariables(scripts) {
+      let variableList = [];
+
+      scripts.forEach(script => {
+        try {
+          const otherData = JSON.parse(script.otherdata || '[]');
+          otherData.forEach(item => {
+            if (item.default != 1) {
+              variableList.push({
+                value: item.variate,
+                fill: "",
+                name: item.variatename
+              });
+            }
+          });
+        } catch (e) {
+          console.warn('瑙f瀽otherdata澶辫触:', e);
+        }
+      });
+
+      // 鍘婚噸
+      const uniqueVariables = variableList.filter(
+        (obj, index, self) =>
+          index ===
+          self.findIndex(
+            t => t.name === obj.name && t.value === obj.value
+          )
+      );
+
+      this.variableList = [...this.transitionList, ...uniqueVariables];
+    },
+
+    // 棰勮宸查�夋ā鏉�
+    handlePreview() {
+      if (!this.selectedTemplateId) {
+        this.$modal.msgWarning('璇峰厛閫夋嫨妯℃澘');
+        return;
+      }
+
+      this.loadTemplateDetail(this.selectedTemplateId);
+    },
+
+    // 纭閫夋嫨妯℃澘
+    handleConfirmSelect() {
+      if (!this.selectedTemplateData) {
+        this.$modal.msgWarning('璇峰厛閫夋嫨妯℃澘');
+        return;
+      }
+
+      this.selectedTemplateId = this.selectedTemplateData.svyid;
+      this.selectedTemplateName = this.selectedTemplateData.svyname;
+
+      // 杞崲鍙橀噺鏍煎紡
+      const filteredVariables = this.variableList.filter(
+        item => item.name !== "濮撳悕" && item.name !== "鐢佃瘽" && item.name !== "鍦板潃"
+      );
+
+      const textParam = this.convertFormat2ToFormat1(filteredVariables);
+
+      // 瑙﹀彂閫夋嫨浜嬩欢
+      this.$emit('select', {
+        templateId: this.selectedTemplateId,
+        templateName: this.selectedTemplateName,
+        templateData: this.previewData,
+        variableList: this.variableList,
+        textParam: textParam
+      });
+
+      this.previewVisible = false;
+      this.$modal.msgSuccess('閫夋嫨妯℃澘鎴愬姛');
+    },
+
+    // 纭鏇挎崲妯℃澘
+    handleConfirmReplace() {
+      this.$modal.confirm('纭畾瑕佹浛鎹㈠綋鍓嶆ā鏉垮悧锛�')
+        .then(() => {
+          this.handleConfirmSelect();
+        })
+        .catch(() => {});
+    },
+
+    // 鍙栨秷棰勮
+    handleCancelPreview() {
+      this.previewVisible = false;
+      this.$emit('cancel');
+    },
+
+    // 鍏抽棴鎶藉眽
+    handleDrawerClose(done) {
+      done();
+      this.$emit('drawer-close');
+    },
+
+    // 鍏抽棴棰勮
+    handlePreviewClose(done) {
+      done();
+      this.$emit('preview-close');
+    },
+
+    // 鍒犻櫎鍙橀噺
+    handleVariableDelete(index, row) {
+      this.variableList.splice(index, 1);
+      this.$emit('variable-delete', row);
+    },
+
+    // 鍙橀噺鏍煎紡杞崲锛氭暟缁勮浆瀵硅薄
+    convertFormat2ToFormat1(data) {
+      let result = {};
+      data.forEach(item => {
+        let innerObj = {};
+        innerObj[item.value] = item.fill;
+        result[item.name] = innerObj;
+      });
+      return result;
+    },
+
+    // 鍙橀噺鏍煎紡杞崲锛氬璞¤浆鏁扮粍
+    convertFormat1ToFormat2(data) {
+      let result = [];
+      for (let key in data) {
+        let innerKey = Object.keys(data[key])[0];
+        result.push({
+          name: key,
+          value: innerKey,
+          fill: data[key][innerKey]
+        });
+      }
+      return result;
+    },
+
+    // 璁剧疆鍙橀噺
+    setVariables(variables) {
+      if (variables) {
+        const converted = this.convertFormat1ToFormat2(variables);
+        this.variableList = [...this.transitionList, ...converted];
+      }
+    },
+
+    // 娓呴櫎閫夋嫨
+    clear() {
+      this.selectedTemplateId = null;
+      this.selectedTemplateName = '';
+      this.selectedTemplateData = null;
+      this.variableList = [...this.transitionList];
+      this.$emit('clear');
+    },
+
+    // 鑾峰彇鍙橀噺鏁版嵁
+    getVariables() {
+      const filteredVariables = this.variableList.filter(
+        item => item.name !== "濮撳悕" && item.name !== "鐢佃瘽" && item.name !== "鍦板潃"
+      );
+      return this.convertFormat2ToFormat1(filteredVariables);
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.template-selector {
+  &__header {
+    margin-bottom: 20px;
+  }
+
+  &__variables {
+    margin-top: 20px;
+    padding: 20px;
+    background: #f5f7fa;
+    border-radius: 4px;
+
+    .el-table {
+      background: transparent;
+    }
+  }
+}
+
+.drawer-content {
+  padding: 20px;
+
+  .el-form {
+    margin-bottom: 20px;
+  }
+}
+
+.preview-content {
+  max-height: 600px;
+  overflow-y: auto;
+  padding: 20px;
+
+  .scriptTopic-dev {
+    margin-bottom: 25px;
+    font-size: 16px;
+
+    .dev-text {
+      margin-bottom: 10px;
+      font-weight: 500;
+      color: #333;
+
+      span {
+        margin-left: 10px;
+        color: #666;
+      }
+    }
+
+    .dev-xx {
+      padding-left: 20px;
+    }
+  }
+}
+
+::v-deep .el-drawer__body {
+  padding: 0;
+}
+
+::v-deep .el-table {
+  font-size: 14px;
+}
+
+::v-deep .el-table__row {
+  cursor: pointer;
+
+  &:hover {
+    background-color: #f5f7fa;
+  }
+}
+</style>
diff --git a/src/views/followvisit/Continue/index.vue b/src/views/followvisit/Continue/index.vue
index 3fefd8b..896131a 100644
--- a/src/views/followvisit/Continue/index.vue
+++ b/src/views/followvisit/Continue/index.vue
@@ -1675,8 +1675,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/HistoricalFollow/index.vue b/src/views/followvisit/HistoricalFollow/index.vue
index 84db98e..6c25bb3 100644
--- a/src/views/followvisit/HistoricalFollow/index.vue
+++ b/src/views/followvisit/HistoricalFollow/index.vue
@@ -798,8 +798,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/OutpatientAgain/index.vue b/src/views/followvisit/OutpatientAgain/index.vue
index 11a0942..283a56f 100644
--- a/src/views/followvisit/OutpatientAgain/index.vue
+++ b/src/views/followvisit/OutpatientAgain/index.vue
@@ -1456,8 +1456,8 @@
       // const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/SpecificDisease/index.vue b/src/views/followvisit/SpecificDisease/index.vue
index eb3ad64..f8aaec2 100644
--- a/src/views/followvisit/SpecificDisease/index.vue
+++ b/src/views/followvisit/SpecificDisease/index.vue
@@ -1028,8 +1028,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/Tracking/index.vue b/src/views/followvisit/Tracking/index.vue
index 4c46009..252dc77 100644
--- a/src/views/followvisit/Tracking/index.vue
+++ b/src/views/followvisit/Tracking/index.vue
@@ -1395,8 +1395,8 @@
       // const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/again/index.vue b/src/views/followvisit/again/index.vue
index 7a98f4a..73b5797 100644
--- a/src/views/followvisit/again/index.vue
+++ b/src/views/followvisit/again/index.vue
@@ -1453,11 +1453,11 @@
     },
     //鎮h��360璺宠浆
     gettoken360(sfzh, drcode, drname, id) {
-      // const orgname = localStorage.getItem("orgname");
+      const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/beHospitalized/followUp.vue b/src/views/followvisit/beHospitalized/followUp.vue
index a017b39..a252b74 100644
--- a/src/views/followvisit/beHospitalized/followUp.vue
+++ b/src/views/followvisit/beHospitalized/followUp.vue
@@ -1845,8 +1845,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/complaint/index.vue b/src/views/followvisit/complaint/index.vue
index 819b977..4d71869 100644
--- a/src/views/followvisit/complaint/index.vue
+++ b/src/views/followvisit/complaint/index.vue
@@ -1588,8 +1588,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/discharge/index.vue b/src/views/followvisit/discharge/index.vue
index 674fde9..196684e 100644
--- a/src/views/followvisit/discharge/index.vue
+++ b/src/views/followvisit/discharge/index.vue
@@ -1844,8 +1844,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/discharge/outpatientService.vue b/src/views/followvisit/discharge/outpatientService.vue
index 8cea2da..62b91fd 100644
--- a/src/views/followvisit/discharge/outpatientService.vue
+++ b/src/views/followvisit/discharge/outpatientService.vue
@@ -1429,8 +1429,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/mzsatisfaction/index.vue b/src/views/followvisit/mzsatisfaction/index.vue
index 1970ad1..25c9e19 100644
--- a/src/views/followvisit/mzsatisfaction/index.vue
+++ b/src/views/followvisit/mzsatisfaction/index.vue
@@ -1632,8 +1632,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/record/TracingInfo/index.vue b/src/views/followvisit/record/TracingInfo/index.vue
index 74e611a..67a0074 100644
--- a/src/views/followvisit/record/TracingInfo/index.vue
+++ b/src/views/followvisit/record/TracingInfo/index.vue
@@ -1455,8 +1455,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/record/detailpage/index copy.vue b/src/views/followvisit/record/detailpage/index copy.vue
index 23d7a59..ac60502 100644
--- a/src/views/followvisit/record/detailpage/index copy.vue
+++ b/src/views/followvisit/record/detailpage/index copy.vue
@@ -1633,8 +1633,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index cfe9b61..67bd809 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -262,10 +262,15 @@
       <!-- 闅忚鍐呭 -->
       <div class="call-action">
         <div class="call-container">
-          <!-- <div class="call-header">
-            <h2>涓�閿懠鍙姛鑳�</h2>
-          </div> -->
-
+          <template-selector
+          v-if="orgname=='鍗楀崕澶у闄勫睘绗竴鍖婚櫌'&&!Voicetype"
+            v-model="form.templateid"
+            :templateName="form.templatename"
+            :service-type="form.serviceType"
+            :is-editable="form.sendState !== 2"
+            @select="handleTemplateSelect"
+            @clear="handleTemplateClear"
+          />
           <div class="headline">
             <div>闅忚鍐呭</div>
           </div>
@@ -1157,6 +1162,8 @@
   savequestiondetail,
   addPersonVoices,
   query360PatInfo,
+  updateTemplate,
+  query360PatInfonh,
   sendMsg,
 } from "@/api/AiCentre/index";
 import {
@@ -1165,6 +1172,7 @@
   listcontactinformation,
 } from "@/api/patient/homepage";
 import CallButton from "@/components/CallButton";
+import TemplateSelector from "@/components/optionalModule";
 import MergeAndModify from "./MergeAndModify.vue";
 import CallCenterLs from "@/components/CallCenterLs";
 import store from "@/store";
@@ -1173,6 +1181,7 @@
     CallButton,
     MergeAndModify,
     CallCenterLs,
+    TemplateSelector,
   },
   directives: {
     numericOnly: {
@@ -1295,6 +1304,7 @@
       showContinuationCareBtn: false, // 鎺у埗寤剁画鎶ょ悊鎸夐挳鏄剧ず
       // 璺敱鐩戝惉鐩稿叧
       routeWatcher: null,
+
       lastRoutePath: this.$route.path,
       input: "浠婂ぉ韬綋杩樹笉閿�",
       radio: "2",
@@ -1577,7 +1587,6 @@
     this.visitAgain = store.getters.visitAgain;
     console.log(store.getters.visitAgain);
 
-
     this.orgname = localStorage.getItem("orgname");
     if (this.orgname == "鐪佺珛鍚屽痉缈犺嫅闄㈠尯") {
       this.showContinuationCareBtn = true;
@@ -1728,8 +1737,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
@@ -1952,7 +1961,11 @@
           this.Editsingletasksonyic(this.serviceStates);
           const orgName = localStorage.getItem("orgname");
 
-          if (this.form.isVisitAgain != 1 || orgName == "涓芥按甯備腑鍖婚櫌"||this.visitAgain==1) {
+          if (
+            this.form.isVisitAgain != 1 ||
+            orgName == "涓芥按甯備腑鍖婚櫌" ||
+            this.visitAgain == 1
+          ) {
             this.Torouter();
             return;
           }
@@ -2036,6 +2049,35 @@
           message: "璇疯緭鍏ユ纭殑鐢佃瘽鍙风爜锛堟墜鏈哄彿鎴栧甫鍖哄彿鐨勫浐瀹氱數璇濓級",
         };
       }
+    },
+    handleTemplateSelect(templateData) {
+      console.log("閫夋嫨浜嗘ā鏉�:", templateData);
+      // 澶勭悊妯℃澘閫夋嫨閫昏緫
+      let templateobj = templateData.templateData;
+      templateobj.templateid = templateobj.svyid;
+      templateobj.taskid = this.form.taskid;
+      templateobj.isoperation = 1;
+      templateobj.svyTaskTemplateScriptVOS = templateobj.svyTemplateLibScripts;
+      templateobj.svyTaskTemplateScriptVOS.forEach((item) => {
+        item.taskid = this.form.taskid;
+        item.templateid = item.svyid;
+        item.svyTaskTemplateTargetoptions = item.svyLibTemplateTargetoptions;
+      });
+      let obj = {
+        subId: this.form.id,
+        svyTaskTemplateVO: templateobj,
+      };
+      updateTemplate(obj).then((res) => {
+        if (res.code) {
+          location.reload();
+          this.$modal.msgSuccess("妯℃澘淇敼鎴愬姛");
+        } else {
+        }
+      });
+    },
+
+    handleTemplateClear() {
+      console.log("娓呴櫎浜嗘ā鏉块�夋嫨");
     },
     // 浣跨敤绀轰緥
     isValidPhone(phone) {
@@ -2149,7 +2191,11 @@
       const orgName = localStorage.getItem("orgname");
       console.log(orgName, "orgName");
 
-      if (this.form.isVisitAgain != 1 || orgName == "涓芥按甯備腑鍖婚櫌"||this.visitAgain==1) {
+      if (
+        this.form.isVisitAgain != 1 ||
+        orgName == "涓芥按甯備腑鍖婚櫌" ||
+        this.visitAgain == 1
+      ) {
         this.Torouter();
         return;
       }
@@ -2214,14 +2260,16 @@
           this.form = res.rows[0].serviceSubtaskList.find(
             (item) => item.id == this.id
           );
+          console.log(this.form.templatename, "templatename");
+
           this.form.remark = this.form.remark || "";
           this.logsheetlist = res.rows[0].serviceSubtaskList;
           this.templateid = this.form.templateid;
           this.selectedTag = this.form.excep;
           const targetDate = new Date(this.form.visitTime); // 鐩爣鏃ユ湡
           const now = new Date(); // 褰撳墠鏃堕棿
-          console.log(now,'褰撳墠鏃堕棿');
-          console.log(targetDate,'鐩爣鏃ユ湡');
+          console.log(now, "褰撳墠鏃堕棿");
+          console.log(targetDate, "鐩爣鏃ユ湡");
 
           if (now < targetDate && this.form.sendstate == 2) {
             this.$confirm("褰撳墠鏈嶅姟鏈埌鍙戦�佹椂闂磋璋ㄦ厧淇敼", "鎻愮ず", {
diff --git a/src/views/followvisit/record/index.vue b/src/views/followvisit/record/index.vue
index 7e3faca..21cd74a 100644
--- a/src/views/followvisit/record/index.vue
+++ b/src/views/followvisit/record/index.vue
@@ -1147,8 +1147,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/record/physical/index.vue b/src/views/followvisit/record/physical/index.vue
index 597c6f0..a1b67fa 100644
--- a/src/views/followvisit/record/physical/index.vue
+++ b/src/views/followvisit/record/physical/index.vue
@@ -697,8 +697,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/technology/index.vue b/src/views/followvisit/technology/index.vue
index a2be664..841430c 100644
--- a/src/views/followvisit/technology/index.vue
+++ b/src/views/followvisit/technology/index.vue
@@ -1103,8 +1103,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/zbAgain/index.vue b/src/views/followvisit/zbAgain/index.vue
index 4833e3a..9a9d5b4 100644
--- a/src/views/followvisit/zbAgain/index.vue
+++ b/src/views/followvisit/zbAgain/index.vue
@@ -1446,8 +1446,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/followvisit/zysatisfaction/index.vue b/src/views/followvisit/zysatisfaction/index.vue
index 0399723..964ab9e 100644
--- a/src/views/followvisit/zysatisfaction/index.vue
+++ b/src/views/followvisit/zysatisfaction/index.vue
@@ -1591,8 +1591,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/patient/patient/AwaitingAdmission.vue b/src/views/patient/patient/AwaitingAdmission.vue
index f2af589..5bcff2a 100644
--- a/src/views/patient/patient/AwaitingAdmission.vue
+++ b/src/views/patient/patient/AwaitingAdmission.vue
@@ -818,8 +818,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/patient/patient/behospitalized.vue b/src/views/patient/patient/behospitalized.vue
index 1e8abc8..f17a2ee 100644
--- a/src/views/patient/patient/behospitalized.vue
+++ b/src/views/patient/patient/behospitalized.vue
@@ -1012,8 +1012,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/patient/patient/hospital.vue b/src/views/patient/patient/hospital.vue
index 69db263..e85bd9a 100644
--- a/src/views/patient/patient/hospital.vue
+++ b/src/views/patient/patient/hospital.vue
@@ -843,8 +843,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/patient/patient/index.vue b/src/views/patient/patient/index.vue
index c5890a1..6de65c4 100644
--- a/src/views/patient/patient/index.vue
+++ b/src/views/patient/patient/index.vue
@@ -1222,8 +1222,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/patient/patient/outpatient.vue b/src/views/patient/patient/outpatient.vue
index 528d697..4e97f6c 100644
--- a/src/views/patient/patient/outpatient.vue
+++ b/src/views/patient/patient/outpatient.vue
@@ -885,8 +885,8 @@
       const orgname = localStorage.getItem("orgname");
       if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
         query360PatInfonh(id).then((res) => {
-          if (res.url) {
-            window.open(res.url, "_blank");
+          if (res.data) {
+            window.open(res.data, "_blank");
           } else {
             this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
           }
diff --git a/src/views/patient/propaganda/QuestionnaireTask.vue b/src/views/patient/propaganda/QuestionnaireTask.vue
index 4b8848b..80b2bc3 100644
--- a/src/views/patient/propaganda/QuestionnaireTask.vue
+++ b/src/views/patient/propaganda/QuestionnaireTask.vue
@@ -1299,7 +1299,7 @@
         this.form.serviceType == 15
       ) {
         this.checkboxlist = [
-           {
+          {
             value: "1",
             label: "浜哄伐",
           },
@@ -1523,7 +1523,7 @@
         this.form.icd10code = this.diagglist
           .map((item) => item.icdcode)
           .join(",");
-          this.form.icd10name = this.diagglist
+        this.form.icd10name = this.diagglist
           .map((item) => item.icdname)
           .join(",");
         Editsingletask(this.form).then((res) => {
@@ -1876,7 +1876,10 @@
 
         return;
       }
-      if (this.patientqueryParams.searchscope == 1) {
+      if (
+        this.patientqueryParams.searchscope == 1 ||
+        this.patientqueryParams.allhosp == 2
+      ) {
         this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
           (obj) => obj.deptCode
         );
diff --git a/vue.config.js b/vue.config.js
index e196b88..2f448b9 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -40,10 +40,10 @@
         // target: `http://192.168.100.10:8094`,//鐪佺珛鍚屽痉
         // target: `http://192.168.100.10:8095`,//鏂板崕
         // target: `http://192.168.100.10:8098`,//甯備竴
-        // target:`http://localhost:8095`,
+        target:`http://localhost:8095`,
         // target:`http://35z1t16164.qicp.vip`,
         // target: `http://192.168.100.172:8095`,
-        target: `http://192.168.100.10:8083`,//鍗楀崕
+        // target: `http://192.168.100.10:8083`,//鍗楀崕
         // target: `http://192.168.191.181:8095`,
         changeOrigin: true,
         pathRewrite: {

--
Gitblit v1.9.3