yangyin
2024-07-07 68e9ca0b9076a0fe14474cc71b6dc2c420fc5e7f
src/views/project/ch/home/component/waterRight/center.vue
@@ -145,6 +145,15 @@
            </div>
         </el-drawer>
      </div>
      <el-dialog v-model="state.useInstructDialog" :title="state.instructInfo?.template_title" width="500" :before-close="handleClose">
         <el-input v-model="state.inputInstruct" :rows="10" type="textarea"></el-input>
         <template #footer>
            <div class="dialog-footer">
               <el-button @click="handleClose">取消</el-button>
               <el-button type="primary" @click="submitInstruct"> 确认 </el-button>
            </div>
         </template>
      </el-dialog>
   </div>
</template>
@@ -237,6 +246,9 @@
   activeLabelName: 0,
   activeInstructName: 0,
   isShowExpand: false,
   useInstructDialog: false,
   instructInfo: {},
   inputInstruct: '', //可修改指令
});
const exampleList = ref([]); //模版列表
const instructContentList = ref([]); //指令列表
@@ -320,7 +332,16 @@
};
//#region ====================== templateUseClick ======================
const templateUseClick = (row) => {
   emitter.emit('updateChatInput', row.template_value);
   state.useInstructDialog = true;
   state.instructInfo = row;
   state.inputInstruct = row.template_value;
};
const handleClose = () => {
   state.useInstructDialog = false;
};
const submitInstruct = () => {
   emitter.emit('updateChatInput', state.inputInstruct);
   handleClose();
};
//#endregion
//#region ====================== 搜索模板/指令 ======================