From c81b2f6682de864fbd0fd8674e2d5fff9a2c9b8a Mon Sep 17 00:00:00 2001 From: heimawl <1785969728@qq.com> Date: 星期四, 20 七月 2023 16:37:19 +0800 Subject: [PATCH] 11 --- src/views/tool/module/classifyone.vue | 631 +++++++++++++++++++++++ src/views/sfstatistics/Voicedetail/index.vue | 5 src/views/tool/module/classifytwo.vue | 177 ++++++ src/layout/components/Navbar.vue | 8 src/views/tool/module/classifythreea.vue | 790 +++++++++++++++++++++++++++++ 5 files changed, 1,607 insertions(+), 4 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 39b3dad..9aa306e 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -9,13 +9,13 @@ <template v-if="device!=='mobile'"> <search id="header-search" class="right-menu-item" /> - <el-tooltip content="婧愮爜鍦板潃" effect="dark" placement="bottom"> + <!-- <el-tooltip content="婧愮爜鍦板潃" effect="dark" placement="bottom"> <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" /> - </el-tooltip> + </el-tooltip> --> - <el-tooltip content="鏂囨。鍦板潃" effect="dark" placement="bottom"> + <!-- <el-tooltip content="鏂囨。鍦板潃" effect="dark" placement="bottom"> <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" /> - </el-tooltip> + </el-tooltip> --> <screenfull id="screenfull" class="right-menu-item hover-effect" /> diff --git a/src/views/sfstatistics/Voicedetail/index.vue b/src/views/sfstatistics/Voicedetail/index.vue index 6fd8502..0ffbe56 100644 --- a/src/views/sfstatistics/Voicedetail/index.vue +++ b/src/views/sfstatistics/Voicedetail/index.vue @@ -163,6 +163,7 @@ }, methods: { + // 楗煎浘 fucazChartsInit() { var fucazCharts = echarts.init(this.fucazCharts); console.log(fucazCharts); @@ -187,6 +188,10 @@ }, label: { show: false, + formatter(param) { + // correct the percentage + return param.name + " (" + param.percent * 2 + "%)"; + }, position: "center", }, emphasis: { diff --git a/src/views/tool/module/classifyone.vue b/src/views/tool/module/classifyone.vue new file mode 100644 index 0000000..ee9e073 --- /dev/null +++ b/src/views/tool/module/classifyone.vue @@ -0,0 +1,631 @@ +<template> + <div class="Questionnairemanagement"> + <!-- 宸︿晶鏍� --> + <div class="sidecolumn" v-if="Sidecontrol"> + <div v-if="Typecontrol"> + <div class="sidecolumn-top"> + <div class="top-wj">绫诲瀷</div> + <div class="top-tj" @click="dialogFormVisible = true">+娣诲姞</div> + </div> + <div class="center-ss"> + <el-input + placeholder="璇疯緭鍏ュ唴瀹�" + v-model="sidecolumnval" + class="input-with-select" + size="medium " + > + <el-button + @click="sidecolumnss" + slot="append" + icon="el-icon-search" + ></el-button> + </el-input> + </div> + </div> + + <div class="bottom-fl"> + <el-tabs tab-position="right"> + <el-tab-pane :label="`鍏ㄩ儴 (${numberlb})`"></el-tab-pane> + <el-tab-pane + class="tab-paness" + :key="item.title" + v-for="(item, index) in editableTabs" + > + <span slot="label"> + {{ + item.title + " (" + item.number + ")" + }}   <el-popover + placement="top-start" + width="100" + trigger="hover" + > + <div style="text-align: center"> + <el-button type="text" @click="popoveramend(item)" + >淇敼</el-button + ><el-button type="text" @click="deletefenlei(item)" + ><span style="color: rgb(173, 55, 55)" + >鍒犻櫎</span + ></el-button + > + </div> + <i slot="reference" class="el-icon-share"></i> </el-popover + ></span> + </el-tab-pane> + </el-tabs> + </div> + </div> + <!-- 涓儴鏁版嵁 --> + <div class="leftvlue"> + <div class="leftvlue-top" v-if="topactiveName"> + <el-tabs v-model="topactiveName" @tab-click="tophandleClick"> + <el-tab-pane name="Local"> + <span class="mulsz" slot="label">鏈湴搴� </span> + </el-tab-pane> + <el-tab-pane name="sharing"> + <span class="mulsz" slot="label">鍏变韩搴� </span> + </el-tab-pane> + </el-tabs> + </div> + <div class="leftvlue-bg"> + <el-row :gutter="20"> + <!--鐢ㄦ埛鏁版嵁--> + <el-col :span="24" :xs="24"> + <el-form + :model="queryParams" + ref="queryForm" + size="small" + :inline="true" + v-show="showSearch" + label-width="98px" + > + <el-form-item label="鍚嶇О" prop="userName"> + <el-input + v-model="queryParams.userName" + placeholder="璇疯緭鍏�" + clearable + style="width: 200px" + @keyup.enter.native="handleQuery" + /> + </el-form-item> + <el-form-item label="閫傜敤鐤剧梾" prop="status"> + <el-cascader + v-model="queryParams.status" + :options="optionss" + :props="propss" + clearable + ></el-cascader> + </el-form-item> + + <el-form-item> + <el-button + type="primary" + icon="el-icon-search" + size="medium" + @click="handleQuery" + >鎼滅储</el-button + > + <el-button + icon="el-icon-refresh" + size="medium" + @click="resetQuery" + >閲嶇疆</el-button + > + </el-form-item> + </el-form> + <el-divider></el-divider> + <el-table + v-loading="loading" + :data="userList" + :border="true" + highlight-current-row + @selection-change="handleSelectionChange" + @current-change="handleCurrentChange" + > + <el-table-column type="selection" width="50" align="center" /> + <el-table-column + label="搴忓彿" + align="center" + key="userid" + prop="userid" + /> + <el-table-column + label="鍚嶇О" + align="center" + key="userName" + prop="userName" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鐗堟湰" + align="center" + key="nickName" + prop="nickName" + :show-overflow-tooltip="true" + /> + + <el-table-column + label="閫傜敤鐤剧梾" + align="center" + key="aphonenumber" + prop="aphonenumber" + width="120" + /><el-table-column + label="鎻忚堪" + align="center" + key="bphonenumber" + prop="bphonenumber" + width="120" + /> + <el-table-column + label="鏈�杩戠紪杈�" + align="center" + key="cphonenumber" + prop="cphonenumber" + width="120" + /> + </el-table> + + <pagination + v-show="total > 0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + /> + </el-col> + </el-row> + + <!-- 娣诲姞鎴栦慨鏀归厤缃璇濇 --> + <el-dialog + :title="title" + :visible.sync="open" + width="900px" + append-to-body + > + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + </div> + </div> + <!-- 鍙充晶鏁版嵁 --> + <div class="sidecolumn"> + <h3>鎿嶄綔</h3> + <div> + <el-row :gutter="10" class="mb8"> + <el-col :span="1.5"> + <el-button + type="primary" + plain + icon="el-icon-plus" + size="medium" + @click="handleAdd" + v-hasPermi="['system:user:add']" + >鏂板</el-button + > + </el-col> + + <el-col :span="1.5"> + <el-button + type="danger" + plain + icon="el-icon-delete" + size="medium" + :disabled="multiple" + @click="handleDelete" + v-hasPermi="['system:user:remove']" + >鍒犻櫎</el-button + > + </el-col> + </el-row> + <el-row :gutter="10"> + <el-col :span="1.5"> + <el-button + type="success" + plain + icon="el-icon-edit" + size="medium" + :disabled="single" + @click="handleUpdate" + v-hasPermi="['system:user:remove']" + >淇敼</el-button + > + </el-col> + <el-col :span="1.5"> + <el-button + type="primary" + plain + icon="el-icon-share" + size="medium" + :disabled="single" + @click="ViewQuestionnaire" + v-hasPermi="['system:user:remove']" + >鏌ョ湅</el-button + > + </el-col> + </el-row> + </div> + </div> + <!-- 娣诲姞绫诲埆寮规 --> + <el-dialog + :title="amendtag ? '淇敼绫诲埆' : '鏂板绫诲埆'" + width="30%" + :visible.sync="dialogFormVisible" + > + <el-form :model="classifyform"> + <el-form-item + :label="amendtag ? '璇疯緭鍏ユ柊鐨勭被鍒悕绉�' : '璇疯緭鍏ョ被鍒悕绉�'" + > + <el-input + v-model="classifyform.categoryname" + autocomplete="off" + ></el-input> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button @click="dialogFormVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="submitsidecolumn">纭� 瀹�</el-button> + </div> + </el-dialog> + <!-- 鍒犻櫎绫诲埆纭妗� --> + <el-dialog title="璀﹀憡" :visible.sync="deleteVisible" width="40%"> + <div style="font-size: 20px; color: rgb(247, 76, 76)"> + 鏄惁纭鍒犻櫎鍒嗙被锛歔<span>{{ deletefenl }}</span + >]? + </div> + <div style="font-size: 20px"> + 姝ゆ搷浣滀細灏嗚绫诲埆涓嬫墍鏈夋ā鍧楄浆绉昏嚦[鏈垎绫籡锛屾槸鍚︾户缁垹闄ゆ鍒嗙被锛� + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="deleteVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="deletefenlei">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import { listUser, delUser, addUser, updateUser } from "@/api/system/user"; +import Treeselect from "@riophae/vue-treeselect"; +import "@riophae/vue-treeselect/dist/vue-treeselect.css"; +export default { + name: "questionnaire", + dicts: ["sys_normal_disable", "sys_user_sex"], + components: { Treeselect }, + data() { + return { + topactiveName: "", //鎺у埗鍙充晶鏁版嵁椤堕儴tab灞曠ず + loading: false, //閬僵灞� + Typecontrol: true, //渚ц竟绫诲瀷灞曠ず鎺у埗 + Sidecontrol: true, //渚ц竟鏍戝睍绀烘帶鍒� + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鍗曚釜閫変腑 + MultipleC: false, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + // 鐢ㄦ埛琛ㄦ牸鏁版嵁 + + userList: [ + { + userid: 1, + userName: "涓夊彿", + nickName: "1.2.4", + aphonenumber: "鍏宠妭鐐庣棁", + bphonenumber: "閲嶅害", + cphonenumber: "2022-12-12 ", + }, + { + userid: 2, + userName: "涓�鍙�", + nickName: "1.2.4", + aphonenumber: "楂樿鍘�", + bphonenumber: "涓害", + cphonenumber: "2022-12-12 ", + }, + { + userid: 3, + userName: "涓�鍙�", + nickName: "1.2.4", + aphonenumber: "楂樿鍘�", + bphonenumber: "涓害", + cphonenumber: "2022-12-12 ", + }, + ], + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 鏃ユ湡鑼冨洿 + dateRange: [], + // 宀椾綅閫夐」 + postOptions: [], + // 瑙掕壊閫夐」 + roleOptions: [], + // 琛ㄥ崟鍙傛暟 + form: {}, + numberlb: 22, + numberlbs: 2, + sidecolumnform: {}, //娣诲姞绫诲埆琛ㄥ崟 + sidecolumnval: "", //绫诲埆鎼滅储 + propss: { multiple: true }, + idds: "", + amendtag: false, //鏄惁淇敼绫诲埆 + dialogFormVisible: false, //淇敼娣诲姞绫诲埆寮规 + deleteVisible: false, //鍒嗙被鍒犻櫎寮规 + deletefenl: "楂樿鍘�", //鍒犻櫎椤� + //绫诲埆琛ㄥ崟 + classifyform: { + categoryname: "", + }, + // 澶氶�夊垪琛� + optionss: [ + { + value: 1, + label: "涓滃崡", + }, + { + value: 2, + label: "瑗垮寳", + }, + { + value: 3, + label: "浠ㄤ花浠�", + }, + { + value: 4, + label: "鍏椋掗", + }, + ], + //绫诲埆鍒楄〃 + editableTabs: [ + { + title: "鍒嗙被涓�", + number: "1", + }, + { + title: "鍒嗙被浜�", + number: "2", + }, + { + title: "鍒嗙被涓�", + number: "2", + }, + { + title: "鍒嗙被鍥�", + number: "2", + }, + { + title: "鍒嗙被浜�", + number: "2", + }, + ], + // 鏌ヨ鍙傛暟 + queryParams: {}, + currentRow: null, //閫変腑琛屾暟鎹� + }; + }, + watch: {}, + created() { + this.getList(); + }, + + methods: { + /** 鏌ヨ鐢ㄦ埛鍒楄〃 */ + getList() { + // this.loading = true; + listUser().then((response) => { + console.log(response); + // this.userList = response.data; + // this.total = response.total; + // this.loading = false; + console.log(this.userList); + }); + // const { rows } = await listUser(); + // console.log(rows); + // this.list = rows; + }, + // 閫変腑琛岃Е鍙� + handleCurrentChange(val) { + this.currentRow = val; + console.log(val); + }, + // 娣诲姞銆佷慨鏀圭被鍒� + submitsidecolumn() { + if (this.amendtag) { + this.classifyform.tagcategoryid = this.idds; + // toamendtagcategory(this.addDateRange(this.classifyform)).then( + // (response) => { + // console.log(response); + // this.gitclasify(); + // } + // ); + } else { + // addtagcategory(this.addDateRange(this.classifyform)).then( + // (response) => { + // console.log(response); + // this.gitclasify(); + // } + // ); + } + this.classifyform = { + categoryname: "", + }; + this.idds = ""; + this.dialogFormVisible = false; + }, + //鍒犻櫎鍒嗙被 + deletefenlei(row) { + if (this.deleteVisible) { + // deletetagcategory(this.idds).then((response) => { + // console.log(response); + // this.gitclasify(); + // }); + this.deleteVisible = false; + this.idds = ""; + } else { + this.deleteVisible = true; + this.idds = row.tagcategoryid; + this.deletefenl = row.title; + } + }, + //鎼滅储绫诲埆 + sidecolumnss() {}, + // 鍒囨崲鍏变韩/鏈湴 + tophandleClick() {}, + // 淇敼鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = {}; + this.resetForm("form"); + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.dateRange = []; + this.resetForm("queryForm"); + this.queryParams.deptId = undefined; + this.$refs.tree.setCurrentKey(null); + this.handleQuery(); + }, + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map((item) => item.userId); + this.single = selection.length != 1; + this.multiple = !selection.length; + }, + /** 鏂板鎸夐挳鎿嶄綔 */ + handleAdd() {}, + /** 淇敼鎸夐挳鎿嶄綔 */ + handleUpdate() {}, + // 鏌ョ湅 + ViewQuestionnaire() {}, + /** 鏇存柊/淇敼鎻愪氦鎸夐挳 */ + submitForm: function () { + this.$refs["form"].validate((valid) => { + if (valid) { + if (this.form.userId != undefined) { + // updateUser(this.form).then((response) => { + // this.$modal.msgSuccess("淇敼鎴愬姛"); + // this.open = false; + // this.getList(); + // }); + } else { + // addUser(this.form).then((response) => { + // this.$modal.msgSuccess("鏂板鎴愬姛"); + // this.open = false; + // this.getList(); + // }); + } + } + }); + }, + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + handleDelete(row) { + const userIds = row.userId || this.ids; + this.$modal + .confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�') + .then(function () { + return delUser(userIds); + }) + .then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }) + .catch(() => {}); + }, + }, +}; +</script> + +<style lang="scss" scoped> +.Questionnairemanagement { + display: flex; +} +.sidecolumn { + width: 300px; + min-height: 100vh; + text-align: center; + // display: flex; + margin-top: 20px; + margin: 20px; + padding: 30px; + background: #edf1f7; + border: 1px solid #dcdfe6; + -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), + 0 0 6px 0 rgba(0, 0, 0, 0.04); +} + +.sidecolumn-top { + display: flex; + justify-content: space-between; + .top-wj { + font-size: 20px; + } + .top-tj { + font-size: 18px; + + color: rgb(0, 89, 255); + cursor: pointer; + } +} +.center-ss { + margin-top: 30px; + .input-with-select { + height: 40px !important; + } +} +.bottom-fl { + margin-top: 30px; + display: center !important; +} + +::v-deep.el-tabs--left, +.el-tabs--right { + overflow: hidden; + align-items: center; + display: flex; +} +::v-deep.el-input--medium .el-input__inner { + height: 40px !important; +} +::v-deep.el-tabs--right .el-tabs__active-bar.is-right { + height: 40px; + width: 5px; + left: 0; +} +::v-deep.el-tabs--right .el-tabs__item.is-right { + display: block; + font-size: 20px; +} +.leftvlue { + // display: flex; + // flex: 1; + width: 80%; + margin-top: 20px; + // margin: 20px; + padding: 30px; + background: #ffff; + border: 1px solid #dcdfe6; + -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), + 0 0 6px 0 rgba(0, 0, 0, 0.04); + .mulsz { + font-size: 20px; + } +} +</style> diff --git a/src/views/tool/module/classifythreea.vue b/src/views/tool/module/classifythreea.vue new file mode 100644 index 0000000..e465915 --- /dev/null +++ b/src/views/tool/module/classifythreea.vue @@ -0,0 +1,790 @@ +<template> + <div class="Questionnairemanagement"> + <!-- 宸︿晶鏍� --> + <div class="sidecolumn" v-if="Sidecontrol"> + <div v-if="Typecontrol"> + <div class="sidecolumn-top"> + <div class="top-wj">绫诲瀷</div> + <div class="top-tj" @click="dialogFormVisible = true">+娣诲姞</div> + </div> + <div class="center-ss"> + <el-input + placeholder="璇疯緭鍏ュ唴瀹�" + v-model="sidecolumnval" + class="input-with-select" + size="medium " + > + <el-button + @click="sidecolumnss" + slot="append" + icon="el-icon-search" + ></el-button> + </el-input> + </div> + </div> + + <div class="bottom-fl"> + <el-tabs tab-position="right"> + <el-tab-pane :label="`鍏ㄩ儴 (${numberlb})`"></el-tab-pane> + <el-tab-pane + class="tab-paness" + :key="item.title" + v-for="(item, index) in editableTabs" + > + <span slot="label"> + {{ + item.title + " (" + item.number + ")" + }}   <el-popover + placement="top-start" + width="100" + trigger="hover" + > + <div style="text-align: center"> + <el-button type="text" @click="popoveramend(item)" + >淇敼</el-button + ><el-button type="text" @click="deletefenlei(item)" + ><span style="color: rgb(173, 55, 55)" + >鍒犻櫎</span + ></el-button + > + </div> + <i slot="reference" class="el-icon-share"></i> </el-popover + ></span> + </el-tab-pane> + </el-tabs> + </div> + </div> + <!-- 涓儴鏁版嵁 --> + <div class="leftvlue"> + <div class="leftvlue-top" v-if="topactiveName"> + <el-tabs v-model="topactiveName" @tab-click="tophandleClick"> + <el-tab-pane name="Local"> + <span class="mulsz" slot="label">鏈湴搴� </span> + </el-tab-pane> + <el-tab-pane name="sharing"> + <span class="mulsz" slot="label">鍏变韩搴� </span> + </el-tab-pane> + </el-tabs> + </div> + <div class="leftvlue-bg"> + <el-row :gutter="20"> + <!--鐢ㄦ埛鏁版嵁--> + <el-col :span="24" :xs="24"> + <el-form + :model="queryParams" + ref="queryForm" + size="small" + :inline="true" + v-show="showSearch" + label-width="98px" + > + <el-form-item label="鍚嶇О" prop="userName"> + <el-input + v-model="queryParams.userName" + placeholder="璇疯緭鍏�" + clearable + style="width: 200px" + @keyup.enter.native="handleQuery" + /> + </el-form-item> + <el-form-item label="閫傜敤鐤剧梾" prop="status"> + <el-cascader + v-model="queryParams.status" + :options="optionss" + :props="propss" + clearable + ></el-cascader> + </el-form-item> + + <el-form-item> + <el-button + type="primary" + icon="el-icon-search" + size="medium" + @click="handleQuery" + >鎼滅储</el-button + > + <el-button + icon="el-icon-refresh" + size="medium" + @click="resetQuery" + >閲嶇疆</el-button + > + </el-form-item> + </el-form> + + <el-collapse v-model="activeNames"> + <el-collapse-item title="涓�鍙疯〃鏍�" name="1"> + <el-table + v-loading="loading" + :data="userList" + ref="singone" + :border="true" + highlight-current-row + @selection-change="handleSelectionChange" + @current-change="handleCurrentChange" + > + <el-table-column type="selection" width="50" align="center" /> + <el-table-column + label="搴忓彿" + align="center" + key="userid" + prop="userid" + /> + <el-table-column + label="鍚嶇О" + align="center" + key="userName" + prop="userName" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鐗堟湰" + align="center" + key="nickName" + prop="nickName" + :show-overflow-tooltip="true" + /> + + <el-table-column + label="閫傜敤鐤剧梾" + align="center" + key="aphonenumber" + prop="aphonenumber" + width="120" + /><el-table-column + label="鎻忚堪" + align="center" + key="bphonenumber" + prop="bphonenumber" + width="120" + /> + <el-table-column + label="鏈�杩戠紪杈�" + align="center" + key="cphonenumber" + prop="cphonenumber" + width="120" + /> + </el-table> + <pagination + v-show="total > 0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + /> + </el-collapse-item> + <el-collapse-item title="浜屽彿琛ㄦ牸" name="2"> + <el-table + v-loading="loading" + ref="singtwo" + :data="userListmax" + :border="true" + highlight-current-row + @selection-change="handleSelectiontwo" + @current-change="handleCurrenttwo" + > + <el-table-column type="selection" width="50" align="center" /> + <el-table-column + label="搴忓彿" + align="center" + key="userids" + prop="userids" + /> + <el-table-column + label="鍚嶇О" + align="center" + key="userName" + prop="userName" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鐗堟湰" + align="center" + key="nickName" + prop="nickName" + :show-overflow-tooltip="true" + /> + + <el-table-column + label="閫傜敤鐤剧梾" + align="center" + key="aphonenumber" + prop="aphonenumber" + width="120" + /><el-table-column + label="鎻忚堪" + align="center" + key="bphonenumber" + prop="bphonenumber" + width="120" + /> + <el-table-column + label="鏈�杩戠紪杈�" + align="center" + key="cphonenumber" + prop="cphonenumber" + width="120" + /> + </el-table> + <pagination + v-show="total > 0" + :total="total" + :page.sync="queryParams.pageNum" + :limit.sync="queryParams.pageSize" + @pagination="getList" + /> + </el-collapse-item> + </el-collapse> + </el-col> + </el-row> + + <!-- 娣诲姞鎴栦慨鏀归厤缃璇濇 --> + <el-dialog + :title="title" + :visible.sync="open" + width="900px" + append-to-body + > + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + </div> + </div> + <!-- 鍙充晶鏁版嵁 --> + <div class="sidecolumn"> + <h3>鎿嶄綔</h3> + <div> + <h5>涓�鍙疯〃</h5> + <el-row :gutter="10" class="mb8"> + <el-col :span="1.5"> + <el-button + type="primary" + plain + icon="el-icon-plus" + size="medium" + @click="handleAdd" + v-hasPermi="['system:user:add']" + >鏂板</el-button + > + </el-col> + + <el-col :span="1.5"> + <el-button + type="danger" + plain + icon="el-icon-delete" + size="medium" + :disabled="multiple" + @click="handleDelete" + v-hasPermi="['system:user:remove']" + >鍒犻櫎</el-button + > + </el-col> + </el-row> + <el-row :gutter="10"> + <el-col :span="1.5"> + <el-button + type="success" + plain + icon="el-icon-edit" + size="medium" + :disabled="single" + @click="handleUpdate" + v-hasPermi="['system:user:remove']" + >淇敼</el-button + > + </el-col> + <el-col :span="1.5"> + <el-button + type="primary" + plain + icon="el-icon-share" + size="medium" + :disabled="single" + @click="ViewQuestionnaire" + v-hasPermi="['system:user:remove']" + >鏌ョ湅</el-button + > + </el-col> + </el-row> + </div> + <el-divider></el-divider> + <div> + <h5>浜屽彿琛�</h5> + <el-row :gutter="10" class="mb8"> + <el-col :span="1.5"> + <el-button + type="primary" + plain + icon="el-icon-plus" + size="medium" + @click="handleAdd" + v-hasPermi="['system:user:add']" + >鏂板</el-button + > + </el-col> + + <el-col :span="1.5"> + <el-button + type="danger" + plain + icon="el-icon-delete" + size="medium" + :disabled="multipletwo" + @click="handleDelete" + v-hasPermi="['system:user:remove']" + >鍒犻櫎</el-button + > + </el-col> + </el-row> + <el-row :gutter="10"> + <el-col :span="1.5"> + <el-button + type="success" + plain + icon="el-icon-edit" + size="medium" + :disabled="singletwo" + @click="handleUpdate" + v-hasPermi="['system:user:remove']" + >淇敼</el-button + > + </el-col> + <el-col :span="1.5"> + <el-button + type="primary" + plain + icon="el-icon-share" + size="medium" + :disabled="singletwo" + @click="ViewQuestionnaire" + v-hasPermi="['system:user:remove']" + >鏌ョ湅</el-button + > + </el-col> + </el-row> + </div> + </div> + <!-- 娣诲姞绫诲埆寮规 --> + <el-dialog + :title="amendtag ? '淇敼绫诲埆' : '鏂板绫诲埆'" + width="30%" + :visible.sync="dialogFormVisible" + > + <el-form :model="classifyform"> + <el-form-item + :label="amendtag ? '璇疯緭鍏ユ柊鐨勭被鍒悕绉�' : '璇疯緭鍏ョ被鍒悕绉�'" + > + <el-input + v-model="classifyform.categoryname" + autocomplete="off" + ></el-input> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button @click="dialogFormVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="submitsidecolumn">纭� 瀹�</el-button> + </div> + </el-dialog> + <!-- 鍒犻櫎绫诲埆纭妗� --> + <el-dialog title="璀﹀憡" :visible.sync="deleteVisible" width="40%"> + <div style="font-size: 20px; color: rgb(247, 76, 76)"> + 鏄惁纭鍒犻櫎鍒嗙被锛歔<span>{{ deletefenl }}</span + >]? + </div> + <div style="font-size: 20px"> + 姝ゆ搷浣滀細灏嗚绫诲埆涓嬫墍鏈夋ā鍧楄浆绉昏嚦[鏈垎绫籡锛屾槸鍚︾户缁垹闄ゆ鍒嗙被锛� + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="deleteVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="deletefenlei">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import { listUser, delUser, addUser, updateUser } from "@/api/system/user"; +import Treeselect from "@riophae/vue-treeselect"; +import "@riophae/vue-treeselect/dist/vue-treeselect.css"; +export default { + name: "questionnaire", + dicts: ["sys_normal_disable", "sys_user_sex"], + components: { Treeselect }, + data() { + return { + topactiveName: "", //鎺у埗鍙充晶鏁版嵁椤堕儴tab灞曠ず + loading: false, //閬僵灞� + Typecontrol: true, //渚ц竟绫诲瀷灞曠ず鎺у埗 + Sidecontrol: true, //渚ц竟鏍戝睍绀烘帶鍒� + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + singletwo: true, + // 闈炲涓鐢� + multiple: true, + multipletwo: true, + + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 2, + activeNames: ["1", "2"], + // 鐢ㄦ埛琛ㄦ牸鏁版嵁 + userList: [ + { + userid: 1, + userName: "涓夊彿", + nickName: "1.2.4", + aphonenumber: "鍏宠妭鐐庣棁", + bphonenumber: "閲嶅害", + cphonenumber: "2022-12-12 ", + }, + { + userid: 2, + userName: "涓�鍙�", + nickName: "1.2.4", + aphonenumber: "楂樿鍘�", + bphonenumber: "涓害", + cphonenumber: "2022-12-12 ", + }, + ], + userListmax: [ + { + userids: 1, + userName: "涓夊彿", + nickName: "1.2.4", + aphonenumber: "鍏宠妭鐐庣棁", + bphonenumber: "閲嶅害", + cphonenumber: "2022-12-12 ", + }, + { + userids: 2, + userName: "涓�鍙�", + nickName: "1.2.4", + aphonenumber: "楂樿鍘�", + bphonenumber: "涓害", + cphonenumber: "2022-12-12 ", + }, + { + userids: 2, + userName: "涓�鍙�", + nickName: "1.2.4", + aphonenumber: "楂樿鍘�", + bphonenumber: "涓害", + cphonenumber: "2022-12-12 ", + }, + ], + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 鏃ユ湡鑼冨洿 + dateRange: [], + // 宀椾綅閫夐」 + postOptions: [], + // 瑙掕壊閫夐」 + roleOptions: [], + // 琛ㄥ崟鍙傛暟 + form: {}, + numberlb: 22, + numberlbs: 2, + sidecolumnform: {}, //娣诲姞绫诲埆琛ㄥ崟 + sidecolumnval: "", //绫诲埆鎼滅储 + propss: { multiple: true }, + idds: "", + amendtag: false, //鏄惁淇敼绫诲埆 + dialogFormVisible: false, //淇敼娣诲姞绫诲埆寮规 + deleteVisible: false, //鍒嗙被鍒犻櫎寮规 + deletefenl: "楂樿鍘�", //鍒犻櫎椤� + //绫诲埆琛ㄥ崟 + classifyform: { + categoryname: "", + }, + // 澶氶�夊垪琛� + optionss: [ + { + value: 1, + label: "涓滃崡", + }, + { + value: 2, + label: "瑗垮寳", + }, + { + value: 3, + label: "浠ㄤ花浠�", + }, + { + value: 4, + label: "鍏椋掗", + }, + ], + //绫诲埆鍒楄〃 + editableTabs: [ + { + title: "鍒嗙被涓�", + number: "1", + }, + { + title: "鍒嗙被浜�", + number: "2", + }, + { + title: "鍒嗙被涓�", + number: "2", + }, + { + title: "鍒嗙被鍥�", + number: "2", + }, + { + title: "鍒嗙被浜�", + number: "2", + }, + ], + // 鏌ヨ鍙傛暟 + queryParams: {}, + currentRow: null, //閫変腑琛屾暟鎹� + }; + }, + watch: {}, + created() { + this.getList(); + }, + + methods: { + /** 鏌ヨ鐢ㄦ埛鍒楄〃 */ + getList() { + // this.loading = true; + listUser().then((response) => { + console.log(response); + // this.userList = response.data; + // this.total = response.total; + // this.loading = false; + console.log(this.userList); + }); + // const { rows } = await listUser(); + // console.log(rows); + // this.list = rows; + }, + // 涓�鍙疯〃閫変腑琛岃Е鍙� + handleCurrentChange(val) { + this.currentRow = val; + this.single = false; + this.multiple = false; + // 娓呴櫎闈炲綋鍓嶈〃鍗曢�変腑鐘舵�� + + // this.$refs.singtwo.setCurrentRow(); + console.log(this.currentRow); + + console.log(val); + }, + handleCurrenttwo(val) { + this.currentRow = val; + this.singletwo = false; + this.multipletwo = false; + // 娓呴櫎闈炲綋鍓嶈〃鍗曢�変腑鐘舵�� + + // this.$refs.singone.setCurrentRow(); + console.log(this.currentRow); + console.log(val); + }, + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map((item) => item.userId); + this.single = selection.length != 1; + this.multiple = !selection.length; + }, + handleSelectiontwo(selection) { + this.ids = selection.map((item) => item.userId); + this.singletwo = selection.length != 1; + this.multipletwo = !selection.length; + }, + + // 娣诲姞銆佷慨鏀圭被鍒� + submitsidecolumn() { + if (this.amendtag) { + this.classifyform.tagcategoryid = this.idds; + // toamendtagcategory(this.addDateRange(this.classifyform)).then( + // (response) => { + // console.log(response); + // this.gitclasify(); + // } + // ); + } else { + // addtagcategory(this.addDateRange(this.classifyform)).then( + // (response) => { + // console.log(response); + // this.gitclasify(); + // } + // ); + } + this.classifyform = { + categoryname: "", + }; + this.idds = ""; + this.dialogFormVisible = false; + }, + //鍒犻櫎鍒嗙被 + deletefenlei(row) { + if (this.deleteVisible) { + // deletetagcategory(this.idds).then((response) => { + // console.log(response); + // this.gitclasify(); + // }); + this.deleteVisible = false; + this.idds = ""; + } else { + this.deleteVisible = true; + this.idds = row.tagcategoryid; + this.deletefenl = row.title; + } + }, + //鎼滅储绫诲埆 + sidecolumnss() {}, + // 鍒囨崲鍏变韩/鏈湴 + tophandleClick() {}, + // 淇敼鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = {}; + this.resetForm("form"); + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.dateRange = []; + this.resetForm("queryForm"); + this.queryParams.deptId = undefined; + this.$refs.tree.setCurrentKey(null); + this.handleQuery(); + }, + + /** 鏂板鎸夐挳鎿嶄綔 */ + handleAdd() {}, + /** 淇敼鎸夐挳鎿嶄綔 */ + handleUpdate() {}, + // 鏌ョ湅 + ViewQuestionnaire() {}, + /** 鏇存柊/淇敼鎻愪氦鎸夐挳 */ + submitForm() {}, + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + handleDelete(row) { + const userIds = row.userId || this.ids; + this.$modal + .confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�') + .then(function () { + return delUser(userIds); + }) + .then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }) + .catch(() => {}); + }, + }, +}; +</script> + +<style lang="scss" scoped> +.Questionnairemanagement { + display: flex; +} +.sidecolumn { + width: 300px; + min-height: 100vh; + text-align: center; + // display: flex; + margin-top: 20px; + margin: 20px; + padding: 30px; + background: #edf1f7; + border: 1px solid #dcdfe6; + -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), + 0 0 6px 0 rgba(0, 0, 0, 0.04); +} + +.sidecolumn-top { + display: flex; + justify-content: space-between; + .top-wj { + font-size: 20px; + } + .top-tj { + font-size: 18px; + + color: rgb(0, 89, 255); + cursor: pointer; + } +} +.center-ss { + margin-top: 30px; + .input-with-select { + height: 40px !important; + } +} +.bottom-fl { + margin-top: 30px; + display: center !important; +} + +::v-deep.el-tabs--left, +.el-tabs--right { + overflow: hidden; + align-items: center; + display: flex; +} +::v-deep.el-input--medium .el-input__inner { + height: 40px !important; +} +::v-deep.el-tabs--right .el-tabs__active-bar.is-right { + height: 40px; + width: 5px; + left: 0; +} +::v-deep.el-tabs--right .el-tabs__item.is-right { + display: block; + font-size: 20px; +} +.leftvlue { + // display: flex; + // flex: 1; + width: 80%; + margin-top: 20px; + // margin: 20px; + padding: 30px; + background: #ffff; + border: 1px solid #dcdfe6; + -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), + 0 0 6px 0 rgba(0, 0, 0, 0.04); + .mulsz { + font-size: 20px; + } +} +.button-text { + color: rgb(70, 204, 238); +} +.button-textck { + color: rgb(39, 167, 67); +} +.button-textxg { + color: rgb(35, 81, 233); +} +.button-textsc { + color: rgb(235, 23, 23); +} +</style> diff --git a/src/views/tool/module/classifytwo.vue b/src/views/tool/module/classifytwo.vue new file mode 100644 index 0000000..2b02583 --- /dev/null +++ b/src/views/tool/module/classifytwo.vue @@ -0,0 +1,177 @@ +<template> + <div class="Questionnairemanagement"> + <!-- 宸︿晶鏍� --> + <div class="sidecolumn"> + <div style="height: 400px"> + <el-steps direction="vertical" :active="Editprogress"> + <el-step title="绗竴姝�"></el-step> + <el-step title="绗簩姝�"></el-step> + <el-step + title="绗笁姝�" + description="杩欐槸涓�娈靛緢闀垮緢闀垮緢闀跨殑鎻忚堪鎬ф枃瀛�" + ></el-step> + <el-step + title="绗洓閮�" + description="杩欐槸涓�娈靛緢闀垮緢闀垮緢闀跨殑鎻忚堪鎬ф枃瀛�" + ></el-step> + </el-steps> + </div> + </div> + <!-- 鍙充晶鏁版嵁 --> + <div class="leftvlue"> + <!-- 鍩烘湰淇℃伅 --> + <div v-if="Editprogress == 1"> + <div class="leftvlue-jbxx">绗竴閮ㄥ垎</div> + <el-button type="success" @click="submitForm('ruleForm')" + >涓嬩竴姝�</el-button + > + <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button> + </div> + <!-- 闂嵎璁剧疆 --> + <div v-if="Editprogress == 2"> + <div class="leftvlue-jbxx">绗簩閮ㄥ垎</div> + <el-button type="success" @click="submitForm('ruleForm')" + >涓嬩竴姝�</el-button + > + <el-button type="primary" @click="laststep()">涓婁竴姝�</el-button> + <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button> + </div> + <!-- 闂嵎棰勮 --> + <div v-if="Editprogress == 3"> + <div class="leftvlue-jbxx">绗笁閮ㄥ垎</div> + <el-button type="success" @click="submitForm('ruleForm')" + >涓嬩竴姝�</el-button + > + <el-button type="primary" @click="laststep()">涓婁竴姝�</el-button> + <!-- <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button> --> + </div> + <!-- 缁撴灉鍙嶉 --> + <div v-if="Editprogress == 4"> + <div class="leftvlue-jbxx">绗洓閮ㄥ垎</div> + <el-button type="success" @click="submitForm('ruleForm')" + >绔嬪嵆鍒涘缓</el-button + > + <el-button type="primary" @click="laststep()">涓婁竴姝�</el-button> + <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button> + </div> + </div> + </div> +</template> + +<script> +export default { + data() { + return { + Editprogress: 1, //缂栬緫杩涘害 + loading: false, // 閬僵灞� + }; + }, + + created() {}, + + methods: { + // 涓嬩竴姝� + submitForm(formName) { + if (this.Editprogress <= 3) { + return this.Editprogress++; + } + // 鎻愪氦 + // this.$refs[formName].validate((valid, object) => { + // if (valid) { + // alert("submit!"); + // } else { + // console.log("error submit!!", object); + // return false; + // } + // }); + }, + // 涓婁竴姝� + laststep() { + this.Editprogress--; + }, + // 鎻愪氦琛ㄥ崟 + resetForm(formName) { + this.$refs[formName].resetFields(); + }, + }, +}; +</script> + +<style lang="scss" scoped> +.Questionnairemanagement { + display: flex; +} +.sidecolumn { + width: 300px; + min-height: 100vh; + text-align: center; + // display: flex; + // margin-top: 20px; + margin: 20px; + margin-bottom: 0; + padding: 30px; + background: #edf1f7; + border: 1px solid #dcdfe6; + -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), + 0 0 6px 0 rgba(0, 0, 0, 0.04); +} +.leftvlue { + // display: flex; + // flex: 1; + width: 80%; + margin-top: 20px; + // margin: 20px; + padding: 30px; + background: #ffff; + border: 1px solid #dcdfe6; + -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), + 0 0 6px 0 rgba(0, 0, 0, 0.04); + .leftvlue-jbxx { + margin-bottom: 50px; + font-size: 20px; + span { + position: absolute; + right: 80px; + } + } +} +::v-deep .addtopic-input { + input { + background: #02a7f0; + color: #edf1f7; + width: 150px; + } +} +::v-deep.el-step.is-vertical .el-step__title { + font-size: 25px; +} +::v-deep.el-input--medium { + font-size: 24px !important; +} +::v-deep.ruleFormaa.el-select { + display: inline-block; + position: relative; + width: 700px; +} +.el-select__tags { + font-size: 20px; + max-width: 888px !important; +} +::v-deep.el-radio__inner { + width: 22px; + height: 22px; +} +// ::v-deep.topic-dev.el-radio__label { +// font-size: 24px; +// } +::v-deep.el-radio-group { + span { + font-size: 24px; + } +} +::v-deep.el-checkbox-group { + span { + font-size: 24px; + } +} +</style> -- Gitblit v1.9.3