|
@@ -2,7 +2,7 @@
|
|
|
<div class="app-container">
|
|
|
<el-row :gutter="20">
|
|
|
<!--部门数据-->
|
|
|
- <el-col :span="4" :xs="24" style="margin-top: 40px;">
|
|
|
+ <el-col :span="24" :xs="24" style="margin-top: 20px; margin-bottom: 20px; text-align: right;">
|
|
|
<!-- <div class="head-container">
|
|
|
<el-input
|
|
|
v-model="deptName"
|
|
@@ -25,15 +25,46 @@
|
|
|
/>
|
|
|
</div> -->
|
|
|
|
|
|
- </el-tab-pane>
|
|
|
+ <!-- </el-tab-pane> -->
|
|
|
+ <el-button type="primary" @click="handleExport">短 信 设 置</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="24" :xs="24">
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="选择用户">
|
|
|
+ <!-- <div>
|
|
|
+ <el-input
|
|
|
+ v-model="deptName"
|
|
|
+ placeholder="请输入用户名称"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ prefix-icon="el-icon-search"
|
|
|
+ style="margin-bottom: 20px"
|
|
|
+ />
|
|
|
+ </div> -->
|
|
|
+ <!-- <div class="head-container" >
|
|
|
+ <div align="right">
|
|
|
+ <el-checkbox v-model="checked" @change="checkedAll"/> 全选/反选
|
|
|
+ </div>
|
|
|
+ <el-tree
|
|
|
+ show-checkbox
|
|
|
+ node-key="code"
|
|
|
+ :data="userList"
|
|
|
+ :props="defaultProps"
|
|
|
+ :filter-node-method="filterNode"
|
|
|
+ ref="tree"
|
|
|
+ default-expand-all
|
|
|
+ @node-click="handleNodeClick"
|
|
|
+ />
|
|
|
+ </div> -->
|
|
|
+ <!-- <treeselect :normalizer="normalizer" :multiple="true" v-model="deptNamety" @select="djieskle" @deselect="deselect" :options="userList" placeholder="请选择归属部门" /> -->
|
|
|
<el-select v-model="deptNamety" :multiple ="true" clearable placeholder="请选择用户" @visible-change = "visiblechange" @change="changetr" @blur="blurkde" filterable>
|
|
|
+ <div style="margin-left: 20px;">
|
|
|
+ <el-checkbox v-model="checked" @change="checkedAll"/> 全选/反选
|
|
|
+ </div>
|
|
|
<el-option
|
|
|
+ ref="tree"
|
|
|
v-for="item in userList"
|
|
|
:key="item.userId"
|
|
|
:label="item.nickName"
|
|
@@ -67,8 +98,9 @@
|
|
|
</el-form>
|
|
|
</el-col>
|
|
|
<el-col :span="24" :xs="24">
|
|
|
- <div class="dialog-footer" style="text-align: center; margin-top: 30px;">
|
|
|
+ <div class="dialog-footer" style="text-align: right; margin-top: 30px;">
|
|
|
<el-button type="primary" @click="submitForm">发 送 短 信</el-button>
|
|
|
+
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<!--用户数据-->
|
|
@@ -77,7 +109,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listUser, getUser, delUser, addUser, updateUser, exportUser, resetUserPwd, changeUserStatus, importTemplate,addPhoen } from "@/api/system/user";
|
|
|
+import { listUser, getUser, delUser, addUser, updateUser, exportUser, resetUserPwd, changeUserStatus, importTemplate,addPhoen,listOueng } from "@/api/system/user";
|
|
|
import { listSendMessage } from "@/api/system/sendMessage";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import { treeselect } from "@/api/system/dept";
|
|
@@ -91,6 +123,7 @@ export default {
|
|
|
return {
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
+ checked:false,
|
|
|
// 选中数组
|
|
|
ids: [],
|
|
|
// 非单个禁用
|
|
@@ -131,7 +164,7 @@ export default {
|
|
|
form: {},
|
|
|
defaultProps: {
|
|
|
children: "children",
|
|
|
- label: "label"
|
|
|
+ label: "nickName",
|
|
|
},
|
|
|
// 用户导入参数
|
|
|
upload: {
|
|
@@ -171,7 +204,8 @@ export default {
|
|
|
{ required: true, message: "内容不能为空", trigger: "blur" }
|
|
|
],
|
|
|
|
|
|
- }
|
|
|
+ },
|
|
|
+ huej:[]
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -198,10 +232,12 @@ export default {
|
|
|
/** 查询用户列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
|
|
+ listOueng(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
|
|
this.userList = response.rows;
|
|
|
+ // this.userList = this.handleTree(response.rows, "id");
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
+ // console.log(this.userList)
|
|
|
//
|
|
|
}
|
|
|
);
|
|
@@ -221,21 +257,63 @@ export default {
|
|
|
this.deptOptions = response.data;
|
|
|
});
|
|
|
},
|
|
|
+ checkedAll(){
|
|
|
+ let juegf = []
|
|
|
+ if (this.checked) {
|
|
|
+ for(var i = 0 ; i < this.userList.length; i++ ){
|
|
|
+ juegf.push(this.userList[i].userId)
|
|
|
+ console.log(juegf)
|
|
|
+ }
|
|
|
+ this.deptNamety = juegf
|
|
|
+ this.form.userList = this.userList
|
|
|
+ //全选
|
|
|
+ // this.$refs.tree.setCheckedNodes(this.userList);
|
|
|
+ console.log(this.userList)
|
|
|
+ }else{
|
|
|
+ //取消选中
|
|
|
+ this.deptNamety = ''
|
|
|
+ this.form.userList = []
|
|
|
+ // this.$refs.tree.setCheckedKeys([]);
|
|
|
+ }
|
|
|
+ },
|
|
|
// 筛选节点
|
|
|
filterNode(value, data) {
|
|
|
+ // console.log(value,data)
|
|
|
if (!value) return true;
|
|
|
- return data.label.indexOf(value) !== -1;
|
|
|
+ return data.nickName.indexOf(value) !== -1;
|
|
|
},
|
|
|
// 节点单击事件
|
|
|
handleNodeClick(data) {
|
|
|
- this.queryParams.deptId = data.id;
|
|
|
- this.getList();
|
|
|
+ // this.queryParams.deptId = data.id;
|
|
|
+ // this.getList();
|
|
|
+ console.log(data)
|
|
|
},
|
|
|
// 下拉框出现/隐藏时触发
|
|
|
visiblechange(val){
|
|
|
console.log(val)
|
|
|
},
|
|
|
+ djieskle(node, instanceId) {
|
|
|
+ // this.personnel(node.id);
|
|
|
+ // let huej = []
|
|
|
+ this.huej.push(node)
|
|
|
+ this.form.userList = this.huej
|
|
|
+ console.log(node, instanceId);
|
|
|
+ console.log(this.form.userList);
|
|
|
+ },
|
|
|
+ deselect(node, instanceId){
|
|
|
+ if(this.form.userList !== undefined){
|
|
|
+ for (let i = this.form.userList.length - 1; i >= 0; i--) {
|
|
|
+ if (this.form.userList[i].userId == node.userId) {
|
|
|
+ this.form.userList.splice(i, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(this.form.userList);
|
|
|
+ console.log(node, instanceId);
|
|
|
+ },
|
|
|
+
|
|
|
changetr(val){
|
|
|
+ console.log(this.deptNamety)
|
|
|
let name = []
|
|
|
let huej = []
|
|
|
name = val
|
|
@@ -266,6 +344,15 @@ export default {
|
|
|
console.log(val)
|
|
|
console.log(huej)
|
|
|
},
|
|
|
+ normalizer(node) {
|
|
|
+ // if (node.children && !node.children.length) {
|
|
|
+ // delete node.children;
|
|
|
+ // }
|
|
|
+ return {
|
|
|
+ id: node.userId,
|
|
|
+ label: node.nickName,
|
|
|
+ };
|
|
|
+ },
|
|
|
changetrtwo(val){
|
|
|
console.log(val)
|
|
|
this.form.textMessageId = val
|
|
@@ -378,8 +465,8 @@ export default {
|
|
|
this.msgSuccess("请选择短信模板");
|
|
|
return false
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
if(this.form.content == undefined){
|
|
|
this.msgSuccess("请输入短信内容");
|
|
|
return false
|
|
@@ -416,16 +503,9 @@ export default {
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
- const queryParams = this.queryParams;
|
|
|
- this.$confirm('是否确认导出所有用户数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return exportUser(queryParams);
|
|
|
- }).then(response => {
|
|
|
- this.download(response.msg);
|
|
|
- })
|
|
|
+ this.$router.push({
|
|
|
+ path: '../../phone/smsstee',
|
|
|
+ })
|
|
|
},
|
|
|
/** 导入按钮操作 */
|
|
|
handleImport() {
|