永洪社区

标题: 如何通过脚本获取组件选中值 [打印本页]

作者: Silvia    时间: 2022-10-25 11:59
标题: 如何通过脚本获取组件选中值


作者: yhdata_yzm    时间: 2022-10-25 11:59
瓜娃子 发表于 2022-10-25 14:10
我获取到选中值了,但是在数据集中是字符串,不能过滤
("Product_Name_EN" IN ( '"颜料红 25404","Cinip ...

param['p_products'】 = products
作者: yhdata_yzm    时间: 2022-10-25 13:13
你这个是树状参数还是树状过滤
作者: Silvia    时间: 2022-10-25 14:10
yhdata_yzm 发表于 2022-10-25 13:13
你这个是树状参数还是树状过滤

我获取到选中值了,但是在数据集中是字符串,不能过滤
("Product_Name_EN" IN ( '"颜料红 25404","Cinipol Red DR2P","Cinipol Red DR2PS","Cinipol Violet DV3P","Cinilex Orange GL","Cinilex DPP Red MT","Cinilex DPP Red MT-CF","Cinilex DPP Red TT","Cinipol Yellow DY5P","S Blue 104","S Black H3B","Cinilex DPP Orange SJ1C","Cinilex Orange JFC","颜料橙 7301","Cinilex Orange SJ3H","Cinipol Orange DJ3P","Cinipol Orange DJ1P","Cinipol Orange DJ2P","Cinilex Yellow SQY","Cinipol Red DR6P","Cinipol Red DR1P","Cinilex DPP Red SR1C","Cinilex DPP Red SR1CN","Cinilex Red RFL","Cinilex Red YNT","Klormax Red DR32","Klormax Red KC","颜料红 25401","Cinilex DPP Red SR1CD","Cinipol Red DR5P","Cinilex DPP Red SR2M","Cinilex DPP Red SR2P","Cinilex DPP Red SR2PD","Cinilex DPP Red SR2P-SC","Cinilex Red YNK","Klormax Red DR33","Klormax Red KP","颜料红 25402","颜料红 25409","Cinilex DPP Red SR2PL","Cinilex Red SR3C","Klormax Red KMA","Cinilex Red SR3C-CF","Cinilex Red SR3C-CR","Cinilex Red SR3C-SC","17702","Cinilex Red SR4C","Klormax Rubine KMQ","Cinilex Red SR4C-CF","Cinilex Red SR4F","Cinipol Red DR7P","Cinilex DPP Rubine SR5H","Cinilex DPP Rubine SR6T","颜料红 26402","Cinilex DPP Rubine SR6TS","Cinilex DPP Red SR9H","Cinilex DPP Red DMX","Cinilex DPP Red ST","Cinilex DPP Red ST(Press Cake)","Cinilex DPP Red YT-CF","颜料红 25403","Cinipol Violet DV4P","Cinipol Violet DV2P","Cinipol Violet DV1P","S Yellow 114","Cinipol Yellow DY1P","Cinipol Yellow DY6P","11001","Cinilex Yellow SY1H","Cinilex Yellow SY1H HS","Cinilex Yellow SY1HP","Cinilex Yellow SY1HQ","Cinilex Yellow SY2T","Cinilex Yellow SY2TN","13901","Cinilex Yellow SY3C","13902","Cinilex Yellow SY3CN","Cinilex Yellow SY3M","13903","Cinilex Yellow SY3P","S Yellow 5G","Cinipol Yellow DY3P","KLORMAX YELLOW YM04"'  ))

要在数据集中过滤脚本应该怎么写?
var productObejct = p_product.getSelectedObjects()
var products = []
var productsS= ''
if (productObejct.length > 0){
for (var i = 0; i< productObejct.length; i++){
   for (var j = 1; j<productObejct[i.length; j=j+2 ) {
      // products.push('"' + productObejct[i][j + '"')
       productsS +=  productObejct[i][j + ','
   }
}
  param['p_products' = productsS
}







欢迎光临 永洪社区 (https://club.yonghongtech.com/) Powered by Discuz! X3.4