From 628fd01beea81bac2f0299472d528860ae07cf3f Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期日, 02 六月 2024 10:52:30 +0800 Subject: [PATCH] 测试完成 --- src/views/followvisit/tasklist/index.vue | 288 +++++++++++++++++++++++++++++++++----------------------- 1 files changed, 169 insertions(+), 119 deletions(-) diff --git a/src/views/followvisit/tasklist/index.vue b/src/views/followvisit/tasklist/index.vue index d6792bd..a04d02e 100644 --- a/src/views/followvisit/tasklist/index.vue +++ b/src/views/followvisit/tasklist/index.vue @@ -77,13 +77,23 @@ <el-divider></el-divider> <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> + <el-select v-model="tasktopic" placeholder="璇烽�夋嫨鏂板绫诲瀷"> + <el-option + v-for="item in taskoptions" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + </el-col> + <el-col :span="1.5"> <el-button type="primary" - plain icon="el-icon-plus" size="medium" @click="handleAdd" - v-hasPermi="['system:user:add']" + :disabled="!tasktopic" >鏂板</el-button > </el-col> @@ -95,7 +105,6 @@ size="medium" :disabled="single" @click="handleUpdate" - v-hasPermi="['system:user:edit']" >淇敼</el-button > </el-col> @@ -141,69 +150,47 @@ <el-table-column type="selection" width="50" align="center" /> <el-table-column label="搴忓彿" + fixed align="center" - key="userId" - prop="userId" + key="taskid" + prop="taskid" /> <el-table-column label="浠诲姟鍚嶇О" + fixed align="center" sortable - key="userName" - prop="userName" + key="taskName" + prop="taskName" :show-overflow-tooltip="true" /> <el-table-column - label="鏈嶅姟妯℃澘" + label="浠诲姟鎻忚堪" align="center" - key="types" - prop="types" + key="taskDesc" + prop="taskDesc" /> <el-table-column - label="鍒涘缓鏃ユ湡" + label="寰呮墽琛�/鎬讳换鍔�" align="center" key="nickName" prop="nickName" - /> - <el-table-column - label="寰呮墽琛�/鎬绘暟" - align="center" - key="phonenumber" - prop="phonenumber" - width="120" > <template slot-scope="scope"> - <span style="margin-left: 10px" - >{{ scope.row.date }}/{{ scope.row.data }}</span - > - </template> - </el-table-column> - - <el-table-column - label="鎵ц鐘舵��" - align="center" - key="topicnumber" - prop="topicnumber" - width="120" - :show-overflow-tooltip="true" - > - <template slot-scope="scope"> - <div>鎵ц瀹屾垚/鎵ц澶辫触</div> + <span>{{ scope.row.wfs }}/{{ scope.row.yfs }}</span> </template> </el-table-column> <el-table-column - label="瀹℃牳浜�" + label="鍒涘缓浜�" align="center" - key="topicnumberaa" - prop="topicnumberaa" - sortable + key="createBy" + prop="createBy" width="120" :show-overflow-tooltip="true" /> - <el-table-column - label="瀹℃牳鏃堕棿" + label="鍒涘缓鏃堕棿" sortable align="center" prop="createTime" @@ -213,26 +200,60 @@ <span>{{ parseTime(scope.row.createTime) }}</span> </template> </el-table-column> + + <el-table-column + label="鐘舵��" + fixed="right" + align="center" + key="phonenumber" + prop="phonenumber" + width="120" + /> <el-table-column label="鎿嶄綔" + fixed="right" align="center" width="120" class-name="small-padding fixed-width" > <template slot-scope="scope"> <el-button + v-if="scope.row.sendState == 1 || scope.row.sendState == 3" size="medium" type="text" - @click="handleUpdate(scope.row)" - v-hasPermi="['system:user:edit']" + @click="sponsor(scope.row)" ><span class="button-zx" - ><i class="el-icon-s-promotion"></i>寮�濮嬫墽琛�</span + ><i class="el-icon-s-promotion"></i>浠诲姟鍙戣捣</span + ></el-button + > + <el-button + v-if="scope.row.sendState == 1 || scope.row.sendState == 3" + size="medium" + type="text" + @click="immediateExecution(scope.row)" + ><span class="button-lj" + ><i class="el-icon-s-promotion"></i>绔嬪嵆鎵ц</span + ></el-button + > + <el-button size="medium" type="text" @click="newAdd(scope.row)" + ><span class="button-xj" + ><i class="el-icon-circle-plus-outline"></i>渚濈収鏂板</span + ></el-button + > + <el-button + v-if="scope.row.sendState == 2" + size="medium" + type="text" + @click="stop(scope.row)" + ><span class="button-zt" + ><i class="el-icon-circle-plus-outline"></i>鏆傚仠浠诲姟</span ></el-button > </template> </el-table-column> <el-table-column label="浠诲姟璇︽儏" + fixed="right" align="center" width="200" class-name="small-padding fixed-width" @@ -242,25 +263,12 @@ size="medium" type="text" @click="handleUpdate(scope.row)" - v-hasPermi="['system:user:edit']" ><span class="button-xq" ><i class="el-icon-s-data"></i>璇︽儏</span ></el-button > - <el-button - size="medium" - type="text" - @click="handleUpdate(scope.row)" - v-hasPermi="['system:user:edit']" - ><span class="button-bb" - ><i class="el-icon-s-order"></i>鎶ヨ〃</span - ></el-button - > - <el-button - size="medium" - type="text" - @click="handleUpdate(scope.row)" - v-hasPermi="['system:user:edit']" + + <el-button size="medium" type="text" @click="deletefn(scope.row)" ><span class="button-sc" ><i class="el-icon-delete"></i>鍒犻櫎</span ></el-button @@ -288,7 +296,7 @@ <el-row :gutter="20"> <el-col :span="12" ><el-form-item label="浠诲姟鍚嶇О"> - <el-input v-model="form.name"></el-input> </el-form-item + <el-input v-model="form.taskName"></el-input> </el-form-item ></el-col> </el-row> <el-row :gutter="20"> @@ -336,7 +344,6 @@ <script> import { - listUser, getUser, delUser, addUser, @@ -344,6 +351,14 @@ resetUserPwd, changeUserStatus, } from "@/api/system/user"; +import { + getTasklist, + getTaskInfo, + Editsingletask, + delTaskInfo, + TaskTemplateSendExecution, +} from "@/api/AiCentre/index"; + import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; @@ -385,6 +400,7 @@ inputVisible: false, inputValue: "", previewVisible: false, //闂ㄨ瘖闅忚棰勮寮规 + TaskOperation: {}, radio: "", radios: [], previewtype: 2, //棰勮闂ㄨ瘖闅忚绫诲瀷 @@ -394,6 +410,33 @@ previewvalue: { username: "杩欎釜鍖荤敓瀵逛綘鎬庝箞鏍�", }, + taskoptions: [ + { + value: "1", + label: "瀹f暀鏈嶅姟", + }, + { + value: "2", + label: "闂ㄨ瘖闅忚", + }, + { + value: "3", + label: "鍑洪櫌闅忚", + }, + { + value: "4", + label: "澶嶈瘖鏈嶅姟", + }, + { + value: "5", + label: "浣撴閫氱煡", + }, + { + value: "6", + label: "闂嵎鏈嶅姟", + }, + ], + tasktopic: null, //鏂板绫诲瀷 value: [], list: [], loading: false, @@ -578,16 +621,14 @@ }); }, methods: { - /** 鏌ヨ闂ㄨ瘖闅忚鍒楄〃 */ + /** 鏌ヨ浠诲姟鍒楄〃 */ getList() { - this.loading = true; - listUser(this.addDateRange(this.topqueryParams, this.dateRange)).then( - (response) => { - this.userList = response.rows; - this.total = response.total; - this.loading = false; - } - ); + // this.loading = true; + getTasklist(this.topqueryParams).then((response) => { + this.userList = response.rows; + this.total = response.total; + this.loading = false; + }); }, // 鏌ョ湅闂ㄨ瘖闅忚璇︽儏 Referencequestion(row) { @@ -607,21 +648,7 @@ this.options = []; } }, - // 闂ㄨ瘖闅忚鐘舵�佷慨鏀� - handleStatusChange(row) { - let text = row.status === "0" ? "鍚敤" : "鍋滅敤"; - this.$modal - .confirm('纭瑕�"' + text + '""' + row.userName + '"鐢ㄦ埛鍚楋紵') - .then(function () { - return changeUserStatus(row.userId, row.status); - }) - .then(() => { - this.$modal.msgSuccess(text + "鎴愬姛"); - }) - .catch(function () { - row.status = row.status === "0" ? "1" : "0"; - }); - }, + // 鍙栨秷鎸夐挳 cancel() { this.addalteropen = false; @@ -687,47 +714,49 @@ /** 鏂板鎸夐挳鎿嶄綔 */ handleAdd() { this.$router.push({ - path: "/followvisit/tasklist/FollowupDetails/", + path: "/followvisit/particty", + query: { type: this.tasktopic }, }); - // this.reset(); - // this.addalteropen = true; - // getUser().then((response) => { - // this.postOptions = response.posts; - // this.roleOptions = response.roles; - // this.title = "鏂板闂ㄨ瘖闅忚"; - // this.form.password = this.initPassword; - // }); }, /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { - this.reset(); - const userId = row.userId || this.ids; - getUser(userId).then((response) => { - this.form = response.data; - this.postOptions = response.posts; - this.roleOptions = response.roles; - this.$set(this.form, "postIds", response.postIds); - this.$set(this.form, "roleIds", response.roleIds); - this.addalteropen = true; - this.title = "淇敼鐢ㄦ埛"; - this.form.password = ""; + this.$router.push({ + path: "/followvisit/particty", + query: { type: row.hospType, id: row.taskid }, }); }, - /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */ - handleResetPwd(row) { - this.$prompt('璇疯緭鍏�"' + row.userName + '"鐨勬柊瀵嗙爜', "鎻愮ず", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - closeOnClickModal: false, - inputPattern: /^.{5,20}$/, - inputErrorMessage: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿", - }) - .then(({ value }) => { - resetUserPwd(row.userId, value).then((response) => { - this.$modal.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value); - }); - }) - .catch(() => {}); + // 鍒犻櫎浠诲姟 + deletefn() {}, + // 浠诲姟鍙戣捣 + sponsor(row) { + console.log(row, "浠诲姟淇℃伅"); + if (row.sendState != 2) { + this.TaskOperation.taskId = row.taskid; + this.TaskOperation.sendState = 2; + TaskTemplateSendExecution(this.TaskOperation).then((res) => {}); + } + }, + immediateExecution(row) { + console.log(row, "浠诲姟淇℃伅"); + if (row.sendState != 2) { + this.TaskOperation.taskId = row.taskid; + this.TaskOperation.sendState = 2; + this.TaskOperation.sendType = 2; + TaskTemplateSendExecution(this.TaskOperation).then((res) => {}); + } + }, + + // 渚濈収鏂板 + newAdd(row) { + TaskTemplateSendExecution().then((res) => {}); + }, + // 鏆傚仠 + stop(row) { + if (row.sendState == 2) { + this.TaskOperation.taskId = row.taskId; + this.TaskOperation.sendState = 3; + TaskTemplateSendExecution().then((res) => {}); + } }, /** 鎻愪氦鎸夐挳 */ @@ -885,6 +914,24 @@ border-radius: 1px; color: #ffffff; } +.button-lj { + background: #e9614f; + padding: 5px; + border-radius: 1px; + color: #ffffff; +} +.button-xj { + background: #815c94; + padding: 5px; + border-radius: 1px; + color: #ffffff; +} +.button-zt { + background: #f9c116; + padding: 5px; + border-radius: 1px; + color: #ffffff; +} ::v-deep.el-radio-group { span { @@ -892,6 +939,9 @@ } } +::v-deep.el-button + .el-button { + margin-left: 0; +} ::v-deep.el-checkbox-group { span { font-size: 24px; -- Gitblit v1.9.3