Authored by 鲁尚清

【#1162】 变更负责人相关业务-变更人员组件 #3

@@ -306,7 +306,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions', @@ -306,7 +306,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions',
306 let title=` 306 let title=`
307 <div style="display: flex;justify-content: space-between; align-items: center;"> 307 <div style="display: flex;justify-content: space-between; align-items: center;">
308 <span>相关业务批量变更</span> 308 <span>相关业务批量变更</span>
309 - <button id="exportBtn" type="button" class="layui-btn layui-btn-sm layui-btn-normal">导出</button> 309 + <button id="exportBtn" type="button" class="layui-btn layui-btn-sm layui-btn-normal exportBtn">导出</button>
310 </div> 310 </div>
311 `; 311 `;
312 layer.open({ 312 layer.open({
@@ -316,9 +316,11 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions', @@ -316,9 +316,11 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions',
316 shadeClose: true,//开启遮罩层 316 shadeClose: true,//开启遮罩层
317 id: 'batch_change_leaders', 317 id: 'batch_change_leaders',
318 content: ['/vue3/index.html#/vue3/batchChangeLeaders?'+urlParams, 'no'], 318 content: ['/vue3/index.html#/vue3/batchChangeLeaders?'+urlParams, 'no'],
319 - success:function (){ 319 + success:function (layero,index){
  320 + console.log("112233",$("#exportBtn"))
320 321
321 - $("#exportBtn").unbind().on("click",function () { 322 + $(".exportBtn").unbind('click').on('click', function () {
  323 + console.log("669")
322 debugger 324 debugger
323 layer.open({ 325 layer.open({
324 id:'exportChange', 326 id:'exportChange',
  1 +<cm-dialog :title="title" width="500px" :showDialogVisible="show" @hidedialog="hidedialog" @okfunc="getUser">
  2 + <template v-slot>
  3 + <el-row >
  4 + <el-col :span="24" class="table-height">
  5 + <span v-if="isTwoGroup">主负责人:</span>
  6 + <el-select
  7 + v-model="selectModel"
  8 + :multiple="isMulti"
  9 + placeholder="请选择用户"
  10 + style="width:80%"
  11 + clearable
  12 + filterable
  13 + >
  14 + <el-option
  15 + v-for="item in userList"
  16 + :key="item.username"
  17 + :label="item.nickname"
  18 + :value="item.username"
  19 + >
  20 + <div >
  21 + <span>{{item.orgName}}/{{item.nickname}}</span>
  22 + </div>
  23 + </el-option>
  24 + </el-select>
  25 + </el-col>
  26 + </el-row>
  27 + <el-row v-if="isTwoGroup" style="margin-top:10px;">
  28 + <el-col :span="24">
  29 + <span>辅负责人:</span>
  30 + <el-select
  31 + v-model="selectModelSecond"
  32 + multiple
  33 + placeholder="请选择用户"
  34 + style="width:80%"
  35 + clearable
  36 + filterable
  37 + >
  38 + <el-option
  39 + v-for="item in userListSecond"
  40 + :key="item.username"
  41 + :label="item.nickname"
  42 + :value="item.username"
  43 + >
  44 + <div >
  45 + <span>{{item.orgName}}/{{item.nickname}}</span>
  46 + </div>
  47 + </el-option>
  48 + </el-select>
  49 + </el-col>
  50 + </el-row>
  51 + </template>
  52 +</cm-dialog>
  1 +export default {
  2 + name: 'changeUsersList',
  3 + template: '',
  4 + components: {
  5 +
  6 + },
  7 + data() {
  8 + },
  9 + props: {
  10 + title: {
  11 + type: String,
  12 + default: '用户列表'
  13 + },
  14 + show:{
  15 + type:Boolean,
  16 + default: false
  17 + },
  18 + //是否为多选
  19 + isMulti:{
  20 + type:Boolean,
  21 + default:false
  22 + },
  23 + //如果是主/辅负责人时为true
  24 + isTwoGroup:{
  25 + type:Boolean,
  26 + default:false
  27 + }
  28 + },
  29 + setup: function (props, {attrs, slots, emit}) {
  30 + const {proxy} = Vue.getCurrentInstance();
  31 + let height=Vue.ref(window.innerHeight);
  32 + let selectModel=Vue.ref([]);
  33 + let selectModelSecond=Vue.ref([]);
  34 +
  35 + let hidedialog = () => {
  36 + emit('hideDialog', false);
  37 + }
  38 + let getUser = () =>{
  39 + let obj={}
  40 + let arr=[];
  41 + if(props.isMulti){
  42 + arr=selectModel.value
  43 + }else{
  44 + arr=[selectModel.value];
  45 + }
  46 + if(props.isTwoGroup){
  47 + obj={
  48 + selectModel: arr,
  49 + selectModelSecond: selectModelSecond.value
  50 + }
  51 + }else{
  52 + obj={
  53 + selectModel: arr,
  54 + }
  55 + }
  56 + emit('savebtn', obj);
  57 +
  58 + }
  59 + let search=Vue.ref({
  60 + username:'',
  61 + nickname:'',
  62 + enabled:'',
  63 + orgId:'',
  64 + roles:'',
  65 + limit:999999,
  66 + page:1
  67 + })
  68 + let userList=Vue.ref([]);
  69 + let userListSecond=Vue.ref([]);
  70 + let count=Vue.ref(0);
  71 + //获取所有用户
  72 + let getAllUser = () =>{
  73 + proxy.$http.get('/api-user/users', search.value, function (res) {
  74 + if (res && res.data) {
  75 + userList.value=res.data;
  76 + userListSecond.value=res.data;
  77 + count.value=res.count;
  78 + }
  79 + })
  80 + }
  81 + // 挂载完
  82 + Vue.onMounted(() => {
  83 + getAllUser();
  84 + })
  85 + return {
  86 + selectModel,
  87 + height,
  88 + selectModelSecond,
  89 + getAllUser,
  90 + userList,
  91 + userListSecond,
  92 + count,
  93 + hidedialog,
  94 + getUser,
  95 + search
  96 + }
  97 + }
  98 +}
@@ -8,11 +8,9 @@ @@ -8,11 +8,9 @@
8 <el-select clearable multiple v-model="search.resType" placeholder="请选择资源类型"> 8 <el-select clearable multiple v-model="search.resType" placeholder="请选择资源类型">
9 <el-option 9 <el-option
10 v-for="item in resTypeOptions" 10 v-for="item in resTypeOptions"
11 - :key="item.kpiId"  
12 - :label="item.kpiName"  
13 - :value="item.kpiId">  
14 - <span style="float: left">{{ item.kpiId }}</span>  
15 - <span style="float: right;color: var(--el-text-color-secondary);font-size: 13px;">{{ item.kpiName }}</span> 11 + :key="item.resTypeCode"
  12 + :label="item.resTypeName"
  13 + :value="item.resTypeCode">
16 </el-option> 14 </el-option>
17 </el-select> 15 </el-select>
18 </el-form-item> 16 </el-form-item>
@@ -24,15 +22,14 @@ @@ -24,15 +22,14 @@
24 </el-row> 22 </el-row>
25 <el-row style="margin-bottom: 10px;"> 23 <el-row style="margin-bottom: 10px;">
26 <div class="flex-div-start"> 24 <div class="flex-div-start">
27 - <el-button type="primary" @click="save()" size="small">取消</el-button>  
28 - <el-button type="primary" @click="conserve()" size="small" style="margin-left: 6px">变更</el-button>  
29 - <el-button type="primary" @click="conserve()" size="small" style="margin-left: 6px">导出</el-button> 25 + <el-button type="primary" @click="changeCancel()" size="small">取消</el-button>
  26 + <el-button type="primary" @click="changeAdmin()" size="small" style="margin-left: 6px">变更</el-button>
30 </div> 27 </div>
31 </el-row> 28 </el-row>
32 <el-row class="margin-bottom-50" style="margin-top: 3px"> 29 <el-row class="margin-bottom-50" style="margin-top: 3px">
33 <el-col :span="24" class="table-height"> 30 <el-col :span="24" class="table-height">
34 <cm-table-page :columns="columns" 31 <cm-table-page :columns="columns"
35 - :dataList="portSenseConfigData" 32 + :dataList="resourceData"
36 :total="count" 33 :total="count"
37 :pageSize="pageSize" 34 :pageSize="pageSize"
38 @loaddata="loadTableDataList" 35 @loaddata="loadTableDataList"
@@ -46,29 +43,11 @@ @@ -46,29 +43,11 @@
46 :height="(height - 200)"> 43 :height="(height - 200)">
47 <template #default="{row,prop,column}"> 44 <template #default="{row,prop,column}">
48 <!-- <div v-if="prop == 'protocolType'"> 45 <!-- <div v-if="prop == 'protocolType'">
49 - <el-select placeholder="请选择" size="small" style="width: 100%"  
50 - @change="changePortSense(row,prop,column)" v-model="row.protocolType"  
51 - :multiple="false"  
52 - collapse-tags clearable filterable placeholder="请选择">  
53 - <el-option label="TCP协议" :value="'tcp-port'"></el-option>  
54 - <el-option label="UDP协议" :value="'udp-port'"></el-option>  
55 - </el-select>  
56 - </div>  
57 - <div v-else>  
58 - <el-input @blur="changePortSense(row,prop,column)"  
59 - :type="prop == intervalTime ? 'number' : 'text'"  
60 - size="small" placeholder="请填写"v-model="row[prop]">  
61 - <template #suffix>  
62 - <i class="el-icon-edit-outline"/>  
63 - </template>  
64 - </el-input> 46 +
65 </div>--> 47 </div>-->
66 </template> 48 </template>
67 - <!-- <template #tools="{scope}">  
68 - <el-button type="text" size="small" @click.prevent="deleteItem(scope.row,scope.$index)">  
69 - <i class="el-icon-delete"/>  
70 - </el-button>  
71 - </template>-->  
72 </cm-table-page> 49 </cm-table-page>
73 </el-col> 50 </el-col>
74 </el-row> 51 </el-row>
  52 +
  53 +<ChangeUsersList :show="show" :isTwoGroup="isTwoGroup" :isMulti="isMulti" @hideDialog="hideDialog" @savebtn="savebtn"></ChangeUsersList>
@@ -2,6 +2,9 @@ export default { @@ -2,6 +2,9 @@ export default {
2 name: 'resourcePer', 2 name: 'resourcePer',
3 template: '', 3 template: '',
4 components: { 4 components: {
  5 + 'ChangeUsersList': Vue.defineAsyncComponent(
  6 + () => myImport('views/batchChangeLeaders/changeUsersList/index')
  7 + ),
5 }, 8 },
6 data() { 9 data() {
7 }, 10 },
@@ -13,7 +16,22 @@ export default { @@ -13,7 +16,22 @@ export default {
13 }, 16 },
14 setup: function (props, {attrs, slots, emit}) { 17 setup: function (props, {attrs, slots, emit}) {
15 const {proxy} = Vue.getCurrentInstance(); 18 const {proxy} = Vue.getCurrentInstance();
16 - 19 + //变更人员弹框
  20 + let show=Vue.ref(false);
  21 + //变更人员列表是否多选
  22 + let isMulti=Vue.ref(false);
  23 + //变更人员列表是否是两组
  24 + let isTwoGroup=Vue.ref(false);
  25 + //配置列表总数
  26 + let count = Vue.ref(0);
  27 + //列表高度
  28 + let height = Vue.ref(window.innerHeight);
  29 + //列表分页
  30 + let limit = Vue.ref(400);
  31 + //加载
  32 + let loading = Vue.ref(true);
  33 + //选中数据
  34 + let pitch = Vue.ref([]);
17 let showTypeList=Vue.ref([]); 35 let showTypeList=Vue.ref([]);
18 let search = Vue.ref({ 36 let search = Vue.ref({
19 resType: '', 37 resType: '',
@@ -22,8 +40,6 @@ export default { @@ -22,8 +40,6 @@ export default {
22 limit: 20, 40 limit: 20,
23 }); 41 });
24 let resTypeOptions=Vue.ref([]) 42 let resTypeOptions=Vue.ref([])
25 -  
26 -  
27 const columns = [ 43 const columns = [
28 { 44 {
29 prop: 'resName', 45 prop: 'resName',
@@ -97,48 +113,34 @@ export default { @@ -97,48 +113,34 @@ export default {
97 } 113 }
98 } 114 }
99 ]; 115 ];
100 - //配置列表总数  
101 - let count = Vue.ref(0); 116 +
102 //列表数据 117 //列表数据
103 - let portSenseConfigData = Vue.ref([]);  
104 - //数据库的数据  
105 - let portSenseConfigList = Vue.ref([]); 118 + let resourceData = Vue.ref([]);
  119 +
106 //资源数据 120 //资源数据
107 let resIdArr = Vue.ref([]); 121 let resIdArr = Vue.ref([]);
108 - //列表高度  
109 - let height = Vue.ref(window.innerHeight);  
110 - //列表分页  
111 - let pageSize = Vue.ref(400);  
112 - //加载  
113 - let loading = Vue.ref(true);  
114 - //选中数据  
115 - let pitch = Vue.ref([]);  
116 - //下拉框数据  
117 - let portSenseSelectData = Vue.ref([]); 122 +
118 123
119 //获取列表数据 124 //获取列表数据
120 - const getListData = ({page, limit}) => {  
121 - //获取传递过来的参数  
122 - resIdArr.value = JSON.parse(JSON.stringify(props.parameter));  
123 - //传递参数赋值给下拉框  
124 - portSenseSelectData.value = resIdArr.value; 125 + const getListData = () => {
125 126
126 let username=proxy.$route.query.username; 127 let username=proxy.$route.query.username;
127 let resName=proxy.$route.query.resName; 128 let resName=proxy.$route.query.resName;
128 //定义列表参数 129 //定义列表参数
129 let getParams = { 130 let getParams = {
130 resIds: resIdArr.value.join(','), 131 resIds: resIdArr.value.join(','),
  132 + resType:search.value.resType,
  133 + keyword:search.value.keyword,
131 resName: resName, 134 resName: resName,
132 userId: username, 135 userId: username,
133 - page: page,  
134 - limit: limit 136 + page: search.value.page,
  137 + limit: search.value.limit
135 }; 138 };
136 proxy.$http.get("/api-web/manage/resource/getAllResByUser", getParams, function (res) { 139 proxy.$http.get("/api-web/manage/resource/getAllResByUser", getParams, function (res) {
137 if (res && res.success) { 140 if (res && res.success) {
138 - portSenseConfigData.value = res.data ? res.data : []; 141 + resourceData.value = res.data ? res.data : [];
139 count.value = res.count; 142 count.value = res.count;
140 loading.value = false; 143 loading.value = false;
141 - portSenseConfigList.value = res.data ? JSON.parse(JSON.stringify(res.data)) : [];  
142 } 144 }
143 }) 145 })
144 } 146 }
@@ -146,222 +148,85 @@ export default { @@ -146,222 +148,85 @@ export default {
146 //表格全选事件 148 //表格全选事件
147 let selectionChange = (val) => { 149 let selectionChange = (val) => {
148 pitch.value = val; 150 pitch.value = val;
149 - proxy.portSenseConfigData.map((v, i) => { 151 + proxy.resourceData.map((v, i) => {
150 v.checked = false; 152 v.checked = false;
151 }); 153 });
152 let selectData = val; 154 let selectData = val;
153 if (selectData.length > 0) { 155 if (selectData.length > 0) {
154 selectData.map((item, index) => { 156 selectData.map((item, index) => {
155 - proxy.portSenseConfigData.map((v, i) => { 157 + proxy.resourceData.map((v, i) => {
156 if (item.id == v.id) { 158 if (item.id == v.id) {
157 v.checked = true; 159 v.checked = true;
158 } 160 }
159 }) 161 })
160 }) 162 })
161 } else { 163 } else {
162 - proxy.portSenseConfigData.map((v, i) => { 164 + proxy.resourceData.map((v, i) => {
163 v.checked = false; 165 v.checked = false;
164 }) 166 })
165 } 167 }
166 } 168 }
167 - //删除单个数据  
168 - let deleteItem = (row, index) => {  
169 - proxy.$global.confirm("确认删除吗?", function () {  
170 - deleteItems(row, index);  
171 - })  
172 - }  
173 - //删除多个或单个  
174 - let deleteItems = (row, index) => {  
175 - //新添加未保存的  
176 - let sign = deleteNotSave(row, index);  
177 - if (sign) {  
178 - return false;  
179 - }  
180 - proxy.$http.post('/api-web/bResourceExtendParam/deleteConfig', row, function (res) {  
181 - if (res && res.success) {  
182 - proxy.$global.showMsg('删除成功');  
183 - loadTableDataList({page: 1, limit: pageSize.value});  
184 - }  
185 - })  
186 - }  
187 - //删除新添加但未保存的  
188 - let deleteNotSave = (row, index) => {  
189 - let sign = false;  
190 - let list = portSenseConfigData.value;  
191 - if(row.id === ""){  
192 - portSenseConfigData.value = list.filter((item, i, array) => index !== i);  
193 - }  
194 - if (list.length > portSenseConfigData.value.length) {  
195 - proxy.$global.showMsg('删除成功');  
196 - sign = true;  
197 - }  
198 - return sign;  
199 - }  
200 - //新增 添加一行数据  
201 - let save = () => {  
202 - let data = {  
203 - id: "",  
204 - intervalTime: null,  
205 - paramCode: "",  
206 - paramDesc: "",  
207 - paramValue: "",  
208 - port: "",  
209 - portDesc: "",  
210 - protocolType: "",  
211 - resId: "",  
212 - resIdList: resIdArr.value,  
213 - }  
214 - portSenseConfigData.value.push(data);  
215 - }  
216 - //下拉框值改变事件  
217 - let changePortSense = () => {  
218 169
219 - }  
220 - //保存  
221 - let conserve = () => {  
222 - //数据验证  
223 - let msg = verifyData();  
224 - if (msg !== "") {  
225 - proxy.$global.showMsg(msg, "warning");  
226 - return false;  
227 - }  
228 - //逻辑验证  
229 - let identifying = isSave();  
230 - if (identifying !== "") {  
231 - proxy.$global.showMsg(identifying, "warning");  
232 - return false; 170 + //批量取消相关资源
  171 + let changeCancel = () => {
  172 + console.log("123654",pitch.value)
  173 + if(pitch.value.length<1){
  174 + proxy.$global.showMsg('请至少选择一项','warning');
  175 +
  176 + }else{
  177 + proxy.$global.confirm("确定取消相关资源?", function () {
  178 + proxy.$global.showMsg('取消成功!');
  179 +
  180 + // proxy.$http.get(`/api-web/alarmsubscribe/exclude/delete/${row.id}`, {}, function (res) {
  181 + // if (res && res.success) {
  182 + // proxy.$global.showMsg('取消成功!');
  183 + // getListData()
  184 + // }
  185 + // })
  186 +
  187 + });
233 } 188 }
234 - proxy.$http.post("/api-web/bResourceExtendParam/conserve", portSenseConfigData.value, function (res) {  
235 - if (res && res.success) {  
236 - proxy.$global.showMsg("保存成功!");  
237 - loadTableDataList({page: 1, limit: pageSize.value});  
238 - }  
239 - })  
240 } 189 }
241 - //保存表单验证  
242 - let verifyData = () => {  
243 - let msg = "";  
244 - //协议类型不能为空,端口备注不能为空,端口号请输入数字,间隔时长请输入数字,  
245 - let list = portSenseConfigData.value;  
246 - let li = columns.filter(item => "paramDesc" !== item.prop);  
247 - list.forEach(function (item, index, arr) {  
248 - li.forEach(function (e, i, array) {  
249 - if (item[e.prop] == null || item[e.prop] === '') {  
250 - msg = e.label + '不能为空';  
251 - } else {  
252 - if (['protocolType', 'portDesc'].indexOf(e.prop) === -1 && !/^\d+$/.test(item[e.prop])) {  
253 - msg = e.label + '请输入数字';  
254 - }else{  
255 - if(['protocolType', 'portDesc'].indexOf(e.prop) === -1 && item[e.prop].length>=8){  
256 - msg = e.label + '不能超过8位';  
257 - }else{  
258 - if(['protocolType', 'portDesc'].indexOf(e.prop) === -1 && item[e.prop]<=0){  
259 - msg = e.label + '只能大于零';  
260 - }  
261 - }  
262 - }  
263 - }  
264 - })  
265 - })  
266 - return msg  
267 - }  
268 - //是否可以保存  
269 - let isSave = () => {  
270 - let msg = "";  
271 - //零个资源不用判断  
272 - if (resIdArr.value.length === 0) {  
273 - return "必须选中资源";  
274 - }  
275 - //单个资源不用判断  
276 - if (resIdArr.value.length === 1) {  
277 - return msg;  
278 - }  
279 - //多个资源时,如果当前已选资源中存在列表新增加的协议类型和端口号对应的数据时,提示不允许进行保存,提示信息中必须包含资源名称+端口类型、端口号,  
280 - let list = [];  
281 - let arr = [];  
282 - portSenseConfigData.value.forEach(item => {  
283 - item.resIdList.forEach(map => {  
284 - let obj = Object.assign({}, item);  
285 - obj["resId"] = map;  
286 - obj["resIdList"] = [map];  
287 - list.push(obj);  
288 - })  
289 - });  
290 - //查看当前页面数据是否重复  
291 - groupByCount(list, arr);  
292 - if (arr.length > 0) {  
293 - return arr.join(','); 190 +
  191 + //变更负责人
  192 + let changeAdmin = () => {
  193 + if(pitch.value.length<1){
  194 + proxy.$global.showMsg('请至少选择一项','warning');
  195 +
  196 + }else{
  197 + show.value=true;
294 } 198 }
295 - //查看当前页面数据跟数据库是否重复  
296 - let presentArray = [];  
297 - //过滤不是新增的数据  
298 - list = list.filter(item => item.id === "");  
299 - resIdArr.value.forEach(item => {  
300 - let li = [];  
301 - let getParams = {  
302 - resIds: item,  
303 - page: 1,  
304 - limit: 9999  
305 - };  
306 - proxy.$http.get("/api-web/bResourceExtendParam/portSensePage", getParams, function (res) {  
307 - if (res && res.success) {  
308 - li = res.data ? res.data : [];  
309 - list.forEach(e => {  
310 - li.forEach(map => {  
311 - if (map.resId === e.resId && map.paramCode === e.protocolType && map.port === e.port) {  
312 - let obj = Object.assign({}, e);  
313 - obj["resName"] = map.resName;  
314 - presentArray.push(obj);  
315 - }  
316 - });  
317 - });  
318 - }  
319 - }, null, null, null, false);  
320 - });  
321 - presentArray.forEach(item => {  
322 - let str = item.resName + "的" + item.paramCode.split("-")[0] + "协议" + "侦测的" + item.port + "端口号已侦测";  
323 - arr.push(str);  
324 - })  
325 - msg = arr.join(',');  
326 - return msg; 199 +
327 } 200 }
  201 +
328 //重新加载表格数据 202 //重新加载表格数据
329 let loadTableDataList = ({page, limit}) => { 203 let loadTableDataList = ({page, limit}) => {
330 - getListData({page, limit}); 204 + search.value.page=page;
  205 + search.value.limit=limit;
  206 + getListData();
331 } 207 }
332 - //修改父组件的值  
333 - let selectRes = (item) => {  
334 - portSenseConfigData.value = item; 208 +
  209 + //变更人员的弹框关闭后
  210 + let hideDialog =(flag)=>{
  211 + show.value=flag;
  212 + // getListData();
335 } 213 }
336 - //数组查找重复数据并统计行数  
337 - let groupByCount = (arr, array) => {  
338 - let list = [];  
339 - arr.sort((a, b) => {  
340 - if (a.resId !== b.resId) {  
341 - return a.resId < b.resId ? -1 : 1;  
342 - } else {  
343 - return a.name < b.name ? -1 : 1;  
344 - }  
345 - });  
346 - for (let i = 0; i < arr.length;) {  
347 - let count = 0;  
348 - for (let j = i; j < arr.length; j++) {  
349 - if (arr[i].resId === arr[j].resId && arr[i].protocolType === arr[j].protocolType && arr[i].port === arr[j].port) {  
350 - count++;  
351 - }  
352 - }  
353 - list.push({array: arr[i], count: count});  
354 - i += count;  
355 - }  
356 - list.forEach(item => {  
357 - if (item.count > 1) {  
358 - let str = item.array.resName + "的" + item.array.paramCode.split("-")[0] + "协议" + "侦测的" + item.array.port + "端口号已侦测";  
359 - array.push(str); 214 + //变更人员的弹框保存后
  215 + let savebtn =(obj)=>{
  216 + show.value=false;
  217 + //obj.selectModel 选中的用户组(一个/主负责人) obj.selectModelSecond 辅负责人,都是数组
  218 + console.log("&&&",obj)
  219 + getListData();
  220 + }
  221 + //获取资源类型数据
  222 + let getResourceTypoe=()=>{
  223 + proxy.$http.get(`/api-web/manage/restype/list`, {}, function (res) {
  224 + if (res && res.data) {
  225 + resTypeOptions.value=res.data
360 } 226 }
361 }) 227 })
362 - }  
363 -  
364 228
  229 + }
365 //获取展示类型的字典数据 230 //获取展示类型的字典数据
366 let initShowType=()=>{ 231 let initShowType=()=>{
367 proxy.$http.get("/api-web/manage/resource/getAllResByUser", {}, function (res) { 232 proxy.$http.get("/api-web/manage/resource/getAllResByUser", {}, function (res) {
@@ -379,34 +244,36 @@ export default { @@ -379,34 +244,36 @@ export default {
379 } 244 }
380 }) 245 })
381 } 246 }
382 -  
383 // 挂载完 247 // 挂载完
384 Vue.onMounted(() => { 248 Vue.onMounted(() => {
385 - getListData({page: 1, limit: pageSize.value}); 249 + getResourceTypoe();
  250 + getListData();
386 }) 251 })
387 return { 252 return {
  253 + isMulti,
  254 + isTwoGroup,
  255 + show,
388 initShowType, 256 initShowType,
389 showTypeList, 257 showTypeList,
390 search, 258 search,
391 resTypeOptions, 259 resTypeOptions,
392 - 260 + changeCancel,
393 count, 261 count,
394 - portSenseConfigData, 262 + hideDialog,
  263 + savebtn,
  264 + changeAdmin,
  265 + getResourceTypoe,
  266 +
  267 + resourceData,
395 columns, 268 columns,
396 height, 269 height,
397 - pageSize,  
398 loading, 270 loading,
399 271
400 selectionChange, 272 selectionChange,
401 - deleteItem,  
402 - save, 273 +
403 getListData, 274 getListData,
404 loadTableDataList, 275 loadTableDataList,
405 - changePortSense,  
406 - conserve,  
407 - selectRes,  
408 276
409 - portSenseSelectData  
410 } 277 }
411 } 278 }
412 } 279 }
@@ -2,7 +2,9 @@ export default { @@ -2,7 +2,9 @@ export default {
2 name: 'resourceTypePer', 2 name: 'resourceTypePer',
3 template: '', 3 template: '',
4 components: { 4 components: {
5 - 5 + 'ChangeUsersList': Vue.defineAsyncComponent(
  6 + () => myImport('views/batchChangeLeaders/changeUsersList/index')
  7 + ),
6 }, 8 },
7 data() { 9 data() {
8 }, 10 },